cool and elegant asp.net web forms with html 5 for the modern web
DESCRIPTION
More than 10 years after the initial release of Microsoft ASP.NET, the web forms framework is still alive and kicking. We show you the latest features and tricks that are available when creating web applications with ASP.NET web forms in Microsoft Visual Studio 2013. We also show you how to use some of the cool JavaScript frameworks with your web forms project. Learn to leverage all of the latest tools in Visual Studio like Browser Link and Web Essentials to make their coding experience simpler, shorter, and more enjoyable.TRANSCRIPT
Cool and Elegant ASP.NET Web Forms with HTML 5 for the Modern WebJeffrey T. Fritz
I’m still using ASP.NET 2.0Remember 2005?
Hurricane Katrina in New Orleans
Bird Flu in Indonesia
Lance Armstrong wins 7th and final Tour de France
Xbox 360 released
DisneyLand celebrates 50th birthday
6th Star Wars Film released
That was a LONG time ago….
Is your application using 10 year old technology?
ViewState!Data Source ControlsSmart Phone? What’s that?
More than 2.23B people – 49% of mobile phone users go online in 2014
Lots of CSS, JavaScriptUgly URLsXHTML StandardModern Security
Modern problems from ASP.NET 2.0
Most controls do not require ViewStateNew Techniques allow for controls to manage data without it
Disable on Page directive
Disable in web.config
Turn off ViewState
<%@ Page EnableViewState="false" %>
<system.web> <pages enableViewState="false" />
The ‘magic grey box’ of data access
Not testableNot verifiableTypically embedding SQL statements in ASPX files
Use Model Binding instead
Data Source Controls
A brave new web of devicesWindows CE available since 1996“Modern SmartPhones” arrive in July 2007Not optimized for smaller screensDifferent standards than Internet Explorer 8Touch first interactions
Use Responsive Web DesignASP.NET ships with Bootstrap templatesEmbrace the 12 column responsive gridApply CssClass attributes to your markup to make content fit devices better
Smart Phones? Mobile Web?
Image Courtesy of Jeffrey T. Fritz
Bloat of static frameworksCSS Framework stylesheetsControl specific stylingMasterPage / Layout specific styling Page Specific stylesJavaScript libraries: jQuery, jQueryUI, KendoUI, ModernizrMOAR JavaScript libraries: Bootstrap, Responsive, Knockout, AngularJS, RequireJS
Use BundlesApp_Start/BundleConfig.cs/Bundle.config
CSS + JavaScript == Happy Designer!
URLs are not SEO friendly and not ‘hackable’
www.coolwebsitename.com/products/details.aspx?id=1234&color=azureHard to convey in discussion and social media
Use FriendlyUrlsEvery ASP.NET project has route tableInstall-Package Microsoft.AspNet.FriendlyUrlsApp_Start/RouteConfig.cs
BONUS: Mobile device detection!
Ugly URLs
Output is standard XMLHTML 5 is the current standardVisual Studio 2013 support is AMAZINGNew tags, attributes, support for device servicesLESS, SASS, TypeScript, CoffeeScript
Install Visual Studio 2013Don’t forget Visual Studio Web EssentialsBrowser Link FTW!
XHTML Standard
Web.Config defined securityAuthentication credentials from Active Directory or local databaseAuthorization on a folder by folder basisNo integration with 3rd party providers
Use ASP.NET IdentityOWIN-based security scheme – ready for next generation of ASP.NETEasy integration with Active Directory or SQL DatabaseExtensible to common OAuth providers like Microsoft Account, Facebook, Twitter
Security – OAuth to the rescue!