F
F
Freud's cat2019-02-18 19:35:06
Design patterns
Freud's cat, 2019-02-18 19:35:06

What should an Active Record template actually look like?

Good morning. I've thrown a scheme here, tell me, who knows how to do it right?
5c6ade8a2ab04866729321.png
The first, as far as I know, is a classic approach to organizing a model from a database without any orms and templates.
The second one I came up with based on an article on design patterns (particularly Active Record).
The third I saw in a video where a man wrote his framework. ERepository is a class, where E is the name of an entity of type E1, E2 and E3. Why a repository is needed here, I don’t know, I haven’t gotten to that yet.
Please tell us how the structure of the model should look like so that it complies with all the canons of the active record.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question