Understanding AL project structure best practices
As we mentioned previously, an AL project is file-based. You have all your .al
files inside a project folder. The main problem that you encounter when you start working on a complex project is how to structure the project. How do we organize the objects and the .al
files?
There is no written rule for this topic. What we could suggest is to avoid having all the objects (.al
files) at the project root level, as shown in the following screenshot:
Figure 3.11: Root-level project structure
Here, none of the objects are organized per business area, and they are only sorted by filename. If you have many objects, your object list will grow. In real-life scenarios, it will typically grow a lot, causing difficulties with handling and maintaining files.
The most sought-after way of structuring your project could be to organize your files by object type, as shown in the following screenshot:
Figure 3.12: Object type...