Answer the question
In order to leave comments, you need to log in
How to correctly design the structure of the application?
It has the following structure:
The application has the following entities:
Answer the question
In order to leave comments, you need to log in
oh, you are trying to build something that is not understandable. Judging by the question, you have a set of patterns and not an architecture. What do you want to get as a result? layered architecture? so it's not built like that. DTO is an object for data transfer, it does not store business logic, the repository and Active Record are usually not shared. In general, judging from the statement of the problem, I can say that you do not quite understand how to build such an architecture, so I recommend that you first read about layered architecture (for example, from the same Fowler), about the domain model, about DDD, and then move on to practice. To get started, you can go over these articles to begin with:
article 1
article 2
article 3
article 4
We can only say that the semantics of the folders is correct (daddy is nested in another daddy correctly)
And what more can I say?
It is much more important that you follow the standards of the framework, properly distribute logic between models, make a thin controller, etc.
Usually the logic is dictated by the relational database, if you use it.
Correctly build the database, everything will line up by itself and in the code.
At a minimum, it is worth renaming the same car entities. Either create a caruser for a car user, or cardata (carinfo) for car information.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question