Maintaining a consistent code base in your application is very important. When dealing with external resources to provide code for your environment it is important they understand what you expect beyond "code that works". It needs to work with everything else you have done. To help ensure I provide the following to everyone to agree to before they provide code.
- All custom development requires an approved functional design and technical design document. These can be part of the same document, but customer sign-off is required before any coding is started.
- Code is to:
- Be written on the CUS layer of the development environment.
- Compile error free.
- Not have any best practices errors.
- Be fully commented including name, date, short description of functionality, and definition of any parameters.
- All custom tables, enums, EDT's, classes, forms, etc are to be prefaced with PREFIX
- Any custom methods on existing items are to be prefaced with PREFIX
- Fields on tables and forms are NEVER to be repurposed. Create a new field as needed.
- Make names as descriptive as possible.
- Use a label file for all labels
- Follow Microsoft X++ Coding standards (http://msdn.microsoft.com/en-us/library/aa855488.aspx)
- Performance:
- All code is to be designed with performance execution in mind. Eliminating unnecessary code calls and validation.
- Any tables created are required to have a clustered index and additional indexes as required
- Code should be tested under expected load and optimized as appropriate.
- Upon completion and unit testing of code, a code review will be completed by our technical resources before moving to the test environment. Any technical issues will need to be addressed before the code is accepted.
- Code Moves
- AX 2009 – Regular code is to be moved via Layer files, not XPO. XPO can only be used for emergency hot fixes.
- AX 2012 – Regular code is to be moved via AX Model Stores, not XPO. XPO can only be used for emergency hot fixes.
- When in doubt, ask a question.