D
D
Devil Devil2016-08-03 17:58:07
ASP.NET
Devil Devil, 2016-08-03 17:58:07

How to correctly divide the project into layers?

Good day!
There is a project in which there is only one model class
and such layers:
DAL - class model, data context, repository interface, implementation of repository methods (CRUD operations)
BBl - how to duplicate the repository correctly? there are several models and connections between them
UI and here, controllers, views

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Nemiro, 2016-08-03
@BarkovA

We take the project, we look at the model class, then we look at the layers. We take a sheet of paper and a ballpoint pen with blue ink. We write in calligraphic handwriting:
"Dear B,
Please urgently send me two boxes of nuclear warheads and a can of condensed milk to split my project into layers, because I do not want to see all this horror anymore.
With hope, _signed_ /_decoding_/
PS: I love condensed milk."

---
Seriously, your project - you know better :-)
You can initially analyze everything, weigh it, write a detailed plan and then try to do it. But for this you need to have comprehensive information about what needs to be done. This is a separate task that will require separate time. Ideally, there should be no less time than when developing a plan to send the first astronaut to Mars.
Or do and make adjustments in the process. This option is used if it is not known what needs to be done and how to do it, and if in the process everything can turn upside down, in general, sheer improvisation. If you have enough experience, in terms of time costs, this option can be more economical.
In all cases, without a good implementation, it doesn't matter if there was a plan or everything was invented and evolved in the process. The spacecraft will still fall into the ocean, not even reaching the upper layers of the Earth's atmosphere, at best, it will hopelessly hang somewhere there :-) The option with gradual development will be the best if you look at the issue from the perspective of learning and gaining experience. Build how you want to achieve worthwhile goals. Fitting a project into an inappropriate template can, in some cases, be even worse than chaos and confusion. When you do, look at which template you more or less fit into, draw conclusions about how good or bad it is for a particular task and how it can be done better / easier / faster, how to check out completely (if this option turns out to be acceptable) and reduce the number of collisions.
If the task is commercial, then such a question should not have arisen, at least it should have been implemented on similar resources.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question