In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the relevant knowledge of "what is the general system mode in the Java program". The editor shows you the operation process through the actual case, the operation method is simple and fast, and the practicality is strong. I hope this article "what is the general system pattern in the Java program" can help you solve the problem.
Plane type
Layering is a general architecture model that helps to divide a complex program into several separate parts. The level is based on the division of their functional modules, each level is responsible for a major function, Packages represents the logical layer. High-level layers can use functions of low-level layers, on the contrary, low-level layers cannot use functions of high-level layers. Table A shows a common level pattern.
Table A
Express
Display program user interface components and process user requests
Range
Responsible for program-specific logical communication
Data source
It is helpful to the communication of some background services, such as database connection, message processing management and so on.
Defining a well-defined layer is very important to the entire program, because a well-defined layer will improve maintainability and usability, which is at the core of the heuristic knowledge we discussed earlier.
When layering a program, the most important thing is to define the association between layers. Subsequently, it is also important to design the relationships between packages. In addition, packags associations are best one-way, because high-level layers can call functions of low-level layers, and vice versa.
The purpose of the layering of the program is to improve the function of multiple calls. In general, low-level layers are easier to call than high-level layers. When using a layer frequently, you can refer to the article ".NET. Com. CN / developer/tech/story/0,2000081602,39067840,00.htm"target=_blank > Java wrapper". Well-defined layers make it easier for other developers to understand and use functions in the program.
However, special attention should be paid to layering. Defining too many layers can lead to the complexity of the program. So when designing layering, you have to think about it carefully.
Division mode
The way of segmentation is to separate the non-central logic part of the program from the central logic part. Like the horizontal approach, the segmentation method uses packages to represent logical associations. Table B shows the two main partitions.
Table B
Vertical
The main functions of data exchange in the program, including exchange process, exchange logic, exchange rules.
Horizontal
Non-main functions of data exchange in the program, including error handling, mail service, database access.
When identifying a split layer, you must pay attention to the main purpose of each separate package. Each level of segmentation can produce meaningful package. When designing packages associations, it is important to ensure that they provide reasonable functions.
In addition, the function of the vertical partition layer generally calls the function of the horizontal partition layer, and the function of the horizontal partition layer can be called within or between programs. The key point is how to centrally use and change the classes. If horizontal functions are called by multiple programs, the most important thing at this time is to consider how to call these independent functions independently.
Joint mode
These two system patterns play a key role in object-oriented programming. In addition to using the layer method and segmentation method independently, the two methods are often mixed in the actual design process, so that the purpose of segmentation can be achieved. Figure An illustrates an abstract association model that divides two levels into two segments, with the direction of the arrow indicating the allowable associations.
This is the end of the content about "what is the common system pattern in Java programs". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.