Answer the question
In order to leave comments, you need to log in
What is the meaning of the model with this approach, is it needed?
Hello!
I'm watching a video course on OOP: dude (Andrey Kudlai, WebForMySelf) performs the following actions:
Creates a wrapper.
Creates a base model in which to instantiate a wrapper.
Creates a model in which it inherits the base model and creates a property - the name of the table test , for example.
In the controller, in one of the actions, it creates an instance of the model and calls a method from the wrapper for this instance, that is, it makes a request like ... select * from test ...
To be honest, I don’t really understand:
1. Why do we need such a beard from the event chain?
2. Why do we need a property in the model - the name of the table test , if in the controller we make a request like ... select * from test ...?
3. Do we need a base model with a wrapper connection and inheritance in the model at all in this case, or can we just use the wrapper immediately in the controller?
Thank you.
Answer the question
In order to leave comments, you need to log in
let's stop watching YouTube forever with its morons, you will read articles, look at the source code of projects on framers and read smart books like Fowler.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question