Copied to clipboard

Flag this post as spam?

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


  • Zac 223 posts 575 karma points
    Nov 05, 2015 @ 15:03
    Zac
    1

    Nested Content or Archetype?

    So at Umbraco UK Festival Marc Stöcker said "if you're using Archetype, stop!".

    This left me a bit confused. I've been using Archetype quite a lot over the past year quite successfully. I'll admit I haven't even tried Nested Content so I don't know if it's as stable or fully featured as Archetype.

    Since Nested Repeated Content is planned for v 7.5, and assuming that this is Nested Content being integrated into Umbraco, it seems a bit early to tell us to stop using Archetype?

    Am I missing something? Should we be using Nested Content and will it upgrade through to v 7.5, and is that why Marc gave this advice?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 05, 2015 @ 17:09
    Lee Kelleher
    3

    Hi Zac,

    I missed Marc's talk at the UK Festival, but I can understand his statement.

    In many ways Nested Content has superseded Archetype - in that the UI feels more native (it leverages the Grid UI/UX); it uses Document Types; publishes as IPublishedContent objects.

    All that isn't to say that Archetype is bad, it's not - I'm still a big fan, (and regularly contribute code to it). It's one of those pioneer packages that helped v7 gain adoption.

    If you are using Archetype, and it works well for you and your content-editors, then that's great - carry on.

    I believe Marc's view is one from a content-editor's perspective - where a more unified, consistence UX across property-editors is preferable.

    I hope this helps.

    Cheers,
    - Lee

  • Zac 223 posts 575 karma points
    Nov 05, 2015 @ 18:03
    Zac
    0

    Thanks Lee. That definitely helps me understand the difference between the two offerings, and why Marc was recommending NC. It's more native and uses IPublishedContent. That sounds like a benefit in the backend too as mapping Archetype did feel a bit dirty.

    Nested Content has some 1800 downloads, to Archetype's 2100, and is on version 0.2.0 to Archetype's 1.11.1 - so to someone who hasn't used both but has Archetype in a few big production sites it certainly gives the impression that Archetype is more mature and more popular.

    Edit: Just for reference the download figures were from Our. I noticed the Nuget stats show about 14,800 downloads for Archetype vs 500 for Nested Content, which I suppose is more of the difference I was expecting.

    I'll will try out NC for one of the projects I'm working on. Do you know how likely it is that there will be an upgrade path to v7.5 for projects built using NC today? I'm worried about the longevity of all my JSON blobs :)

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 05, 2015 @ 18:40
    Lee Kelleher
    100

    Hi Zac,

    Wow, I hadn't realised that NC had so many downloads! :-)

    Archetype is more battle-tested thats for sure. We use it on many of our projects for Carlsberg, and I know of some other brand sites using it.

    Quick side-note about the Archetype data-model... we're in the process of adding support for IPublishedContent in Archetype - so that may easy any frustrations. ;-)

    As for upgrade paths in NC, it's too early to say yet - as we've not actually ported any code over to Umbraco core yet, (that will start happening very soon though). That said, the JSON blob for NC are name/value pairs, I don't see that format changing.

    Cheers,
    - Lee

  • Zac 223 posts 575 karma points
    Nov 06, 2015 @ 17:10
    Zac
    0

    Okay, I 'get' it now. Nested Content is awesome.

    Super easy to set up, and fits in really well with all the strongly typed models we use - manually customised classes generated by Zbu.ModelsBuilder (App_Data mode)

    The only slight complication I found was converting from the DetachedPublishedContent to our models, so I created an extension method:

    public static IEnumerable<T> GetNestedContentNodes<T>(this IPublishedContent node, string pickerAlias) 
    {
        return node.GetPropertyValue<IEnumerable<IPublishedContent>>(pickerAlias).Select(n => (T)Activator.CreateInstance(typeof(T), new object[] { n }));
    }
    

    Which works fine since all of the strongly typed models have a constructor which takes IPublishedContent and thus DetachedPublishedContent. Perhaps there is a cleaner way of doing this. Anyway, it sure beats what I was going through with Archetype where I had to manually create my models and map them (there was probably a simpler way mind)

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 10, 2015 @ 09:31
    Lee Kelleher
    0

    Cool! Happy to hear that you like NC!

    I haven't used NC with the ModelsBuilder, so can't really advise the best way of handling that.

    Cheers,
    - Lee

  • Artyom Chernenko 17 posts 91 karma points
    Nov 10, 2015 @ 10:05
    Artyom Chernenko
    0

    And what about integration with Ditto mapper? It would be nice to have some type converters/value resolvers to easily get typed models from NC, as it could be done with Archetype and Grid using these libraries https://github.com/micklaw/Ditto.Resolvers

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 10, 2015 @ 10:09
    Lee Kelleher
    0

    Hi Artyom,

    Since NC returns an IPublishedContent collection, it works fine with Ditto.

    Cheers,
    - Lee

  • Artyom Chernenko 17 posts 91 karma points
    Nov 10, 2015 @ 10:16
    Artyom Chernenko
    1

    Okay I will definitely look at NC as it looks pretty useful and convinient for editors. On my current project I've started to use Archetype and also I'll try to use NC, so I will have a great chance to compare them from the 'newbie' point of view :)

  • peter 13 posts 144 karma points
    May 12, 2017 @ 08:52
    peter
    0

    Hi Artyom,

    I am currently making the same choice. What was your experience with NC?

  • Artyom Chernenko 17 posts 91 karma points
    May 12, 2017 @ 09:18
    Artyom Chernenko
    1

    Hi Peter

    Unfortunately I haven't had a chance to look at NC and I used Archetype eventually.

  • Zac 223 posts 575 karma points
    Jun 07, 2017 @ 08:53
    Zac
    3

    For anyone else stumbling across this thread - I set up this thread 18 months ago as I wasn't sure which route to go down. However I've been using Nested Content exclusively in all my new projects since then. Personally I would recommend it over Archetype, which I have also used extensively in the past.

    It is also my understanding that Nested Content is still due to become part of the Umbraco core. Potentially, it also looks as if Archetype is now being less actively supported (as of June 2017):

    Commit history for Archetype vs Commit history for Nested Content

  • Robert J. Bullock 386 posts 405 karma points
    Jan 10, 2018 @ 22:34
    Robert J. Bullock
    0

    Anyone have any suggestions on how one would migrate from Archetype to Nested Content on an existing site?

  • Dmitry Morlender 19 posts 100 karma points
    Jan 11, 2018 @ 07:52
    Dmitry Morlender
    0

    Personally, I prefer NC, I think that they are kind of the same.

Please Sign in or register to post replies

Write your reply to:

Draft