Design patterns in Spring Boot projects

0

In the last 12 months I've worked and studied to learn how to create REST APIs with Spring boot, before that I worked with php MVC programming to create web systems and now in my "migration" to Java using Spring I'm having doubts / Difficulty to understand if Spring uses some kind of design pattern and what would it be?

Generally I create classes that follow the order: RestController - > Service - > Repository and Domain and DTO classes for entities and entity conversion / formatting

Can this structure I'm using be considered a design pattern? What would it be?

I think that because I am self-taught I continue with this simple doubt in relation to the most personal people!

    
asked by anonymous 20.11.2018 / 20:55

1 answer

2
  

Can this structure I'm using be considered a design pattern? What would it be?

Yes. This pattern you are using is very close to what they call the Transaction Script Pattern .

It is a simple question, but the vast majority of practitioners are not aware that this is an existing model and that it even has a name or often does not even know that There are other ways to organize the application .

I believe that its popularity is due to the fact that it is simple to understand, apply and be a model that meets well most applications, such as explained by Fowler :

  

The glory of Transaction Script is its simplicity. Organizing logic this way is natural for applications with only a small amount of logic, and it involves very little overhead either in performance or in understanding.

    
21.11.2018 / 16:02