Chapter 5. Coding Best Practices
In the previous chapters, we learned about Patterns that help us design objects and object elements. Now, we will start adding code to make them work together.
There are Design Patterns about structuring code, but most of the things that we will discuss in this chapter are considered best practices for writing code. Some of them are fundamental basics of object-oriented programming (OOP), such as Encapsulation, although Encapsulation is older than OOP and applies to Microsoft Dynamics NAV as well.
Good coding practices will improve the maintainability of your application, and make it easier to work with a team of developers on the same application, or share the code outside of your team. The latter is very common in the Microsoft Dynamics NAV ecosystem, and starts with Microsoft sharing their code with NAV partners. Partners then again share the code with other partners and also customers. Microsoft Dynamics NAV is a popular ERP system with...