Standards have a positive impact on any business – and software development is no exception. An organisation-wide internal style guide for writing code should be accessible to every development team before starting a project.
Coding standards or coding guidelines make sure that all developers working on a project use certain guidelines for coding. It is important to have those standards as developers read code more than they write. Coding guidelines help to make reading code more straightforward. They also make debugging easier as code based on coding guidelines is more homogeneous and consistent.
Writing coding guidelines for a new system is even more crucial as documentation often doesn’t include coding practices that are suitable for code development based on the new system. When guidelines are defined in a document, rules don’t need to be explained to each developer individually, which saves time and effort. It is also essential for onboarding new developers.
After writing Angular apps since its early versions, I’ve developed my own style, which is strongly influenced by the Angular styleguide, best practices shared by leaders, and simply experimenting with small personal projects.
While working on the Spartacus-based project, I realised that even though our team did implement the Angular style guide, there was no overarching coding standard that covered both coding language (Angular) and the system (Spartacus). Therefore, I believe there is a need for a coding standard that covers both Angular and Spartacus to ensure consistency is maintained. The below Spartacus coding style guide shows best practice examples, common mistakes and tips and tricks to read and write Spartacus code successfully.
full article is available at https://faircg.com/code-stories/spartacus-development-standards-and-coding-guidelines/