phpc.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A server for PHP programmers & friends. Join us for discussions on the PHP programming language, frameworks, packages, tools, open source, tech, life, and more.

Administered by:

Server stats:

833
active users

Hard no.

dev.37signals.com/vanilla-rail

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.

37signals DevVanilla Rails is plentyA common critique of Rails is that it encourages a poor separation of concerns. That when things get serious, you need an alternative that brings the missing pieces. We disagree.

@ShawnMcCool Do you still work with 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.

youtube.com/watch?v=6TVO9Ky8vX

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.

Andrew Feeney

@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.

@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 project and see how it goes.

@ShawnMcCool That's very kind of you, thanks! I'm sure I will.