Answer the question
In order to leave comments, you need to log in
Why are files/classes grouped by layers in a project (ModelLayer/UILayer, etc.)?
The structure usually looks something like this:
models
----UserModel
----NoteModel
controllers
----UserController
----NoteController
ui
----UserView
----NoteView
Answer the question
In order to leave comments, you need to log in
Standard MVC Model .
Recently, I prefer to break into logical blocks like this:
Users
-- Controllers
---- UsersController
-- Models
---- UserModel
-- View
---- UserView
-- Services
---- UserRegistrationService
Notes
-- Controllers
---- NotesController
-- Models
---- NotesModel
-- View
---- NotesView
So it turns out more compact and more convenient to work with a specific entity.
IMHO, this approach should be abandoned. It came out of Internet examples like this.
Break everything into modules, each is responsible for some kind of decision, and inside already divide into layers as you wish.
Imagine that you have 8000 classes. Will you put them in 3 folders?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question