Closed JimBobSquarePants closed 8 years ago
It's a good discussion to raise... and I'm eager to hear other people's opinions on it.
For me, having ModelsBuilder in core is no different to the standalone package. Both offer different approaches to the model-mapping problem. I still see Ditto as a very viable alternative.
Very good question indeed. For me, there is one very big difference between Models Builder and Ditto which allows both to exist and whilst that is the case I think we should keep ditto going.
The way I see it, Models Builder is essentially a "Domain Models Builder" whilst Ditto is a "View Models Builder" (although yes, you can use Ditto to make just domain models too). Models Builder allows you to strongly type your page content into a single domain "page" model. Every conversion of that page will always be the same, and the property values will always be of the same type. Ditto on the other hand allows you to convert the page model into several different, smaller, view models, each of which can change the property values to suite the view.
This for me is the fundamental difference between Models Builder and Ditto and why I think both can co-exist.
"Domain Models Builder"
:+1: That's a good way to describe it, (I couldn't think of a phrase for it).
Thanks for the replies. Love the nomenclature!
This has actually got me thinking about how we structure our models at work. I'm taking the domain model approach which means I'm adding properties I never use. I should really trim it back.
Same for me on Carlsberg projects, we've still got these monolithic domain-models that need pruning.
Have you had chance to look at DitFlo yet? The approach changes how you consider building your view-models - in a very granular way.
I haven't, well not in enough detail to understand it all yet. I might have some time this week to investigate it though as we're pretty quiet at work.
With ModelsBuilder now part of Umbraco in the v7.4.0 beta 2 what are our plans? Alternatives are good but would we be better of focusing our talents on core?