Comprehensive object-oriented architecture design

zhaozj2021-02-17  51

Comprehensive object-oriented architecture design 1. Architecture This e-commerce system uses the B / S mode system architecture. In order to better reuse tobacco business logic, the overall system structure is strong, weakly coupled, and the entire system should be divided For three layers: interface performance layer, business logic layer, data storage layer.

Since the real world is combined by the object, the system should use object-oriented design and programming to better map the real world to computer applications, making the system more easily and maintained.

Due to various technical conditions, the business logic layer and the data storage layer are now not object-oriented, so how to map the object-oriented business logic layer to the interface performance layer and the data storage layer into the entire system key.

The interface performance layer is based on the prior art, but it is best to use the HTML interface, but because HTML is a process-proof language, how to transform each other with the object, this will introduce the middleware to convert, which can introduce the latest web frame echo, he Make the interface programming for object-oriented, fully shielded HTML, JS, CSS, and other technologies, using inside SWING technology to implement server-side event processing mechanisms, so that the interface performance layer is well connected to the business logic layer.

The data storage layer is limited by database development, and the mainstream database is a relational database, which is clear how to convert between the relational database and objects, and involve the middleware. This intermediate piece can adopt an O / R mapping framework JDO. JDO converts objects and tables to each other, blocking underlying technologies such as databases, thus making objects easier.

Second, the interface performance layer design interface performance layer is used as system input, output interface, under the limitations of the prior art conditions, generally used HTML mode, because HTML is a process-oriented process, and it is difficult to use object-oriented programming. The performance layer logic code and the performance layer code are mixed together, and the encoding cannot be seamlessly connected to the object-oriented design. The code is not easy to maintain, and the interface layer element cannot be multiplexed.

In order to solve these problems, it is recommended to use the ECHO framework that solves the O / P mapping problem, so that the programmer only needs to write the interface in Swing mode, automatically generates an HTML interface and package, unpacking HTML form data, support server-side events Mechanism, enabling programmers without care of technical details such as form commit, buttons coding, simply handles events directly in the event handler.

The framework allows programmers to use object-oriented programming, not to pay attention to the underlying details of HTML, JS, which can better isolate page and logic, increase system maintenance, and contact object-oriented design, and do interface layer elements Reuse.

Third, the business logic layer design business logic layer is mainly related to the industry-related business logic components, and these components communicate with each other, and calculate the entire system function. Since this system is based on the J2EE platform, JavaBean component specification is used. These components can be used as the system core component, and the design should be correct, scalability, can be used as the company's reuse of assets to ensure that these components can be reused in various similar items in the future.

IV. Data storage layer design data stock layer is mainly used to persist data, and now the mainstream database is a relational database. It is clear how to convert each other with objects, requiring a middleware, which is unreported in this regard.

JDO can transform objects and tables, and can store objects directly to the table, or can generate objects through tables, obviously do seamless conversion of objects and tables, so that the programmer does not have to care about the bottom details of the database, so that the platform can The transplantability is enhanced, the coupling is reduced, and the code write workload is reduced, and the data storage layer component is used to be multiplexed.

V. Supporting tool layer design A system clearly requires some process-oriented tools to provide full system utilities, such as log functions, security features, and more. PS: Please advise, thank you, huh, huh

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

New Post(0)