Mobile App architecture model and mobile app Architecture

Source: Internet
Author: User

Mobile App architecture model and mobile app Architecture
Mobile App Architecture

This paper mainly summarizes several common architecture models, the basic is progressive layer, reprinted please note the Source: http://blog.csdn.net/uxyheaven

Using different architecture modes in different lifecycles of an app can effectively improve development efficiency.

Basic MVC

Mobile apps generally adopt the classic mvc Architecture.

Level Function Design principles
Model) It encapsulates a series of data of an application and defines the logic and computing rules for operations and processing the data. Feedback to the Controller through C: Notification and KVO
View) A view object is an object that you can see in an application. view objects know how to draw themselves and respond to user operations. one of the main purposes of a view object is to display the data in the application model object and allow users to edit the data. You cannot directly operate on the model layer in a view. You can use target-action, delegate, dataSource, and controller to provide feedback.
Controller Layer) The Controller layer is the intermediary between the view layer and several model layers. C. You can directly operate on the model layer and view layer.

Conclusion: C for M: APIC for V: OutletV for C: Target-action, Delegate, DatasourceM for C: Notification, KVO

MVC optimized version MVVM

MVVM adds a View Model on the basis of MVC: it represents the logic and converts the data of the model to what the view can present.

L3 Architecture

Let's take a look at the classic three-tier architecture.

From top to bottom:

  • Presentation layer (UI)
  • The business logic layer is also called the domain layer (BLL)
  • Data access layer (DAL)
Level Function Design principles
Presentation layer (UI) Displays specific business data to users and collects user input Information and Operations User-oriented, concise; does not include any business-related logic processing
Business logic layer (BLL) Obtain data from the DAL and display it in the UI; obtain user commands and data from the UI, execute business logic or write data to the data source through the DAL As a bridge between the U layer and the D layer, the objective is to display a clear function structure. It is only responsible for data processing and transmission, and does not involve SQL statements and ADO. NET.
Data access layer (DAL) Directly operate on the database and add, delete, modify, and search for data. Specifically, it provides data services for the business logic layer or presentation layer. Special operations on the database, regardless of Data legality. The database error returns-1, the logical error returns 0, and the cause of the error is notified. if the error is successful, 1 is returned.

Then, our current architecture is


4-layer architecture

The business rule layer is added on the basis of the three-tier architecture. The common three-tier architecture combines the business logic and business rules into one layer, collectively referred to as the business layer. the proposal at the business rule layer can not only process illegal information entered by users in a timely manner, but also handle database errors in a timely manner. This increases the structure definition of the business logic layer and enables business logic personnel to concentrate on logic.

From top to bottom:

  • Presentation Layer
  • Business Rule Layer
  • The business logic layer is also called the domain layer.
  • Data access layer
Level Function Design principles
Business Rule layer (ECL) Check the validity of parameters passed in the UI Layer. User-oriented, concise; does not include any business-related logic processing
Five-layer architecture

Generally, our business logic is placed on the middle layer. Therefore, the calling tasks of different classes with various internal types and different usage methods are completely stored in the presentation layer. this will inevitably increase the amount of code in the presentation layer, complicate the tasks in the presentation layer, and is not commensurate with the tasks in which the presentation layer only accepts user input and returns results, the coupling between layers is increased. therefore, we need to add interfaces to manage these businesses in a unified manner, which is the idea of the Facade mode in the design mode.

From top to bottom:

  • Presentation Layer
  • Business appearance Layer
  • Business Rule Layer
  • The business logic layer is also called the domain layer.
  • Data access layer
Level Function Design principles
Business appearance Layer Provides a consistent and simple interface for a group of interfaces in the sub-system.  
Rookie VIPER

Viper is not mentioned here. Please search for it by yourself



What software is better to design a mobile app product prototype? Is it especially troublesome to use axure for design?

Generally, you can use balsamiq mockups to design the first draft. If you want to learn more about it, we recommend that you use axure.

The product prototype is whether you can express your ideas in place. Sometimes you can even hand-draw your ideas to your project team members through paper.

Ask how to build the IOS app development program architecture

I recommend you read a book titled objective-c Programming in IOS Design Pattern Analysis
 

Related Article

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.