Noun Analysis: What is a pattern? What is a framework?

Source: Internet
Author: User
Tags file system resource

1. What is a pattern?

Patterns, that is, pattern. In fact, is to solve a certain type of problem methodology. You have summed up the method of solving some kind of problem to the theoretical height, that is the pattern.

The classic definition given by Alexander is that each pattern describes a problem that is constantly occurring in our environment and then describes the core of the solution to the problem. In this way, you can use the existing solutions countless times without having to repeat the same work.

There are different fields in the model, there are architectural patterns in the architectural field, and there are design patterns in the field of software design. When a field matures, there are many patterns that naturally occur.

What is a framework?

Frame, that is, the framework. In fact, is an application of semi-finished products, is a set of components for you to choose to complete your own system. To put it simply is to use someone else to set up a good stage for you to do the show. Moreover, the framework is generally mature and constantly upgraded software.

2. Why do you use patterns?

Because the model is a kind of guidance, under a good guidance, help you to complete the task, help you to make a good design plan, to achieve a multiplier effect. And it will be the best way to solve the problem.

Why do you use frames?

Because the development of software system has been very complicated today, especially the server software, design to the knowledge, content, problem too much. Using someone's mature framework in some ways is equivalent to getting someone to do some basic work, and you just need to focus on the business logic design of your system. And the framework is generally mature, robust, he can deal with a lot of details of the system, such as things, security, data flow control and so on. There are also frameworks that are commonly used by many people, so the structure is good, so scalability is also very good, and it is constantly upgraded, you can directly enjoy the benefits of others to upgrade the code.

Frameworks are generally in the middle tier between low-level application platforms (such as Java EE) and high-level business logic.

Why should the software be layered?

In order to achieve "high cohesion, low coupling." The problem is divided into various solutions, easy to control, easy to extend, easy to allocate resources ... In short, the benefits are many:).

3. The following are mainly JAVA,J2EE models and frameworks:

What are the common design patterns?

First of all, what you need to know is Gof's "design pattern--the basics of reusable object-oriented software" (this can be said to be a programmer must), note: Gof is not a person, but refers to four people. Its original intention is gangs of Four, or "gang", which refers to the book's four authors: Erich gamma,richard Helm,ralph Johnson,john. This book covers 23 main models, including: abstract factories, adapters, appearance patterns, and so on.

There are many other models, an estimated more than 100 kinds.

There are too many software design patterns, as far as I can tell, the most common MVC pattern.

The MVC pattern was presented by Buschmann in 1996:

Model: Encapsulates the data and all operations based on that data.

View: Is the encapsulation of the data display, that is, the user interface.

Controller (Control): is the encapsulation of external action on the model of the operation and the flow of data controls.

Other than that:

RUP (Rational Unified Process) software unification processes, XP (Extreme programming) Extreme programming, which is often called "process approach", is a methodology for software project implementation processes, It is a method strategy for the implementation of software project. is also another angle of the pattern.

4. What are the common Java frameworks?

WAF:

Full Name: WEB application FRAMEWORK

Main application aspects: EJB layer, (the Web layer is also, but relatively weak).

Main application technology: EJB, etc.

Source: http://java.sun.com/blueprints/code/index.html

Brief: This is the example that Sun uses in displaying the Java EE platform Petstore (pet store system) inside the frame. is the application framework presented in the Sun Blue Book Example program. It implements MVC and other good design patterns. Sun's web site has technical information, the best download Petstore to study, WebLogic with this system, the source code in Bea/weblogic700/samples/server/src/petstore. This is the preferred framework for learning about Java EE.

Struts:

Main application aspects: Web layer.

Main application technology: Jsp,taglib,javabean,xml, etc.

Source: http://jakarta.apache.org/struts/index.html

Brief description: This is the open source project of Apache, the application is very extensive at present. Based on the MVC pattern, the structure is very good, based on JSP. Jbuilder8 has integrated the production of STRUTS1.02.

A brief introduction to the Waf+struts combination: The Web layer uses the WAF for the STRUTS,EJB layer:

JSP (TAGLIB)-->actionform-->action--> event-->ejbaction-->ejb-->dao-->database jsp (TAGLIB) ( Forward) <--action <--eventresponse<--

Turbine:

Main application aspects: Web layer.

Main application technology: Servlet and so on

Source: http://jakarta.apache.org/turbine/index.html

Description: This is an open source project for Apache. Based on the servlet. The speed is said to be faster, providing a variety of services based on service (pluggable implementation-pluggable executive components).

Cocoon:

Main application aspects: Web layer.

Main application technology: Xml,xsp,servlet, etc.

Source: http://cocoon.apache.org/2.0/

Description: This is an open source project for Apache. Based on XML, XSP (popularly speaking, XSP is a dynamic XML document formed after adding a Java program section to an XML static document. )。 The feature is that it can interact with a variety of data sources, including file system, database, Ldap,xml resource base, network data source, etc.

ECHO:

Main application aspects: Web layer.

Main application technology: Servlet

Source: http://www.nextapp.com/products/echo/

Brief introduction: An open source project of Nextapp company. Based on the servlet. The page can do very beautiful, combine echopoint, can make a lot of graphics effect (inside use Jfreechart package). Use the idea of swing as a Web page to do HTML as a Java class. But a lot of use session, page frames (frame) Many, system resource consumption is very large.

Jato:

Full Name: SUN one application Framework

Main application aspects: Web layer.

Main application technology: Jsp,taglib,javabean, etc.

Source: http://www.sun.com/

Brief description: This is a commercial framework introduced by Sun, the first to see the name is the combination of sun one platform launched. I downloaded the JATO2.0 and looked at it, feeling a little bit simpler and using a jsp+taglib+javabean. As his doc says, Jato is suitable for use in small Web applications.

Tcf:

Full Name: Thin-client Framework

Main application aspects: JAVA GUI.

Main application Technology: JAVA application, etc.

Source: Http://www.alphaworks.ibm.com/tech/tcf

Description: This is a framework for IBM. Based on the MVC pattern, Java application. Recommend an introduction article: http://www-900.ibm.com/developerWorks/cn/java/j-tcf1/index.shtml



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.