iOS Project schema documentation

Source: Internet
Author: User

The design of the project architecture primarily refers to the MVVM+MVC architecture, and is graded with functional modules. The following is the directory structure.

Primary directory:

  

All we need to do is focus on the directory under the Sgzh folder, other directories managed by Xcode. You can see that this directory is the project's primary directory, and our development process only needs to manipulate the files in the primary directory, which is divided into 3 chunks:

Appdelegate:appdelegate is the program portal, the program start and display logic are defined internally, the main can let the developer quickly find the proxy file and understand the program from boot to display process, also can quickly do some initialization test.

Resource: This directory mainly contains project resource files, such as Project transduction, audio, video, coredata data, etc.

Class: Store The code file we wrote.

Supportingfile: Project configuration file.

Info.plist, MAIN.M, PCH files.

Second Level directory:

Resource directory: A relatively small transduction is placed inside the assets, and the folder is divided into functional modules. If the larger diagram, such as the Start page, the boot page, you can create a new corresponding function module folder in the directory to store. Other audio video files can be created corresponding to the name of the folder to store.

The class directory:

  

Category: Project classification file.

Macro: Project Global header files, global macros, and constants

  

  Other: Some other configuration files, such as the network request API

Main: Project major files, global shared files, and some base classes

  

Tool: Project tools such as Web request tool, caching tool, app management tool, etc. Vendor: A third-party library that the project needs to manually introduce.

  

Sections: Project function module grouping.

  

Can be divided by the corresponding tab at the bottom tabbar, if there is a login, new features and other relatively large functions, can also be divided into a module. If the sub-modules within the module function more, it can also be divided into a sub-module inside. Each module is divided into 4 folders, respectively, to store the corresponding controller, Model, View, ViewModel. As far as I know, most enterprise iOS projects will pick similar schema patterns. Personally, the architecture is clear, readable, and each module folder is relatively independent, and developers are relatively focused on developing their own modules.

The above for my work on the development of iOS has summarized some of the project architecture experience, if there is insufficient or can be improved to propose changes.

iOS Project schema documentation

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.