what are you looking for?

JONDJONES.COM
  • Books
    Umbraco
    • Umbraco .NET Core Mastery
    • Umbraco V8 Secrets Exposed
    CMS
    • Contentful - The Missing Manual
    • Episerver Missing Manual
  • CMS
    Umbraco
    • V9 Tutorials
    • V8 Tutorials
    • V7 Tutorials
    • Ultimate Umbraco Guide
    • BOOK: Umbraco .NET Core Mastery
    Episerver
    • Tutorials By Published Date
    • Tutorials By Category
    • Ultimate Episerver Guide
    • BOOK: Episerver: The Missing Manual
    Sitecore
    • Sitecore Tutorials
  • Programming Tutorials
    React JS
    • Ultimate React Guide
    • Tutorials By Published Date
    • Tutorials By Category
    Javascript
    • Tutorials By Published Date
    • Tutorials By Category
    • CODE: #ILoveJavascript
    C#
    • .NET Core Tutorials
    • Architecture
  • Tactics
    Productivity
    • Productivity Tutorials
    • Ultimate Productivity Guide
    Career Help
    • Career Tips
    • Insights
  • YouTube
  • About
  • Hire Me
    My Services
    • Umbraco Freelancer
    • Episerver Freelancer
    • JAMStack Freelancer
    My Qualifications
    • My Portfolio
    • LinkedIn Profile
    • Stackoverflow CV
    My Company & Experience
    • Digital Prompt
  • Contact

Strongly Typed Models Within Umbraco

  • Homepage
  • Learn Umbraco CMS
  • Umbraco 7 Tutorials
  • Strongly Typed Models Within Umbraco
How To Get Started With Umbraco ModelsBuilder
How To Get Started With Umbraco ModelsBuilder
Fri 20 July, 2018
Using Umbraco.ModelsBuilder.API To Create Strongly Typed Models Within Umbraco
Using Umbraco.ModelsBuilder.API To Create Strongly Typed Models Within Umbraco
Sun 9 September, 2018
How To Use The Umbraco ModelsBuilder In Different Class Libraries Using AppData Mode
How To Use The Umbraco ModelsBuilder In Different Class Libraries Using AppData Mode
Mon 17 September, 2018
How To Use UmbracoMapper To Implement Strongly Typed Models in Umbraco 7
How To Use UmbracoMapper To Implement Strongly Typed Models in Umbraco 7
Thu 26 November, 2015
How To Get An IPublishedContent from a Uid In Umbraco
How To Get An IPublishedContent from a Uid In Umbraco
Tue 4 December, 2018
Strongly Typed Models Within Umbraco

MVC stands for model, view, controller.  The idea behind this pattern is to separate your different concerns, to make testing and managing your website easier.  Historically, when developers have worked with Umbraco they have broken this paradigm.  If you have been passing in the IPublishedContent and then wiring up your properties within your views, you have in effect been muddling your HTML with your code.

A better approach is to pass in a strongly-typed C# model into your views.  All the code and logic required to get the data needed to render page data on your page should be done in the controller level - or at a minimum - the model level.  You should avoid doing logic in your views.  Even though it is possible to do this, you are in effect breaking the MVC pattern.  One of the reasons MVC was adopted, is to make maintaining your website easier.  Every time you break the MVC approach, you will make your website that much harder to test and maintain later on.

In this section, you will learn everything you need in order for you to use MVC correctly in your website by following the correct principles of MVC

UMBRACO BOOK
Umbraco Mastery Book
NAVIGATION
  • Umbraco Getting Started Advice
  • Umbraco Core Concepts
  • Umbraco API Explained
  • How To Structure Your Umbraco Project
  • Umbraco and MVC
  • Creating Your First Umbraco Page
  • Strongly Typed Models Within Umbraco
  • Grid Editor
  • Umbraco Component Tutorials
  • Umbraco Caching
  • Umbraco Backend Customisation
  • Umbraco Deployment
  • Umbraco Event Handling
  • Umbraco Hosting
  • Umbraco Load Balancing
  • Umbraco Multi-Language
  • Umbraco Plugins
  • Umbraco Performance Tweaking
  • Umbraco Routing
  • Umbraco Search
  • Umbraco Security
  • Umbraco SEO
  • Umbraco Tips And Advice
  • Umbraco Troubleshooting
  • Umbraco Unit Testing
  • Umbraco Upgrading Guide
  • Umbraco Web API
  • Wordpress Content Into Umbraco
  • uSiteBuilder
UMBRACO V8 BOOK
Umbraco V8 Secrets Exposed

I 💖 Umbraco

New to Umbraco CMS and want to learn how to get started?

Ultimate Umbraco Guide

BECOME A LEGEND
Shit My Websites Down

Join my newsletter and get a free guide

YOU ARE A LEGEND!

You just made.. THE LIST!

.
SUPPORT MY WORK



SUPPORT THIS SITE

Click An Advert

WELCOME

Hi,, I'm Jon, I write articles about creating and optimizing websites to help your business meet its goals. I am a technical architect and technology fanatic by profession. You can find out more about me by joining my newsletter.

Latest Posts
  • Contentful The Missing Manual Book Reviewed - Is It Garbage?
  • Ultimate Contentful API, SDK and App Guide For Beginners!
  • Is .NET 8 Preview A Game Changer?
  • Mastering Null In C# 11 and .NET 7

© Jon D Jones