ESIMPLE Based on Open Source Software WEB Application Development Kit

xiaoxiao2021-03-06  113

Writen by libo

table of Contents

1 What is ESIMPLE? ... 2

1.1 Core concept ... 3

2 software structure ... 3

2.1 lightweight component container ... 4

2.1.1 Component 4

2.1.2 Service ... 4

2.1.3 Container 5

2.1.4 Distributed Expansion ... 5

2.2 MVC Framework. 6

2.2.1 Support multiple view technology ... 6

2.3 Data Access Layer ... 6

2.4 selection ... 7

2.4.1 Main components ... 7

3 development practice ... 7

3.1 Agile Software Development Declaration ... 7

3.2 Principles follow the agile process: ... 8

4 development tools ... 8

4.1 Recommended plugin ... 8

1 What is ESIMPLE?

With the development of information technology, enterprise-class applications have entered the era of web applications. With the maturity of J2EE technology, a large number of key business, such as the BOSS of the telecommunications industry, the centralized trading system of the securities industry has a J2EE-based successful case. However, due to the complexity of the enterprise application itself, inherent complex complexity of multi-layer architecture, the difficulty of enterprise-class application software projects has increased.

Complex issues often do not have simple, unilateral solutions. To improve the success rate of enterprise-level applications, improve the productivity of software developers, produce high quality software products, must be considered from the following three aspects.

Software Architecture

Development Process

development tools

Web application

When the size of the software system is low, the quality is directly controlled by the program. When scale, complexity increases, the design of the entire system structure is more important than the design of the algorithm and data structure. Software architecture covers the overall control structure of the system; the function is assigned to each design component; entity layout; extension ability and performance. Software architecture is an abstract mechanism for clarifying design meaning, providing design and analysis of the basis for improved maintainability, providing decisions, and reducing the full information needed to reduce risk.

It is undeniable that the most important issue for software development is also the organization of personnel, and this problem maximizes the success or failure of a software project. Re-excellent software design If there is no good software process as support, it cannot be implemented.

For the choice of software development process, there is no best, only the most appropriate. Agile process, or, in software development methodology, a software development methodology, guided by agile thinking. Provide good practice guidance for the development of commercial applications.

At present, open source software has covered the whole process of software development. Many excellent Open Source software have been developed by excellent software technology teams, with a large number of user bases, complete document support, have passed a large number of actual projects. For users, using open source software can only meet the cost requirements, but also guarantee the high reliability of the software.

The ESIMPLE development kit is integrated with excellent open source software, forming a complete software architecture and supporting the integrated development environment of the architecture. At the same time, supplemented by the best practical experience in agile process. Provide a full range of web application solutions.

1.1 core concept

l Lightweight

Lightweight solutions can meet most of the applications. If necessary, the solution to the "heavyweight" will not be a difficult thing.

L simple

The best design is not comprehensive, and you can't add things, but you can't remove anything.

Esimple should be guaranteed anyway: The entire system should be installed within 10 minutes. Developers using Esimple should develop successfully the famous Hello World example within 30 minutes after installation.

l practical

Do not pursue the latest technology, the most comprehensive solution. The evolution of the business demand drive architecture, through the refactor to improve the system architecture. 2 software structure

Currently, a complete web application software architecture is divided into three levels: representing a layer, a business logic layer, and a data access layer.

Represents the design leading ideology of the layer is the famous MVC mode, and almost all representation of the layer architecture is based on MVC.

In the design of the business logic layer, the idea of ​​componentization is dominated. Moreover, during the specific development practice, heavyweight components like EJB gradually restrict the scope of its use due to its development and deployment of complexity. Some lightweight component containers based on simple JavaBean component technology have been widely used. The famous Avalon, Spring Framework, PicoContainer, such as Apache organizes, has actual project applications. Its advocated IOC design principles have also been widely recognized.

For most web applications, the main tasks of data access layers are to minimize dependence on specific database systems. At the same time, high development efficiency can be provided. For many applications, it is not enough to rely on the O / R mapping tool. It also needs to make the necessary package for standard JDBC to form a good JDBC tool class library.

2.1 Lightweight Component Container

2.1.1 Component

In ESIMPLE, Component uses standard Java Beans. No additional interface is required. This maximizes the versatility of components, reducing the cost of the Java program transplant.

The life cycle of components is divided into registration, initialization, service call, and logout four phases.

2.1.1.1 Singleton or Not Singleton?

There are some famous Frameowork, such as Turbine, PicoContainer, implement the components or services to the Singleton mode. This approach has a certain benefit. However, we believe that in some extremely special circumstances, everything is Singleton's approach has a certain difficulty to meet the requirements. Therefore, a good implementation should be that the components exist in Singleton in most cases. However, it is allowed to create an object when the component is invoked in the case of specifically indicated.

2.1.1.2 Why Not Script IT?

OFBIZ provides a function of writing a service using a special scripting language. This feature has its benefit. But improper use, will only increase the complexity of the problem. Therefore, support for support for scripting languages ​​is currently not considered.

2.1.2 Service

For the call of the service, use the same way as the calling service component. Service is divided into basic services and business services.

2.1.2.1 Basic Services

l Cache Service

l logging service

l Naming Service

Provide JNDI Naming Contexts. Service

l pool service

l Template Service

Provide support to Velocity Template language

l XML-RPC Service

Supports remote call via XML-RPC.

2.1.2.2 Business Services

l Scheduler Service

l Security Service

Permissions Control Service Based on RBAC (Role Bases Acess Control).

l Config Service

Provide a standard XML profile resolution service.

l Upload Service

Manage Multipart / Form-Data file upload

l Crypto Service

Provide basic encryption / decryption algorithm support

2.1.3 The main role of the Container component container is:

l Component registration release. Includes registration and lookup functionality of the component.

l Component lifecycle management. Responsible for maintaining the status of the component

l Maintenance of relationship between components. There is a certain reference relationship between components. The component container is responsible for processing the relationship between components and the order of initialization.

l Basic service management.

All of the components are called by the component container. This approach has significant advantages over the direct initialization of JavaBean, which greatly increases the flexibility of the system. At the same time, it has a great advantage for the expansion after the system. For example, an AOP mechanism that can be transparent to adapt to complex needs.

2.1.4 Distributed Expansion

About how to use EJB, more is a concept of ideas. Many people treat EJB as the core of J2EE, think that the Java program using EJB is completely J2EE based on J2EE. However, from the perspective of project development practice, J2EE is a multi-technical aggregate. EJB is just one. Otherwise, the blind use of EJB technology is "not the case of being wider strict."

When actual needs require a distributed system as an implementation, EJB will be an optimal choice. In the case of the following cases, EJB will be a recommended technical choice:

l The part of the application requires remote access.

l Need to support multiple client programs, such as CORBA client calls

l When you implement Message consumers when you asynchronously communicate mode, Message-Driven Beans is a good implementation.

l The transaction management using EJB Container will bring obvious convenience.

For OpenSuie, choose a coarse granular EJB policy. That is, the Façade mode is used, and when the characteristics of the EJB are required in the above or special circumstances, the entry programs for the establishment container are session beans. As follows:

2.2 MVC Framework

Esimple's requirements in MVC Framework are:

l The business logic is independent.

l Convenient to integrate with the background component container.

l Have Page Flow Administration and View Layout Management.

l Have a good expansion mechanism.

In MVC Framework, there are several very good solutions that meet the above requirements.

2.2.1 Support multiple view technology

In the implementation of views, JSP is not the only choice, and there are many excellent template techniques to be replaced. Velocity is one of the representative. Template language has an advantage of simple running, high efficiency. Therefore, in View can provide support for template language, providing a variety of optional view technologies.

2.3 Data Access Layer

In the data access layer, there is a great advantage to provide database access through a highly efficient O / R mapping tool. O / R mapping tool allows developers to avoid writing cumbersome underlying JDBC code while giving programs to get rid of database dependencies.

However, it is undeniable that the very mature relational database technology has an unplanned advantage in a number of problems. Attempting to block all the details of the background database access by a single O / R mapping tool is not feasible. Therefore, it is necessary to encapsulate the JDBC interface to form a standard JDBC tool class library.

Therefore, in the data access layer, two types of interfaces should be provided: the statically access interface based on the O / R mapping tool and a dynamic interface based on the JDBC tool class library.

2.4 selection

According to the above ideas, the current mature Open Source project is analyzed. Finally, choose the following items

l MVC Framework: struts1.1

lightweight Component Container: Spring Frameworkl or Mapping Tool: Hibernate

For MVC Framework, there are several worth research, such as WebWork, etc., but Struts is undoubtedly dominated. The resources about Struts are everywhere. There are also many tools that support Struts. Successful cases using Struts is all. And some other Framework's documents are relatively small, and the special book is scarce. Therefore, Struts finally selected.

2.4.1 Main components

Among them, ActionServel, ActionMapping, ActionForward, RequestProcessor is the component of Struts, but it is necessary to extend the RequestProcessor to support find components from Component Container.

BeanFactory provides the function of the basic component container for the Spring Framework component.

SessionFactory is a factory method for obtaining Hibernate's session.

Action is a component that implements business logic. Inherit the Action class from Struts.

3 development practice

Through our development practice, we believe that agile process provides good practice guidance for the development of commercial applications.

3.1 Agile Software Development Declaration

l Individuals and interactions over the process and tools

l The software that can work is better than the face-oriented document.

l Customer cooperation is better than contract negotiations

l Response change is better than planning

3.2 Principles follow the agile process:

l We prefer to make our customers satisfied through as early as possible.

l Even later, it is also welcome to change demand. Agile process uses changes to create competitive advantages for customers.

l Software that regularly delivered it can be worked, and the interval delivered can be delivered from several weeks to a few months, the shorter the time interval delivered, the better.

l During the entire project development, business people and developers must work together every day.

l Build a project around individuals that are embraced. Give them the required environment and support and trust them to complete the work.

l Inside the team, the most effectively and efficient way of transmitting information is the face-to-face conversation.

l Working software is the primary schedule metric.

l The agile process advocates sustainable development speed. Responsible persons, developers and users should be able to maintain a long-term, constant development speed.

l Constantly paying attention to excellent skills and good designs will enhance agility.

l Simple is the most fundamental.

4 development tool

Eclipse is an open source framework introduced in November 2001, allowing different developers to be compatible with different tools in the same development environment. It provides a standard IDE and an excellent extension mechanism. By integrating Eclipse and its plug-ins, provides a complete development, test, version control, code generation platform, providing good support for the software architecture of ESIMPLE.

In the 1.2 version of ESIMPLE FRAMEWORK, we are ready to provide customized Eclipse Plugin

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

New Post(0)