What is the pattern? What is a framework?

xiaoxiao2021-03-06  59

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 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. Brief description WAF Struts combined example: Web layer with struts, EJB layer WAF: JSP (taglib) ??> anctionform ??> action ??> Event ??> ejbaction ??> ejb ??> DAO ??> Database JSP (Taglib) (Forward)

转载请注明原文地址:https://www.9cbs.com/read-83688.html

New Post(0)