Layering the application
When our application grows, it is going to be more complex to manage the large number of classes that we may end up with. And if we haven't taken care of our application structure, we may end in a situation that may not find the class that we need when we are looking for it.
In this section, we will propose a structure for layering our application and packaging the classes.
Understanding our classes
Let's first look at our current classes in our project:

Current application structure
Currently, if we look at the preceding image of our classes to understand what domain they may refer to, we could divide them into two domains:
- Customer-related classes
- Account-related classes
But if we look at the same image to understand what our classes are, we can classify them into various groups:
- Application classes
- Context configuration classes
- Data classes
- Services interfaces
- Services implementation classes
- Controllers classes
Let's think how we can arrange them using those groups and domains...