Copied to clipboard

Flag this post as spam?

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


  • Brian Lacy 28 posts 101 karma points
    Mar 26, 2016 @ 21:46
    Brian Lacy
    0

    Choosing a Code First solution for Umbraco 7.4+

    I'm already running into the problem which I'm sure many others have encountered -- I need to be able to update and maintain Content Types while collaborating on a project using version control.

    Code First seems the most obvious solution to that problem, since any updates to the model classes would be committed to the repository and thus shared with other contributors.

    But perusing through the Projects database -- as well as searching nuget.org -- turns up a hefty list of apparently competing solutions. A few

    • uJet
    • uSiteBuilder
    • Umbraco.CodeGen
    • Archetype Mapper
    • uTransporter
    • Umbraco Inception
    • uMigrate
    • UCreate
    • Ditto

    I know I need a solution that works with 7.4+ -- and in case it matters, I'm also working with Grid Layouts. Does anyone prefer one of these over others? If so, why? Otherwise, how would you suggest narrowing these down?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 26, 2016 @ 22:33
    Jeavon Leopold
    1

    Hi Brian,

    IMO Code First and Umbraco do not work, there have been many attempts to shoehorn in code first to Umbraco but it just doesn't fit.

    So, instead of code first, I'll tell you the tools I use with Umbraco v7.4. Firstly included with v7.4 is Models Builder, this is a code after solution that provides strongly typed models for your data access. For source controlling changes to data structure (content, data types etc) I use a package called uSync. uSync can be configured to automatically import chances, so when used in combination with Models Builder you actually have the same result as a code first solution.

    Documentation for Models Builder can be found here (v3) https://github.com/zpqrtbnk/Zbu.ModelsBuilder/wiki and uSync here https://our.umbraco.org/projects/developer-tools/usync/

    There are many different approaches out there, this is just how I'm doing it with v7.4!

    Jeavon

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 26, 2016 @ 23:11
    Jan Skovgaard
    0

    Hi Brian

    In addition to Jeavons reply above I'd just like to add a reference to this talk by Pete Duncanson about why Code first in an Umbraco context is a bad thing - I think he has many good points about why it does not fit - https://www.youtube.com/watch?v=Hr1irQ0h5J8

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft