Technical analysis: What is a model? What is the framework ?)

Source: Internet
Author: User
1. What is the mode?

Pattern. It is actually a methodology for solving a certain type of problems. You sum up the methods for solving a certain type of problems to the theoretical level, that is, the mode.

Alexander's classic definition is that each mode describes a problem that is constantly emerging in our environment, and then describes the core of the solution to the problem. In this way, you can use existing solutions countless times without repeating the same work.

The mode has different fields, the construction field has the construction mode, and the software design field also has the design mode. When a domain gradually matures, many models will naturally emerge.

What is a framework?

Framework. In fact, it is a semi-finished product of an application, that is, a group of parts for you to choose to complete your own system. Simply put, you can use a stage set up by others to perform performances. In addition, the framework is generally mature and constantly upgraded software.

2. Why use the mode?

Because the mode is a kind of guidance, under a good guidance, it will help you complete the task, and help you make a good design solution to achieve twice the result with half the effort. In addition, we can find the best solution to the problem.

Why use the framework?

As software systems have become very complex today, especially the knowledge, content, and problems of server-side software and design. Using someone else's mature framework in some ways is equivalent to letting someone else do some basic work for you. You only need to concentrate on completing the business logic design of the system. In addition, the framework is generally mature and robust. It can handle many details of the system, such as transaction processing, security, and data flow control. There are also frameworks that are generally used by many people, so the structure is very good, so the scalability is also good, and it is constantly upgraded, you can directly enjoy the benefits of other people upgrading code.

The framework is generally located at the intermediate layer between the low-level application platform (such as J2EE) and the high-level business logic.

Why is software layered?

To achieve high cohesion and low coupling ". Divide the problem into various solutions, which are easy to control, easy to extend, and easy to allocate resources... In short, there are many advantages :).

3. The following describes the JAVA and J2EE models and frameworks:

What are common design patterns?

First, you need to understand the book GOF's design patterns-the basis for reusable object-oriented software (this can be said to be a must for programmers). Note: GOF is not a single person, it refers to four people. Its original intention is Gangs Of Four, which refers to the Four authors Of this book: Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. This book describes 23 main models, including abstract factory, adapter, and appearance model.

There are many other models, estimated to be more than 100.

There are too many software design patterns, so let me briefly describe the most common MVC pattern.

The MVC pattern was proposed by Buschmann in 1996:

Model: encapsulates data and all operations based on the data.

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

Controller: encapsulates operations on the model and controls the flow of data.

In addition:

The Unified Process of software (Rational Unified Process), XP (Extreme Programming) Extreme Programming, these are usually called "Process methods", is a methodology of the implementation Process of software projects, it is a method strategy proposed for the implementation process of software projects. It is also another mode.

4. What are common JAVA frameworks?

WAF:

Full name: WEB APPLICATION FRAMEWORK

Main Application: EJB layer (WEB layer also exists, but it is relatively weak ).

Main application technologies: EJB, etc.

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

Brief description: this is an example that SUN used to demonstrate the J2EE platform. The framework in PetStore is as follows. It is the application framework proposed in the SUN blue book example program. It implements MVC and other good design patterns. SUN's website has technical information. It is best to download PetStore for research. WEBLOGIC comes with this system. The source code is bea/weblogic700/samples/server/src/petstore. This is the preferred framework for learning about J2EE.

Struts:

Main Application: WEB layer.

Main application technologies: JSP, TagLib, JavaBean, XML, etc.

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

Brief description: this is an open-source project of APACHE, which is widely used at present. Based on the MVC mode, the structure is good and Based on JSP. In Jbuilder8, STRUTS1.02 has been integrated.

Briefly describe the example of combining WAF with STRUTS: STRUTS for the WEB layer and WAF for the EJB layer:

JSP (TagLib) --> ActionForm --> Action --> Event --> EJBAction --> EJB --> DAO --> Database JSP (TagLib) (forward) <-- Action <-- EventResponse <--

Turbine:

Main Application: WEB layer.

Main application technologies: servlet, etc.

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

Brief description: this is an open-source project of APACHE. Based on SERVLET. It is said that the speed is relatively fast, and various services are provided based on the service (pluggable implementation pluggable Execution Component) method.

COCOON:

Main Application: WEB layer.

Main application technologies: XML, XSP, servlet, etc.

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

Summary: this is an open-source project of APACHE. XML-based and XSP-based (generally speaking, XSP is a dynamic XML document formed after Java program segments are added to XML static documents .). It can interact with a variety of data sources, including file systems, databases, LDAP, XML resource libraries, and network data sources.

ECHO:

Main Application: WEB layer.

Main Application Technology: servlet

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

Brief description: an open source project of nextapp. Based on SERVLET. The page can be very beautiful. Combined with echopoint, you can make a lot of graphic effects (jfreechart package is used in it ). Use the SWING idea for web pages and use HTML as a JAVA class. However, when a large number of sessions are used, there are a lot of page frames, which consumes a lot of system resources.

JATO:

Full name: sun one Application Framework

Main Application: WEB layer.

Main application technologies: JSP, TagLib, and JavaBean

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

Brief description: this is a commercial framework launched by SUN. It is known that it is based on sun one's platform. I downloaded JATO2.0 and looked at it. It seems a bit simple. I used JSP + TagLib + JavaBean. As his DOC says, JATO is suitable for small WEB applications.

TCF:

Full name: Thin-Client Framework

Main Application: java gui.

Main application technologies: JAVA application

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

Summary: this is a framework developed by IBM. Based on the MVC mode and JAVA Application. I recommend an introduction to: 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.