Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edwin van Koppen 156 posts 270 karma points
    Sep 18, 2014 @ 11:35
  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Sep 18, 2014 @ 11:42
    Lee Kelleher
    0

    Hi Edwin,

    Similar as in mapping nodes, yes sure. :-)

    Ditto doesn't try do anything else. We weren't really interested in doing Dependency Injection, etc.

    uORM looks good.

    Cheers,
    - Lee

  • Edwin van Koppen 156 posts 270 karma points
    Sep 18, 2014 @ 11:45
    Edwin van Koppen
    0

    Thanks! Dit you know uORM existed? And if so, was the DI the reason that you didn't want to use it?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 18, 2014 @ 12:05
    Jeroen Breuer
    0

    Wow another one ;-). I'm using the ModelsBuilder :-).

    Jeroen 

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Sep 18, 2014 @ 12:11
    Lee Kelleher
    100

    Yep, I knew about uORM... as well as the many other libraries that could handle mapping:

    There are probably several more that I'd heard of, but can't recall right now.

    Originally Ditto was inspired by a post on the 24 Days in Umbraco website: Mapping Umbraco content to POCOs for strongly typed views.

    I was looking for a way to simply drop in a library that could convert content/media nodes (e.g. IPublishedContent) to a strongly-typed model... literally a simple POCO - without any class inheritance that would tie to a specific framework or implementation.

    Basically I was interested in one thing only, doing this...

    var poco = Model.Content.As<MyPoco>();
    

    ... and that's all.


    I'm not too interested in pushing Ditto as a framework, nor am I saying that it is better than any other approach. I simply wanted to shared my code :-)

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Sep 18, 2014 @ 12:13
    Lee Kelleher
    0

    @Jeroen - I'm happy that you've found a solution that solves the problem.

    PS. I like Zbu.ModelsBuilder - it's very good!

  • Edwin van Koppen 156 posts 270 karma points
    Sep 18, 2014 @ 12:41
    Edwin van Koppen
    1

    I've not seen them all till now but looking at them i find them or to complicated made (UmbracoMapper) or doesn't get related content / media (Zbu.ModelBinder, or did i miss something?). So i'm still happy with our own uORM :)

Please Sign in or register to post replies

Write your reply to:

Draft