What is the pattern? What is a framework? (Briefly)
--UB (
Ub5023@msn.com) 2003-6-6
Nowadays, the software design is all models, frames. Some friends ask what is model? I am also in learning, I will give the following summary on my learning experience. (Note: Personal views, for reference only, welcome to correct.)
1. What is the pattern? Mode, ie pattern. In fact, it is a methodology that solves a certain type of problem. You summarize the method of solving a type of problem to the theoretical height, that is, mode. The classic definition given by Alexander is that each mode describes a problem that has emerged in our environment and then describes the core of the solution. In this way, you can use the existing solutions countlessly without counting the same job. There are different fields in the model, and there are architectural models in the building, and there are also design patterns in the software design. When a field is gradually mature, there will be many modes.
What is a framework? Frame, is Framework. In fact, it is a semi-finished product of some application, is a set of components for you to complete your own system. Simply put to use the stage of others, you will do performance. Moreover, the framework is generally mature, continuously upgraded software.
2. Why use mode? Because the mode is a guide, under a good guide, it helps you complete the task, help you make a good designer, reaching the effect of half the effort. And you will get the best way to solve the problem.
Why use the framework? Because the development of software systems is already complicated today, especially server-side software, design to knowledge, content, and there are too many problems. In some ways, the use of some people's mature framework is equivalent to letting others help you complete some basic work, you only need to concentrate on complete the system's business logic design. And the framework is generally mature, robust, and he can handle a lot of details, such as things such as things, security, data stream control. There is also a framework usually used by many people, so the structure is very good, so the scalability is also very good, and it is constantly upgrading, you can directly enjoy the benefits of the upgrade code. The framework is generally in the middle layer between the low-level application platform (such as J2EE) and high-level business logic.
Why is the software hierarchical? In order to achieve "high polymerization, low coupling". Cut the problem to all solve, easy to control, easy to extend, easy to allocate resources ... there are a lot of benefits :).
3. The following is mainly in Java, J2EE mode and framework: What is the common design pattern? First of all, you have to understand the "design pattern - the foundation of the object-oriented software" book (this can be said to be the programmer must have, pay attention: GOF is not alone, but refers to four people . Its intent is to Gangs Of Four, is the "gang of four", meaning four of the book: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. This book tells 23 main modes, including: abstract factories, adapters, appearance mode, etc. There are still many modes, which are estimated to have more than 100 kinds. There are too many software design patterns, just simply talk about the most common MVC mode. The MVC mode is proposed by Buschmann in 1996: Model: The package data and all operations based on these data. View (view): The package is packaged, that is, the user interface. Control: It is the operation of the package to the model and control of the data flow direction. In addition: RUP (Rational Unified Process) software unified procedure, XP (EXTreme Programming) extreme programming, which is often called "process method", is a methodology of a software project implementation process, which is proposed for the implementation of software projects. Strategy. It is also another angle mode.
4. What is the common Java framework? WAF: Web: Web Application Framework main application: EJB layer, (Web layer is also, but weaker). Main application technology: EJB and other sources: http://java.sun.com/blueprints/code/index.html Brief: This is the framework inside the example PetStore (Pet Store System) used in the J2EE platform. It is the application framework proposed in the Sun Blue Book Example. It implements MVC and other good design patterns. SUN's website has technical information, it is best to download the PetStore to study, WebLogic comes with this system, source code in the BEA / WebLogic700 / Samples / Server / Src / PetStore. This is the preferred framework for learning J2EE. free.
Struts: Main application: web layer. Main application technologies: JSP, Taglib, JavaBean, XML, etc. Source: http://jakarta.apache.org/struts/index.html Brief: This is an open source project of Apache, currently widely used. Based on the MVC mode, the structure is very good, based on JSP. The production of Struts 1.02 has been integrated in JBuilder8. free.
Example of WAF Struts combined with: Web layer Struts, EJB layer WAF: JSP (Taglib) -> Actionform -> Action -> Event -> EJBAction -> EJB -> DAO -> Database JSP (Taglib) (Forward) <- Action <- EventResponse <-
Turbine: Main application: Web layer. Main application technology: servlet and other sources: http://jakarta.apache.org/turbine/index.html: This is an open source project of Apache. SERVLET. It is said that the speed is relatively fast, and various services are available in the way in Service (Pluggable Implementation Pluggable Components). free. COCOON: Main application: web layer. Main application technology: XML, XSP, servlet, etc. Source: http://cocoon.apache.org/2.0/ Brief description: This is an open source project of Apache. Based on XML, based on XSP (popular, XSP is a dynamic XML document formed after joining the Java program in XML static documentation.). Features is to interact with a variety of data sources, including file systems, databases, LDAP, XML repository, network data sources, and the like. free.
Echo: Main application: web layer. Main application technology: servlet and other sources: http://www.nextapp.com/products/echo/ Brief description: An open source project for nextApp. SERVLET. The page can be made very beautiful, combined with ECHOPOINT, you can make a lot of graphics effects (with a JFreeChart package inside). Use Swing ideas to make a web page, do HTML as a class of Java. But a lot of use of session, a lot of Frame, and the system resource consumption is very large. free.
JATO: full name: Sun One Application Framework Main application: web layer. Main application technologies: JSP, Taglib, JavaBean, etc. Source: http://www.sun.com Brief: This is a commercial framework launched by Sun. When you look at the name, you will know that it is launched in conjunction with Sun One. I downloaded Jato2.0 and I feel simple, using JSP Taglib Javabean. As his DOC said Jato is suitable for use in a small web application. free.
TCF: full name: Thin-Client Framework main application: Java GUI. Main application technology: Java Application et al .: http://www.alphaworks.ibm.com/tech/tcf brief description: This is a framework out of IBM. Based on the MVC mode based on Java Application. Recommend a introduction article: http://www-900.ibm.com/developerWorks/cn/java/j-tcf1/index.shtml Charge: Each business object license: $ 2,000.
5. In fact, this paper is "Throwing Tour Yu", I hope that all the experts will ask you to listen to the characteristics of various frameworks, for your reference, choose. If you want to know more about the above details, please go to www.google.com search, if you have other questions to communicate with me, welcome to my forum: http://ub1010.51.net/bbs/