Answer the question
In order to leave comments, you need to log in
What is mvc pattern really?
I have been engaged in web development for more than 8 years, of which 5 years of commercial experience.
Due to the specifics of the industry in which I work (cms with the letter B ), I did not have to deal with the mvc pattern.
There were many attempts to figure it out, I read tons of articles of the same type, where the whole essence of the pattern is described by a similar scheme:
but nothing is clear.
I want to figure out what entities, where we take out, for what, etc. , preferably on different examples.
Some articles mention different layer architectures like:
controller-service-repository
repository-service-controller-view
и т.д..
repositories
services
views
controllers
entities
и т.д.
Answer the question
In order to leave comments, you need to log in
Put this solution on the basis of the Laravel framework - laravel-boilerplate.com
This is an application framework with some ready-made modules, it will be easier to understand by the already written code of the modules. We have colleagues who have worked with Bitrix all their lives and did not know anything about MVC, they understood the principle in a week, based on code examples.
To understand MVC, you need to understand the essence of OOP. To understand the essence of OOP, you need to read the relevant literature . It is important. You need to learn how to think with objects , forget like a bad dream everything you knew before and re-learn how to write code.
To understand what the division of the system into layers is, you need to read this (start right away from part 1, chapter 1).
Well, on, my articleon a more "human" version of the understanding of the MVS.
The easiest way to explain this is with a function example:
1. Parameters are the controller.
2. The body of a function is a model.
3. The result (returned to the call site) is a view.
MVC is the same thing, but a different name for a different complexity of logic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question