Copied to clipboard

Flag this post as spam?

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


  • Thomas Tvedt 7 posts 29 karma points
    Nov 26, 2013 @ 14:58
    Thomas Tvedt
    2

    Pointer to good tutorials?

    I'm new to Umbraco and trying to figure out how everything works.. I want to use MVC and Umbraco 7, and I want to define as much as possible in code. I realize Umbraco 7 is pretty fresh, and I can't seem to find any good tutorials covering MVC and Umbraco 7. 

    Can anyone point me to some good tutorials? I prefer written tutorials, I don't have the patience to watch movies

    Are there any sample-solutions out there?

     

    -Thomas

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 26, 2013 @ 15:08
    Dennis Aaen
    1

    Hi Thomas,

    Since you want to use MVC I would recommend to look here: Mvc templating and Built-in Property Editors

    Even if you're not much for video tutorials I will still recommend to take a look on Umbraco TV umbraco.tv

    Hope this is, what you was looking for.

    /Dennis

  • Thomas Tvedt 7 posts 29 karma points
    Nov 26, 2013 @ 22:43
    Thomas Tvedt
    0

    Thank you, excellent links :) I assume these still apply for Umbraco 7.0.. 

    Is it possible to define a document type in code? And use this as a strongly typed model in my views? In the documentation it states that @Model is always of type Umbraco.Web.Mvc.RenderModel (with property Content of type IPublishedContent). Can I define a model/viewmodel/document type "Article", and pass this into @Model in my views? I don't want to rely on "magic strings" @Model.Content.GetPropertyValue("bodyContent"), but want strongly typed models (@Model.BodyContent).

    Is it normal not to implement any controllers in an Umbraco MVC project?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 26, 2013 @ 23:39
    Jeavon Leopold
    1

    Hi Thomas,

    Yes, MVC is the same in Umbraco v7 as in v6.

    Umbraco doesn't have native code first support nor does it directly create strongly typed models, however you can create your own strongly typed models using a controller and route hijacking along with your strongly typed models of your document types. There are many other approaches, I really like the factory idea in this blog post Also read this recent post about the state of code first in Umbraco.

    It is very normal to have both Surface Controllers and Custom Controllers in an Umbraco project.

    Jeavon

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 26, 2013 @ 23:43
    Jeavon Leopold
    0

    I should say, that not all property editors are the same between v6 and v7 as in v7 they have been converted to AngularJs and the complex editors now store as JSON as previously they may have stored as XML, for example see this post about related links

  • Thomas Tvedt 7 posts 29 karma points
    Nov 27, 2013 @ 10:49
    Thomas Tvedt
    0

    Ok, so if I want to use code first and strongly typed models I have the following options:

    1. Use uSiteBuilder (free?,works,slow on large sites.)
    2. Use uSync combined with Umbraco.CodeGen (beta?)
    Not "pure" code-first: (?)
    3. If I go for the factory idea, then I have to create my document types in the Umbraco-UI first right?
    4. uSync alone will allow svn-control of databasechanges, but I still have to create document types in Umbraco-UI first?
    5. uComponents.uMapper is also "one-way" sync? I would have to create document types in Umbraco-UI first?
    I see that uSiteBuilder version 1.2 was released in 2011, almost 2 years ago. Is this still a good solution? 
    uSync combined with CodeGen smells like beta, is this a stable solution/smart way to go?
    Thank you very much for great links :)
  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 28, 2013 @ 11:18
    Jeavon Leopold
    0

    Really only uSiteBuilder provides Code First for Umbraco.

    I believe that the latest build of uSiteBulder from source (May 23rd 2013) works very well with v6.

    You may also be interested in the current discussion about uSiteBuilder2 which is planned to support Umbraco v7 and also the thoughts from Stephen about what the Core might do to make things easier very soon.

  • Comment author was deleted

    Nov 28, 2013 @ 11:40

    Plenty of info on http://www.nibble.be/ ;)

    Sounds like this one would be interesting for you http://www.nibble.be/?p=337 (property value converters for intellisense in vs)

Please Sign in or register to post replies

Write your reply to:

Draft