Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

The Future of DNN Speaks Razor - #6 - Mapping Needs to Technologies

I've written a few posts in my series The Future of DNN Speaks Razor explaining why many technologies are obsolete or going that way. I've also mentioned a few neat new things and as a kind of summary, I will recommend what HTML-creation technology to use for what part of each application.  

What HTML5 Offers Today

Based on this (already old) graphic, you can easily see that the modern client supports just about anything you can dream of. So all we have to do is figure out what's left for the server to do.

Mapping Specific Types of Output to Recommended Technologies

Admin User Interfaces
like configuration dialogs

Content Input
like edit-dialogs for your data


  1. Simple HTML-forms or client SPAs (Single-Page-Applications)...
  2. ...based on AngularJS (or knockoutJS if need be)...
  3. ...receiving and saving data through WebAPI (ideally the DNN-flavor with security-checks etc.).


  • All WebForms-Controls (like Labels, Input-Boxes, etc.), especially the built in Telerik Controls (these are not updated any more)
  • Avoid Postbacks and ViewState at all cost, they are history.

In-Page Content Editing
In-Content Editing Dialogs


  1. This is mostly done in JavaScript (jQuery or AngularJS)...
  2. ...simple editable DIVs and form-elements
  3. ...receiving and saving data through WebAPI (ideally the DNN-flavor with security-checks etc.).


  • All WebForms- & Telerik-Controls, Postbacks and ViewState
  • Don't compensate ViewState with Session-State - this will fail in the long run

Module Front-End Views
like a login-control or contact-form


  1. You will often need some custome HTML, so use C# Razor for the HTML-generation
  2. Use jQuery for the front-end logic (like input-field validation) 
  3. ...and a JSON/WebAPI interface for processing the data. 


  • All WebForms- & Telerik-Controls, Postbacks and ViewState

Interactive Module Front-End Views
like galleries, charts, image-rotators

These usually consist of an initial HTML fragment containing some data (like DIVs containing images) and a feature rich script. Use: 

  1. The script are made with AngularJS, jQuery or specific third party JS libraries like TimelineJS
  2. To deliver html-data (usually list of something) you will need C# Razor or DNN-Tokens
  3. for any kind of JSON feed either use a standard WebAPI or a module specific JSON-feed
  4. Module-instance configuration (usually just 1 record containing animation speed etc.) is usually delivered in the HTML as inline JSON to avoid unnecessary extra requests.


  • All WebForms- & Telerik-Controls, Postbacks and ViewState

Content-Element Output
like images, videos, simple text/image combinations, addresses, product-details etc.

Most of these templates are simply responsive HTML-fragments with minimal logic. They must place the content-data inside the HTML for SEO-reasons and should be easy to customize. Use

  1. The ideal solution is C# Razor or DNN-Tokens
  2. Token-templates offer a security benefit since they contain no code but are not flexible
  3. C# Razor templates are power-edition
  4. Use Server-Side Image-Resizers to auto-resize/crop your images [todo]


  • All WebForms- & Telerik-Controls, Postbacks and ViewState
  • ...especially data-bound WebForms templates
  • XSLT - this is sometimes used, but most developers are very louse at it, so even though the technology is great, it's not good for this requirement. Also note that XSLT is almost dead in Web-Output - most CMSs that went for this approach have moved on, a bit like XML-Streams being replaced by JSON
  • Don't use you own invented "improved" engine. Your solution might be better than Tokens, but it's unlikely that you'll create anything better than Razor

Content-List Output
like lists of news, list of products and similar

These are usually designed/responsive table-like lists of things like news, downloadable files etc. Use:

  1. C# Razor to ensure that you can also apply some custom formatting, hide some items based on rules etc. 
  2. DNN-Tokens might be used, but are usually too trivial for good lists


  • Everything you should also avoid in the list above...
  • ...especially data-bound WebForms templates

Data-List Output
like feeds from external sources, lists of data from a DB

These are usually designed/responsive table-like lists of things like news, downloadable files etc. Use:

  1. C# Razor to ensure that you can also apply some custom formatting, hide some items based on rules etc. 
  2. DNN-Tokens are usually too trivial for good lists.


  • Everything you should also avoid in the list above...
  • ...especially data-bound WebForms templates

End-User SPAs
Single Page Applications meant to react quickly but still get indexed by Google.

These are currently the most challenging of solutions. In brief: 

  1. create them client-side using AngularJS and similar
  2. Deliver the data throughWebAPI or custom JSON
  3. To ensure SEO, use Hashbangs for application state...
  4. ...and create C# Razor fallback-views on the server (processing the _escaped_fragment_ URLs) to deliver search-engine HTML. Note: Most people don't understand what I just wrote here - I'll blog about it in detail one day.


  • Don't create them with server-side rendering or any of the WebForms-solutions
  • Don't create complex solutions with jQuery only - this always works at first, but development time grows exponentially with complexity. So always use...
  • ...a good client side MVC-Framework like AngularJS. Avoid knockoutJS, as it doesn't even offer real View-Management, so is too trivial for SPAs

Note to Module Developers

If you are a module-developer, make sure you support Razor as your templating-engine of choice. Ideally, make sure the templates are stored in the portal-folder and that your module can work with portal-specific templates. If possible, also add ways to publish your data as JSON to empower the web designer to create awesome alternate consumption paths like neat JS-lists or even crazy AngularJS SPAs (Single Page Applications). 

 Avoid WebForms/WebControls and XSLT at all cost. 

Also avoid VB Razor since it's not widespread.   

A Note to Web Designers 

If you are a web designer, make sure you choose content-management modules supporting Razor - because everything you customize in Razor will still be "the right way" in 5 years. Everything you do in XSLT or WebForms is a bad investment of your time and your customers money. When you want to create something cool - like an interactive list or chart - do it in JavaScript. Postbacks and Server-Rendering are soooo 2004.  If possible, motivate your module-developers to support both Razor and JSON interfaces. 

An Example how This Should be Done

Since we (2sic) are so keen on these technologies, our content-management module 2sxc supports exactly these setups, but I'm sure that many others do too. 

Since 2sxc does almost everything including galleries, image-rotators, product lists/details, SPAs etc., I've stopped reviewing other modules, so I can't recommend any. I do believe that XMod and Form&List are going there, but are still focused on historically popular technologies like XSLT and WebForms. If you can recommend any further solution please mention it in the comments.

Summing Up

I hope I've inspired you and helped you see the web-world as it functions today. Of course, this leaves a lot o post about, including the following:

  1. Razor-Basics and advanced Razor-stuff (like grouping using LINQ) - this will need a series...
  2. For module developers: How to integrate Razor as your View-Engine while you're still hooked on WebForms
  3. AngularJS basics - another series (anybody want to write this one - post in the comments)
  4. JSON and WebAPI basics - also a series (anybody want to do this - post in the comments)

With love from Switzerland

Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 600 DNN projects since 1999. He is also chief architect of 2sxc (2SexyContent - see forge), an open source module for creating attractive content and DNN Apps.


PS: Want to get started before the entire Razor-series is out? For the impatient, try the DNN-Razor Host Module and watch this video  or try packaged code apps by installing 2sxc and some of the Razor Apps like the Razor Basic TutorialsList-Tutorials or the SQL and Peta-Poco Tutorials



thanks daniel for the series.
I read them all and agree whole heartedly with you. All sizes of business are even using these technologies to host a single business solution for their information in the cloud, without the in house server ( solving the complex need for keeping data consistent between in house and online data stores) and allows resources to be focuses in one place.

I like the idea of using angular for the more complex modules, but feel it might be a bit of over kill for the simple modules and like to use knockout when the data binding requirements are simple.

In addition, I can not emphasises enough how much I want DNN 8 to move this way. If DNN can remove the mark up bloat the exists around modules and leave the majority of the styling to frameworks like bootstrap and foundation through skins, then you have a truly modern CMS which builds upon the primary strengths of DNN, which IMHO are its flexibility and extensibility.

I look forward to the future of DNN and strongly believe it is the best CMS out there.
Jordan Wednesday, September 03, 2014 3:13 PM (link)
Jay Mathis
Fantastic series Daniel! I learn best from seeing real world examples and would love to see this implemented with a simple How To sample module. Looking forward to the next post!
Jay Mathis Wednesday, September 03, 2014 5:20 PM (link)
2sic Daniel Mettler
@Jordan: I understand that you see AngularJS as "too powerfull" for many scenarios.

The reason we are completely dumping knockoutJS ist standardization and Knowledge Management. We have 17 employees - and teaching each and every one the differences between the frameworks, the quicks, the bugs and the issues takes a lot of time. If you add the time you need for internal documentation and for additional problems which arise when people confuse the two technlogies then you have a very, very expensive system.
Reducing it to 1 technology does increase the learning curve once for every employee - but it so much cheaper than maintaining 2 similar solutions for similar problems.

It's also a protection: simple solution tend to migrate into complexity and bam! you hit a wall. If you start in Angular this won't happen.

And third: once you learned angular, creating simple solutions doesn't take any longer than with knockoutJS.

With love from Switzeland,
2sic Daniel Mettler Thursday, September 04, 2014 1:52 AM (link)
Hey Daniel

Those are great points that I never thought about. That's why I appreciate being a part of a community so much. It helps you to make better decisions.


ps - any idea when your 2sxy content module will be azure ready?
Jordan Thursday, September 04, 2014 12:03 PM (link)
2sic Daniel Mettler

The newest build (this weekend, v6.3) is Azure-ready. Please test and do give feedback!

Thanks, Daniel
2sic Daniel Mettler Monday, September 08, 2014 3:25 AM (link)
Erik Hinds
Good series. I liked the post where you showed the umbraco interface.
Erik Hinds Monday, September 08, 2014 11:59 AM (link)
2sic Daniel Mettler
You're welcome ;). I love a good competition - and it's wonderful that younger projects have more freedom to try things (and optionally mess up) - while more stable/mature solutions can benefit from lessons learned there. Umbraco tried to go MVC and failed big time after more than a years development - now I believe they are one a good track. And DNN is too - and the more we learn from each other, the better all will get.

Love from CH

PS: that's Switzerland for you: 4 languages, so the abbreviation CH doesn't make much sense in most of them
2sic Daniel Mettler Monday, September 08, 2014 3:16 PM (link)

Comment Form

Only registered users may post comments.


2sic Daniel Mettler (124)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (21)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (269)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?