Application Folder Structure
Source:: The Software Architecture Handbook (freecodecamp.org)
This refers to how you organize your code, i.e. your folder structure and modularity.
# All in One Place
All of your files are placed in a single folder.
For small applications, it is fine. But when our codebase starts getting bigger, it adds unnecessary complexity as it is confusing and harder to follow.
# Layers Folder Structure
Layers architecture is about dividing concerns and responsibilities into different folders and files, and allowing direct communication only between certain folders and files.
# MVC Folder Structure
MVC is an architecture pattern that stands for Model View Controller. We could say the MVC architecture is like a simplification of the layers architecture, incorporating the front-end side (UI) of the application as well.
Under this architecture, we’ll have only three main layers:
- The view layer will be responsible for rendering the UI.
- The controllers layer will be responsible for defining routes and the logic for each of them.
- The model layer will be responsible for interacting with our database.