logoalt Hacker News

KolmogorovCompyesterday at 3:18 PM2 repliesview on HN

I've always felt MDD falls short very quickly, because for non-trivial project you often want to show information related to more than one table, and so you have to fallback to writing the controller code manually anyway.


Replies

rorylaitilayesterday at 4:56 PM

Yep, it can fall down if you force it everywhere. Read views are typically where custom "view models" are needed. For example on my current project with ~30 tables/models (https://humancrm.io), there are only a couple custom user views, and a couple custom write functions to simplify the UI flow. The rest of the API is generated from the data models. I take a pragmatic approach and don't force everything into MDD if there is a clear need.

johnmaguireyesterday at 3:21 PM

Your models/resources do not need to have a 1:1 mapping to your data store.