I am currently developing a huge project in my company with N-Tier Layer architecture using spring boot but I can not sure about the package and class namings. In our project, we have a complex structure. For example, we have to call oracle plsql procedure/function, pure sql, jpa with basic jpa repositories, web services calls(soap/rest) because of the requirements. For example;

  • I have to call procedure/function/pure sql with RestTemplate
  • I have to call rest web services with again RestTemplate

What is the best approach for naming the returning results, classes?

When a client calls a web service in our project, we decided to name the request XRequest, later we map the request objects to the XInput(it contains headers etc.) object with our necessary parameters and passed them to the service layers.

In the service layers, we call necessary other layers.

In these layers, after calling the other layers and returning the results, the procedure call, we map it to the XOutput in the Service Layer with required parameters, we passed XOutput to the Controller Layer, and the Controller Layer map the results to the XResponse objects with the required parameters.

enter image description here

In the above sample structure, what is the best approach of the returning objects’ naming in the Web service/custom repositories. What is the naming of the Class naming(such as Custom Repositories, DaoFactory etc.). What should the naming of the web service call returning objects?

To sum up, in this kind of unstructured project, what is the best approach to the naming conventions of the classes and packages.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.