Design of low-coupling enterprise-class system architecture
We often call Java EE or. Net developed products as "systems", while mobile platforms (primarily: Android, iOS, and window Phone) develop products for "apps." "System" is more complex, requires architectural design, and "application" relatively simple, does this mean that we do not need to consider architecture issues?
Let's first take a look at enterprise-class system architecture design. The principle of software design is to improve the "reusability" and "scalability" of the software system, the system architecture design adopts the hierarchical partition method, these levels are loosely coupled, and the interior of the hierarchy is high cohesion. Reducing coupling is the goal of software design, can design a low coupling system, it means that our system has "reusability" and "scalability." Common low-coupling Java EE and. NET Enterprise system architecture diagrams.
The presentation layer is a set of components that the user interacts with the system, through which the user submits a request or sends a command, through which the system receives the user's request or instruction, and then the instruction is digested and absorbed, then the next layer is called, and the result of the call is presented to this layer. The presentation layer should be frivolous and should not have business logic.
The business layer is the core business processing layer of the system, responsible for receiving the instruction and data of the presentation layer, digesting and absorbing, carrying out the process of organizing business logic, and returning the result to the presentation layer.
The data persistence layer is used by the service layer to access the database layer, from the design specification to reduce the coupling degree, the service layer should not have the code to access the database, and the code to access the database should be put into the data persistence layer.
Information System layer, is the data source of the system, can be database, file, legacy system and network data.
Layered architecture design of mobile platform
The application of mobile platform is to reduce the version of the system, it also requires architectural design, but not all applications must be based on a common, low coupling enterprise-class system architecture, which generally involves information processing applications to use this architectural design pattern, for example: some games have their own game engine, engine also belongs to the architecture design. The iOS platform General Information processing application layered architecture design diagram.
The presentation layer, the presentation layer in iOS is made up of the Uikit framework, which includes the views, controllers, controls, and event handling that we have previously learned;
Business logic layer, what framework to use according to the specific business, but generally has a certain business processing functions of the objective-c and C + + encapsulated classes, or C package functions.
Data persistence layer, provide local or network data access, it may be access to SQLite data API functions, may be coredata technology, or access to file Nsfilemanager, or network communications technology, what way to see the information System layer is what.
Information systems layer, in terms of iOS, its sources are divided into: local and network. Local data can be placed in a file or in a database, and the current iOS local database uses SQLite3. A network can be a cloud service, or it can be a generic Web service.
Layered based on the same project
Architecture has a real meaning for our iphone and ipad development. If we're going to write a "my Memo" application based on iOS (iphone and ipad two platforms), it has the basics of adding, removing, and querying memos, "Memo" Application case diagrams, layered design, and the presentation layer can have different iphone and ipad versions, and the business logic layer , data persistence layer and information system layer can be shared. This can greatly reduce our workload, which is the benefits of tiered design.