3 ms·
When I work in Django, instead of other frameworks I use, I think "I like this more, I like this less; this works better for me in these circumstances, this doe
by pocketsand 4y ago
When I work in Django, instead of other frameworks I use, I think "I like this more, I like this less; this works better for me in these circumstances, this does not." But I've never felt it made any sense at all to pronounce one as objectively better than another.
In most cases, it is a matter of taste and tradeoffs that vary based upon circumstance.
You can keep saying "this is the correct way" with all the conviction in the world, but it won't turn matters of opinion and circumstance into universal fact.
- Seb-C 4y agoIt's not a matter of personal opinion, it's a fact that the data mapper pattern (like doctrine) allows for a better and more maintainable architecture than active record. Separating the data access layer, the models and the business logic (basically a 3-tier architecture) is a widely used and proven industry standard to keep a sane, maintainable and testable codebase. Active record ORMs like Eloquent mixes everything in a single layer (business logic in the model events, data accesses are done by the models), but as soon as you reach a significant level of complexity, it is unmaintainable. Even Laravel codebases that grow in complexity often ends-up wrapping Eloquent in a repository layer.