iOS Tiered architecture Design

Source: Internet
Author: User

As we all know, there are many modes in mobile design development, the most common one is the single example design mode, MVC design pattern, factory design mode, KVO, notification, agent and so on. The purpose of using design patterns: For code reusability, to make the code easier for others to understand, and to ensure the reliability of the code.
and architecture design is a macro, comprehensive design magic to organize the solution to the entire application system. Architecture design is the product of a subjective mapping of the relationship between elements and elements within a structure. A good architecture design has a good reusability and scalability to meet the changing needs of users.

Design of low-coupling enterprise system architecture

We know that the principle of software design is to improve the "reusability" and "extensibility" of software systems. The system architecture design adopts the way of hierarchy division, the level is low coupling, and the interior of the hierarchy is high cohesion. Such as:

Presentation layer: A collection of components that users and systems interact with. The user either submits the request or sends instructions, the system receives the user's request or instruction, and then moves the request or instruction down one level, eventually returning the result to this layer. The presentation layer is a presentation of user interaction and data and should not have business logic.

The business Logic layer: receives instructions and data for processing the presentation layer, processes the business logic, and returns the result to the presentation layer.

Data Persistence layer: The data persistence layer is used to access the information system layer, that is, access to database or file operations.

Information Systems layer: System data sources, such as databases, files, network data and so on.

This is a hierarchy of the upper and lower layers of the relationship. There is no upper layer without the lower layer. The information system layer is the lowest level, is the foundation of all layers, we should do in the development of the lower layer in the upper layer.

iOS Tiered architecture Design

iOS apps also require architectural design, but not necessarily a tiered architecture design. Generally speaking, the application of information processing mostly adopts the layered architecture design, but the application such as game will not adopt this kind of layered architecture design.

Presentation layer: UIKit framework composition, such as views, controllers, controls, event handling, and so on.

Business Logic Layer: The framework used depends on the business.

Data Persistence layer: Access to network data or local data access.

Information System layer: The source is divided into local and network.

Layered architectures have multiple modes in the iOS platform.
First, we are familiar with the relationship between engineering and workspace, static libraries, and frameworks.

iOS Tiered architecture Design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.