Coding and design guidelines¶
Coding and design guidelines
- Server
- 0. Folder structure
- 1. Naming convention
- 2. Single responsibility principle
- 3. Small methods
- 4. Duplication
- 5. Variables and methods declaration
- 6. Structure your code correctly
- 7. Database
- 8. Comments
- 9. Utility
- 10. Auto configuration
- 11. Keep your
@RestController
’s clean and focused - 12. Dependency injection
- 13. Keep it simple and stupid
- 14. File handling
- 15. General best practices
- 16. Avoid service dependencies
- 17. Proper annotation of SQL query parameters
- 18. SQL statement formatting
- 19. Avoid the usage of Sub-queries
- 20. REST endpoint best practices for authorization
- 21. Assert using the most specific overload method
- 22. General Testing Tips
- 23. Avoid using @MockBean
- Client
- Database Relationships
- Code Review
- STEPS
- 0. Precondition -> only Developer
- 1. Start Implementation -> only Developer
- 2. Implementation is “done” -> only Developer
- 3. Review -> only Reviewer
- 4. Respond to review -> Developer & Reviewer
- Developer
- Reviewer
- Iterate steps 3 & 4 until ready for merge (= all reviewers approve (thumbs up) )
- 4. Merge
- Inclusive, Diversity-Sensitive, and Appreciative Language