J2EE Design Mode Analysis and Practice - Understanding J2EE Technology from J2EE Design Mode

zhaozj2021-02-11  257

Chapter 3 J2EE Design Mode

We have formed a simple understanding of the framework and mode. As a background knowledge, this chapter is primarily understood and understood J2EE design patterns to obtain the full picture of J2EE design patterns. Due to the detailed introduction of the entire J2EE mode on Sun's website, it is not necessary. But there is a picture, according to the intrinsic requirements of this article, it must be seen. From this we will further clear the framework, mode, specific techniques (such as J2EE technology), design a relationship between applications.

(Figure 3)

You can understand this picture:

First, it directly shows the relationship between the mode and mode in the J2EE technical system. In the J2EE mode system to date, the modeling mode is such as such, and they are distributed at unhafficated levels of J2EE technology, interacting with each other with interaction with the interaction between the hierarchy. It is worth emphasizing that this is the J2EE mode of J2EE. The new design mode will continue to appear as practical. More interesting is the mode of division and abstraction design, which is the degree of designation method, which gives people a sense of elemental table. I am afraid that there will be the utility of elemental cycle table in practical practice, promoting new models. What about it.

Second, it reflects that J2EE technology is a framework software. The framework can be considered a package suitable for a certain area. This package provides a solution for various problems in the field. J2EE is a framework software that provides a set of APIs for enterprise-class computing. This framework software is reflected in something similar to workflows, a business solution order from beginning to end.

Again, it implies the flesh and blood before the framework and design mode. The frame is blood, is the skeleton, the design pattern is meat, the meat is attached to the blood and the skeleton, and there will be various design patterns in the framework. The design pattern is a fine-grained element with an ophthalmic view of the architecture, while the frame is coarse particle size. The design pattern is an important component of the support architecture. This is a building design, which requires architectural architectural design when architectural design; construction, construction rules and patterns. Under the framework of J2EE, "Elements" currently covering is 15, of course, the elements that have not been discovered are objective.

Finally, it contains the concept of programming in the application. Essentially design a good scalable application itself is to design a framework structure. However, this framework is in another layer of frame. If the J2EE technology is used, this is a class in the J2EE technology (framework) system. We can design many frameworks suitable for more specific applications based on J2EE technology. A good frame design can bring us any benefits brought by J2EE, with the features they have; this can be more convenient to develop, more efficiently reuse. That is, excellent frame design is often the concept of design model, and a large number of design patterns are designed. In fact, there is already a lot of open source organizational, with strong frame structures, such as Cocoon, Struts, etc. Inside the frame can of course only use several types, even not using design mode, after all, design mode is just bricks. Do not use, how much use depends on the system characteristics you have to build and your design concept. That is to say, simple frame structure can be cured into a non-expandable and reuse application - such a design is generally only a technique of technology, and there is no scalable.

The fourth chapter applies the model to the actual project

One of the benefits of the model is to let you analyze from the system, understand your own and others, and get your opportunity in the design code.

In addition, the design of the model is designed to naturally appear many advantages: you can get inspiration of system design, design your own frameworks and even system, now there are many organizations and individuals to do this, such as Struts, etc. Homeway is similar to the organization. Make your own system more secure, flexible, maintainability - every point mentioned can develop more, better applications in a shorter life cycle.

Conversely, if you don't have a systematic mode idea, don't need to design the system, it is likely that you will hang a leakage when you design your own system, and there is a vulnerability. Below is an example of a hidden universal: This is an internal web page (electronic vanity can see the presentation), which is an app based on J2EE technology, and the background server is a BEA WebLogic Server. According to safety, you should only visit users (rather than registered users more than any user) can access and use, otherwise spam or even other security issues. So there is a security control mechanism at each sub-page. The method of control is to add an authentication module to each page accessed, which ensures a simple session judgment every time the page is accessed. If you have the idea of ​​J2EE design patterns, it is not difficult to solve this problem: the front-end controller mode is a good choice. However, anyone who knows the absolute domain name can access this page without constraints, and do some unsuccessful operations, more terrible is that these operations have not even in normal circumstances. limit.

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

New Post(0)