SlideShare a Scribd company logo
Future ASP.NET features for UID / HTML developers Mark Everard September 2010
ASP.NET WebForms History Baby Steps – WebForms in  ASP.NET 4.0 Giant Leaps – MVC View Engines, Razor, HAML  Overview
Developed as the Display technology for the first release of ASP.NET in 2000 Designed to mimic Windows (form) application development Provided better code separation than classic ASP .aspx (markup files) .aspx.cs / .aspx.vb  (codebehind files) Event driven and provides a means of maintaining state between sequential requests (ViewState) WebForms History
Some side effects……… Markup that was abstracted and difficult to change Single form elements encompassing the page Large page weights. Non-standards based markup Difficult javascript integration … … … … And probably many more... Sorry
Introduces some new features that will make your lives a little easier…. Full control over client IDs More of a focus on semantic and standards based markup But the overriding framework remains ViewState Server Controls (runat=server) WebForms 4.0
WebForms generates ID attributes for any server created markup (allows the server to uniquely identify each element even if componentised in the code) ctl00_ContentPlaceholder1_ListView1_ctrl0_Label1   Not very friendly (although following a pattern).  Not good for any JS interaction with the DOM Client IDs
WebForms 4.0 offers 4 modes of operation for Client ID generation AutoID (.NET 3.5 behaviour) Predictable (Default) — Trims any “ ctl00 ” ID string and if a list/container control concatenates child ids (example: id=”ParentControl_ChildControl”)  Static —Hands over full ID naming control to the developer – whatever they set as the ID of the control is what is rendered (example: id=”JustMyId”)  Inherit —Tells the control to defer to the naming behavior mode of the parent container control  ClientIDMode
Developers are also beginning to find WebForms a pain (though not necessarily for the same reasons as you guys) Hard to write unit tests for Is an abstraction too far -> masks the true simplicity (RESTFUL nature) of the Http protocol  Bye-bye WebForms
ASP.NET MVC Model / View / Controller Simpler framework Easier to test No ViewState No Postbacks No WebControls  ~ runat=server FULL CONTROL OVER  MARKUP – Yay   The Future
ASP.NET MVC built on top of the WebForms framework Still working with .aspx (Page / View) .ascx (User control / Partial View) .master (MasterPage) Views will now contain some code within them (just for display -> loops to output lists) <%=foreach(var comment in Model.comments) { %> <li><%:comment.Body%></li> <%= } %> ViewEngines
Other ViewEngines available that use files with different extensions and different code syntax Razor  (likely to become the default view engine) .cshtml files @foreach (var comment in Model.comments { <li>@comment.Body</li> } NHaml   - markup language to produce xhtml markup – Can be a real time saver – never have to manually produce Xhtml – the Nhaml view is rendered as full XHTML ViewEngines
UID developers to Work alongside technical developers  No longer create static templates in isolation Create fully integrated views to be dropped into a solution Create UI tests (Selenium) against those Views I have a dream…
Only ‘Greenfield’ projects will be MVC / WebForms 4.0 Still have to deal with existing pitfalls for some while yet Legacy applications EPiServer support for MVC is  coming – but not this year at least Not so fast
Developing HTML views for ASP.NET applications will get a lot easier and more enjoyable in the very near future ………. Conclusion

More Related Content

PDF
ASP.NET MVC 3
PPT
CTTDNUG ASP.NET MVC
PPT
MSDN - ASP.NET MVC
PPTX
Asp.net MVC training session
KEY
Introduction to ASP.NET MVC
PPTX
ASP.NET MVC 5 - EF 6 - VS2015
PPT
ASP .net MVC
PPTX
ASP.NET MVC One Step Deeper
ASP.NET MVC 3
CTTDNUG ASP.NET MVC
MSDN - ASP.NET MVC
Asp.net MVC training session
Introduction to ASP.NET MVC
ASP.NET MVC 5 - EF 6 - VS2015
ASP .net MVC
ASP.NET MVC One Step Deeper

What's hot (20)

PPTX
ASP.NET MVC 3
PPTX
ASP .NET MVC
PPTX
A Web Developer's Journey across different versions of ASP.NET
PPTX
ASP .Net MVC 5
PPTX
3-TIER ARCHITECTURE IN ASP.NET MVC
PPTX
ASP .NET MVC - best practices
PPTX
Getting Started with ASP.NET MVC 3 and Razor
PDF
Principles of MVC for PHP Developers
PPTX
Angular JS, A dive to concepts
PDF
WJAX 2012 - Web Apps With AngularJS
PPT
JSF Component Behaviors
PPTX
Introduction to ASP.NET MVC 2
PPTX
MVC for Desktop Application - Part 2
PDF
Angular js best practice
PPTX
Introduction to Angular JS
PPTX
Server-side Web development via Ruby on Rails
PPTX
Discuss About ASP.NET MVC 6 and ASP.NET MVC 5
PPTX
MVC for Desktop Application - Part 3
PPTX
Angular js tutorial slides
PPTX
MVC for Desktop Application - Part 4
ASP.NET MVC 3
ASP .NET MVC
A Web Developer's Journey across different versions of ASP.NET
ASP .Net MVC 5
3-TIER ARCHITECTURE IN ASP.NET MVC
ASP .NET MVC - best practices
Getting Started with ASP.NET MVC 3 and Razor
Principles of MVC for PHP Developers
Angular JS, A dive to concepts
WJAX 2012 - Web Apps With AngularJS
JSF Component Behaviors
Introduction to ASP.NET MVC 2
MVC for Desktop Application - Part 2
Angular js best practice
Introduction to Angular JS
Server-side Web development via Ruby on Rails
Discuss About ASP.NET MVC 6 and ASP.NET MVC 5
MVC for Desktop Application - Part 3
Angular js tutorial slides
MVC for Desktop Application - Part 4
Ad

Similar to Future ASP.NET features for UID / HTML developers (20)

PPTX
Asp.Net MVC Intro
PPT
Introduction to ASP.NET MVC 1.0
PPTX
ASP.net MVC Introduction Wikilogia (nov 2014)
PPT
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
PPT
Asp.net mvc
PPT
Asp dot net long
PPT
MVC Demystified: Essence of Ruby on Rails
PPTX
Real-Time Web Applications with ASP.NET WebAPI and SignalR
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
PPT
MVC From Beginner to Advance in Indian Style by - Indiandotnet
PPTX
MVC & SQL_In_1_Hour
PPS
Introduction To Mvc
ODP
Spring Portlet MVC
PPT
DevNext - Web Programming Concepts Using Asp Net
PPT
ASP.NET 4.0 Roadmap
PPTX
ASP.NET MVC Presentation
PDF
Introduction to asp.net
PPTX
Walther Aspnet4
Asp.Net MVC Intro
Introduction to ASP.NET MVC 1.0
ASP.net MVC Introduction Wikilogia (nov 2014)
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Asp.net mvc
Asp dot net long
MVC Demystified: Essence of Ruby on Rails
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
MVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC & SQL_In_1_Hour
Introduction To Mvc
Spring Portlet MVC
DevNext - Web Programming Concepts Using Asp Net
ASP.NET 4.0 Roadmap
ASP.NET MVC Presentation
Introduction to asp.net
Walther Aspnet4
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Spectroscopy.pptx food analysis technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine Learning_overview_presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Diabetes mellitus diagnosis method based random forest with bat algorithm
sap open course for s4hana steps from ECC to s4
Spectroscopy.pptx food analysis technology
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
Programs and apps: productivity, graphics, security and other tools
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
A comparative analysis of optical character recognition models for extracting...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?

Future ASP.NET features for UID / HTML developers

  • 1. Future ASP.NET features for UID / HTML developers Mark Everard September 2010
  • 2. ASP.NET WebForms History Baby Steps – WebForms in ASP.NET 4.0 Giant Leaps – MVC View Engines, Razor, HAML Overview
  • 3. Developed as the Display technology for the first release of ASP.NET in 2000 Designed to mimic Windows (form) application development Provided better code separation than classic ASP .aspx (markup files) .aspx.cs / .aspx.vb (codebehind files) Event driven and provides a means of maintaining state between sequential requests (ViewState) WebForms History
  • 4. Some side effects……… Markup that was abstracted and difficult to change Single form elements encompassing the page Large page weights. Non-standards based markup Difficult javascript integration … … … … And probably many more... Sorry
  • 5. Introduces some new features that will make your lives a little easier…. Full control over client IDs More of a focus on semantic and standards based markup But the overriding framework remains ViewState Server Controls (runat=server) WebForms 4.0
  • 6. WebForms generates ID attributes for any server created markup (allows the server to uniquely identify each element even if componentised in the code) ctl00_ContentPlaceholder1_ListView1_ctrl0_Label1 Not very friendly (although following a pattern). Not good for any JS interaction with the DOM Client IDs
  • 7. WebForms 4.0 offers 4 modes of operation for Client ID generation AutoID (.NET 3.5 behaviour) Predictable (Default) — Trims any “ ctl00 ” ID string and if a list/container control concatenates child ids (example: id=”ParentControl_ChildControl”) Static —Hands over full ID naming control to the developer – whatever they set as the ID of the control is what is rendered (example: id=”JustMyId”) Inherit —Tells the control to defer to the naming behavior mode of the parent container control ClientIDMode
  • 8. Developers are also beginning to find WebForms a pain (though not necessarily for the same reasons as you guys) Hard to write unit tests for Is an abstraction too far -> masks the true simplicity (RESTFUL nature) of the Http protocol Bye-bye WebForms
  • 9. ASP.NET MVC Model / View / Controller Simpler framework Easier to test No ViewState No Postbacks No WebControls ~ runat=server FULL CONTROL OVER MARKUP – Yay  The Future
  • 10. ASP.NET MVC built on top of the WebForms framework Still working with .aspx (Page / View) .ascx (User control / Partial View) .master (MasterPage) Views will now contain some code within them (just for display -> loops to output lists) <%=foreach(var comment in Model.comments) { %> <li><%:comment.Body%></li> <%= } %> ViewEngines
  • 11. Other ViewEngines available that use files with different extensions and different code syntax Razor (likely to become the default view engine) .cshtml files @foreach (var comment in Model.comments { <li>@comment.Body</li> } NHaml - markup language to produce xhtml markup – Can be a real time saver – never have to manually produce Xhtml – the Nhaml view is rendered as full XHTML ViewEngines
  • 12. UID developers to Work alongside technical developers No longer create static templates in isolation Create fully integrated views to be dropped into a solution Create UI tests (Selenium) against those Views I have a dream…
  • 13. Only ‘Greenfield’ projects will be MVC / WebForms 4.0 Still have to deal with existing pitfalls for some while yet Legacy applications EPiServer support for MVC is coming – but not this year at least Not so fast
  • 14. Developing HTML views for ASP.NET applications will get a lot easier and more enjoyable in the very near future ………. Conclusion

Editor's Notes

  • #4: Primary display technology – though ASP.NET is more than just WebForms Strongly Typed and compiled .aspx files taught to contain little or no code (AKA spaghetti code) - .aspx domain of UID / CodeBehind for TD Event driven – button click event / dropdown list index changed – where as the underlying web framework (Http GET Post) is more simple than that Just functions as request / response Political choice to bring across all VB windows developers to the new web paradigm Postbacks – would perform a Http Post of the entire page / form with viewstate containing the hashed value of the previous state of every servber control
  • #5: How many more can they think of?
  • #8: Visual Studio to show Page with Simple server controls with different client ids modes
  • #9: Full test coverage is the safest way to ensure quality Many WebForm .Net developers won’t know the basic differences between a GET and a POST
  • #10: Simple MVC app walkthrough Concept of Model Controller responsibility View HtmlHelpers
  • #11: &lt;%: %&gt; Html encode notation
  • #12: Simple Nhaml example Razor example
  • #13: Fully integrated development
  • #15: Fully integrated development