Hard no.
https://dev.37signals.com/vanilla-rails-is-plenty
A domain model is more than just a data model with services glued together.
I want the benefit of designing the system in a shape that reflects the domain understanding of the business..
ActiveRecord ORM is a walking database record and it is (at best) a poor tool for domain modeling, and (at worst) makes the task of designing a domain model impossible.
@ShawnMcCool Do you still work with #laravel at all? How do you approach this problem in an app like that?
@andrewfeeney I don't mind frameworks much, but I do not write software using ActiveRecord ORM.
I know that it's not a popular opinion, but I find that it's much more complex than simply mapping objects to / from the database.
In my experience, it is a toxic element that DESTROYS maintainability and comprehensibility of software. I don't believe that there's a way that it can be done well. I've tried for over a decade to make it work, but it only did with pure CRUD dashboards like PHPMyAdmin.
@andrewfeeney I design software using models and contextual boundaries. The moment to moment work that I do is focused on processes. But when I'm working on a system built on ORM entities, I spend all of my time focusing on.. ok how did this db mutation occur, and where.. and the systems are inevitably mixed together, because the models aren't designed to serve a high-value purpose in a context, they serve middling values in ALL contexts instead. Maybe that's a bit ranty, sorry.
@andrewfeeney I put together a talk that introduces some of the ideas.
https://www.youtube.com/watch?v=6TVO9Ky8vXI&list=PLQuwqoolg4aI6v1GvtRg3NgT0PBBHVqii&index=18
I would be interested in continuing this discussion, or having a chat (publicly or otherwise) some time if you're interested at all. The past 8 years or so of my engineering growth have been very fruitful for me and I'd be happy to share my experience.
@ShawnMcCool Yes! I’d love that. Let me watch this talk and digest!
@ShawnMcCool@noc.social @ShawnMcCool@fosstodon.org tagging because I don’t know if you get notifications from the old account.
@andrewfeeney @ShawnMcCool@noc.social I did get the notification :D
@ShawnMcCool@fosstodon.org @ShawnMcCool@noc.social good to know thanks! I'm halfway through the talk. It's great so far!
@ShawnMcCool@fosstodon.org @ShawnMcCool@noc.social I've watched this talk twice and I'd like to spend some time working with this approach to see how it feels.
I'm going to try to incorporate this kind of approach in my #TuskPHP project and see how it goes.
@andrewfeeney @ShawnMcCool@noc.social let me know if you want to chat about anything.
@ShawnMcCool That's very kind of you, thanks! I'm sure I will.