icon_CloudMgmt icon_DollarSign icon_Globe icon_ITAuto icon_ITOps icon_ITSMgmt icon_Mainframe icon_MyIT icon_Ribbon icon_Star icon_User icon_Users icon_VideoPlay icon_Workload icon_caution icon_close s-chevronLeft s-chevronRight s-chevronThinRight s-chevronThinRight s-chevronThinLeft s-chevronThinLeft s-trophy s-chevronDown
UTL

Choose Country

More Resources


File structure is an ever changing spec based on many factors like team size, design pattern, and overall team input. This living document is designed to act as a starting point for exiting and new projects. This will ensure a form of consistency between applications, and ensure smooth management of the project over time.

Feature based folders structure

A feature based folder structure, using MVVM+C, is very similar to using the typical structure that you see in most apps. The key difference being you keep feature based information together.

A typical app most often will typically express their folder as outlined below.

Folder-by-type disadvantages include the following

  • You are forced to jump around folders when creating a feature.
  • You end up with a very large single vertical tree of information, since it lives in the main directory of the project.
  • Removing the feature requires you to be lead by the compiler because references to other types are often spread vastly across the project.
  • Leads to more merge conflicts if you ever want to reorder files

Folder-by-type include the following

  • Very easy to get setup with a small team
  • Typically easier to follow if there are a low number of features

A feature file structure can be expressed like so. The major difference being every feature has the following folders.

Folder-by-feature cons include the following,

  • Typically takes members a little longer to become familiar with.
  • Often requires a little ramp up period to get added to an already existing project.
  • It can be harder to learn what already exists in the app, sometime resulting in duplicate code

Folder-by-feature Pros include the following

  • Easier for larger teams to maintain
  • Easier to remove features when the time comes

The below expresses what this could look like within your app. If it is a file that should be shared with the rest of the app, they should live in the shared directory.

For free consultation on how to organize code files in iOS, click here.

Subscribe Now


Subscribe now for our latest news.

More Resources


From Author


Subscribe Now


Subscribe now for our latest news.