Recently, a brother to interview iOS development, he talked about, the interviewer asked him how to split the folder structure, and also asked in detail the file name of each subfolder.
The folder structure is really important. The interviewer asked him about his development experience without a doubt. A clear folder structure that lets people know the function of the corresponding folder at a glance. This can also reflect the developer's experience and architectural capabilities.
Now. In the projects I've been exposed to, there are two more general types of structures:
1. The main folder according to the business classification, the internal folder according to the module classification (main folder according to the MVC schema classification. Internal according to project module classification)
长处: can quickly locate the corresponding business.
缺点: module-related classes are too fragmented. Need to switch files back and forth, inconvenient to develop.
2. The main folder according to the module classification, the internal folder according to the business classification
长处: Centralizes the class used for a module. Easy to manage and develop, for beginners. You do not have to switch back and forth in other files to find the corresponding module class.
缺点: It is not well categorized when several modules are common to some classes.
For example, simple book iOS Program folder Classification (unofficial):
- 1. Main folder According to the business classification, the internal folder according to the module classification
- 2. The main folder is categorized according to the module. Internal folders According to the business classification
注意: The above is only a classification of my personal experience, there will certainly be other developers do not agree, or have their own views. I humbly accept the views of you, after all, such resources are relatively small.
There are very few open source projects on the Internet, so we do not have the experience to communicate.
The folder structure of the IOS project shows your development experience