R
R
reus2017-09-27 20:01:48
Java
reus, 2017-09-27 20:01:48

How to properly grow a web application written in spring?

Hi all. I am a former python dev (django) but have moved to java.
Our project is an api that is a "deep" backend of one service, but this is not at all about that.
We have complex data filters and they are right in the DAO.
It seems to me that this is not correct and I would like to separate everything superfluous from the DAO, but the question arises where is it more correct to place it?
In REST, I would not want a controller, but if not in it, then where?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aol-nnov, 2017-09-27
@aol-nnov

> DAO
> controllers
there are more services!

A
Alexander Kosarev, 2017-09-28
@jaxtr

Complex filters should be applied whenever possible in queries against the data warehouse.
If there is no such possibility, then it is desirable to place them in DAO.
In general, there is no point in making a problem out of this, much less trying to solve it. The code works, performs its task and does not interfere with the developer, which means that you don’t need to touch it. This is a waste of time, especially when the project is in development. That's when the project is implemented and correctly performs all its tasks, then you should think about refactoring.

spoiler
8nm64g.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question