Differences between software architecture, architecture, and framework

Source: Internet
Author: User

Introduction to software framework
Reusable "semi-finished products" software for a certain field (including business areas, such as ERP, and computing areas, such as GUI), which realizes the common part of this field, it also provides a series of well-defined variables to ensure flexibility and scalability. It can be said that the software framework is the software of the domain analysis results and the template of the final application system in the domain.
With the expansion of software scale, wide application and the development of software reuse technology, there are many shortcomings in Software Reuse Based on subprograms or classes: (1) sub-libraries become increasingly large, making it difficult for users to master. (2) Most classes have a small granularity and often cannot complete useful functions. This problem forces people to think about a group of classes (or modules) and their interactions as a whole in reuse, which leads to the emergence of a software framework.
The software framework consists of at least the following components:
(1) A series of computing modules are called components.
(2) relationship and interaction between components.
(3) A series of variable points (also called hot spots, hot-spots, or adjustment points ).
(4) variable point behavior adjustment mechanism.
Through the behavior adjustment mechanism of the software framework, developers can bind the software modules specific to specific applications in the field to the variable points of the software framework to obtain the final application system, this process is called an instance of the software framework ). Through the use of the software framework, developers can focus on the development of specific modules of the application, thus greatly improving the software productivity and quality.
The behavior adjustment mechanism of the Software Framework refers to the methods and rules used to adjust the variable part of the framework for specific applications and add specific application modules to the variable points. Behavior adjustment mechanisms can be divided into four types:
(1) template parameterization. The software framework provides an automatic code generation tool that automatically generates the required code based on the parameters set by the user.
(2) Inheritance and polymorphism. Through subclass inheritance and overloading in object orientation, add new functions to the subclass or change the behavior of the parent class.
(3) dynamic binding. The required object services can be dynamically bound at runtime through software mode technology.
(4) component replacement. By replacing pluggable components in the framework to add business-specific functions,
Unlike General reusable software products, an outstanding feature of the software framework is the inversion of control. During the reuse process, the former needs to be explicitly called, the control is in a specific module of the application, but the software framework is not. As long as the application developer binds a specific module of the application to the framework, the Framework automatically calls the module based on its own interaction mechanism, the framework is responsible for the control.
There are many types of software frameworks. It can be divided:
(1) system infrastructure framework. It is used to simplify system-level software development, such as operating systems, user interfaces, and language processing. Typical examples include macapp and Microsoft's MFC.
(2) middleware integration framework. It is used to assemble distributed applications and components. Typical examples include Microsoft's DCOM, Alibaba oft's RMI, And OMG's CORBA.
(3) enterprise application framework. It is used in various application fields, such as telecommunications, manufacturing, and finance.
It can be divided:
(1) white box frame. Supports white box multiplexing. Large class libraries or sub-libraries usually provide white box frameworks to help reuse.
(2) Black Box framework. Black box reuse is supported. The middleware integration framework is generally a Black Box framework.

The architecture and architecture is also known as the software architecture ). the architecture generally consists of three parts: component, used to describe computing; connector, used to describe the connection part of the component; configuration, component and connector constitute an organic whole. for more rigorous and accepted definitions of the architecture, see <Introduction to software engineering technology> (Science Press ). the differences between architecture and framework are as follows:
1. The presentation form is different. The presentation form of the architecture is a design specification, while the framework is the program code.
2. different purposes. most of the primary purpose of architecture is to guide the implementation and development of a software system, and the primary purpose of the framework is to reuse it. therefore, a framework can have its own architecture to guide the development of the framework. Otherwise.
3. There is a special architecture. The primary purpose of DSSA (domain-specific architecture) is to reuse it.
4. there is something called the architecture style. After it is implemented using program code, it becomes something like CORBA and COM. The two are called the architecture framework, also called the middleware integration framework, some people want to call it object-oriented middleware.

What is a mode? What is a framework? (Brief description)
-Ub ([email protected]) 2003-6-6
Patterns and frameworks are everywhere in software design. A friend once asked me what is the mode? I am also studying and give the following summary about my learning experience. (Note: personal opinions are for reference only. please correct me .)

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 is the "Gang of Four". It refers to the four Erich Gamma, Richard Helm, Ralph Johnson, and John vlissides in this book. 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.
Free of charge.

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.
Free of charge.

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.
Free of charge.

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.
Free of charge.

Echo:
Main Application: web layer.
Main application technologies: servlet, etc.
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.
Free of charge.

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.
Free of charge.

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
Fee: License for each enterprise: USD 2000.


5. In fact, the purpose of this article is to "inspire others". I hope you can list the features and sources of various frameworks for your reference and selection.


Related Article

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.