B
B
BonBon Slick2017-11-13 23:20:11
Doctrine ORM
BonBon Slick, 2017-11-13 23:20:11

Doctrine vs Eloquent and other ORMs?

Came across Doctrine in Laravel. The logic of the program is terribly complex at first glance and takes more time to learn, write and maintain, or not? What I know for sure is that it will take more time to show the newcomer what and how it works, unlike Eloquent.
I don't understand why he? What is its advantage and difference from Eloquent in Laravel? What and when to use? Why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
index0h, 2017-11-14
@BonBonSlick

The logic of the program is terribly complex at first glance and takes more time to learn, write and maintain, or not?

only at first glance
For shitty sites with simple cruds, Eloquent is quite suitable. For something more serious - no.
We read, we dedicate: We were asked to check the code, what should we look at?
* SOLID
* Security
* Easy to test
* Easy to extend
* Easy to maintain
It’s better to understand Doctrine once and forget about ActiveRecord
Because the low level of entry is paid for by a lot of magic, sooner or later you will come out sideways, this is the sword of Domocles.

V
Vyacheslav Plisko, 2017-11-14
@AmdY

In order to write high-quality and maintainable code in Eloquent, in any case, you need the same amount of knowledge as when using Doctrine. So training is not considered, this parameter is important only for juniors. Another thing is that both tools have a lot of jambs and crutches, so you need to build on your knowledge of the tool and its weaknesses. But a professional should own both.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question