Skip to content

Development Best Practices

Varun Singhal edited this page Nov 3, 2018 · 3 revisions

Dependency flow constraints

  • Controller can only access the service layer objects.
  • Repository can only be accessed via service layer objects.
  • Entities are the domain model, all the objects depend on them.

Coding conventions

  • Instead of hard-coded queries, use the interface provided by CrudRepository.

Naming conventions

  • Class names - to append the layer's name at the end of their file names. For example,
    • MessageController belongs to the controller.
    • MessageService in service.
    • MessageRepository in the repository.
  • Variable names - to follow camel case.

Comments

  • Comments follow the Java DOC based conventions.
Clone this wiki locally