ASP.NET 4.0 Web Developers User Group Israel June 2009
Overview of Talk ASP.NET supports several very different types of web applications
ASP.NET 3.5 Service Pack 1 Microsoft Entity Framework ADO.NET Data Services Dynamic Data Microsoft AJAX Improvements Browser History Script Combining
ASP.NET Core
AppDomain Pool HttpApplicationFactory HttpRuntime HttpApplication Request from host HttpContext HttpApplication HttpContext ASP.NET Runtime
Http Handler HttpApplication BeginRequest() AuthenticateRequest() AuthorizeRequest() ResolveRequestCache() AcquireRequestState() PreRequestHandlerExecute() EndRequest() UpdateRequestCache() ReleaseRequestState() PostRequestHandlerExecute() HttpModule IHttpHandler Init IHttpHandlerFactory
ASP.NET Core Enhancements Cache Extensibility Auto-Start Web Applications Browser Capabilities Extensibility Session State Compression
Output Cache Extensibility Store generated output of aspx/ascx Http.sys Integration HttpSubstituation Callback ASP.NET 4.0 OutputCacheProvider Future – Cache API Extensibility Providers for 3 rd Party, Velocity, FileSystem
Auto-Start Web Applications Usual approach: Application_Start Auto-Start ASP.NET IIS 7.5 IProcessHostPreloadClient AppPool startMode set to “alwaysRunning”
Browser Capabilities ASP.NET Determines Browser Capabilities Config\Browser Directory Create or Update and XML file Aspnet_regbrowsers BrowserCapabilitiesCodeGenerator ASP.NET HttpCapabilitiesProvider
Session State Compression CPU Intensive Used when state is out of porcess compressionEnabled in web.config DeflateStream/GZipStream Useful in the ASP.NET world anyway..
ASP.NET Web Forms
With ASP.NET 4.0, you are in control : Control Rendering Control IDs View State Website URLs XHTML and Accessibility
Code Snippets HTML div, table, img … ASP.NET scriptmanager, sqldatasource, formview … ASP.NET AJAX behavior, control … JScript function, forin …
FormView Improvements <asp:FormView ID="Formview1" RenderTable="false" runat="server">
ListView Improvements
Control Your View State New Property - Control.ViewStateMode Enabled Disabled Inherit (default) Also applicable on the Page level in the future Different than EnableViewState Control State persists anyway
Control Your Client IDs Control.ClientIdMode Legacy Static Predictable Inherit (default) $get( ) vs alternatives
Control Your Client IDs
ASP.NET Routing.NET 3.5 SP1 a Defined in Global.asax via RouteTable Access via Page.RouteData ExpressionBuilders RouteUrl RouteValue RouteParameter
Other Search Engine Optimization Improvements Page.Description Page.Keywords Response.RedirectPermanent(new url) SEO Toolkit for IIS 7.0
QueryExtender Control Works with EntityDataSource and LinqDataSource Enables you to filter database results Accepts different types of expressions: Search Range Property Custom
ASP.NET AJAX
Client-Side Templates Client-Side Controls Client-Side Data Binding Read/Write Database Data from the Browser Cross-Browser Compatible Not tied to ASP.NET
Client Side Templates Client templates replicate HTML XHTML compliant (use namespace extensions) Placeholder notation similar to Silverlight/WPF {{ Name }} Interspersed code and markup Declarative behavior and events
Customizing Templates Expression language is JavaScript {{BirthDate.localeFormat("dd/MM/yyyy")}} Can leverage pseudo columns and interspersed code and markup code:if code:before code:after $index $dataItem
Live Binding Live Bindings Reflect changes live from data {binding Name} Reflect changes live back to data from user input No round-trip to server Convert and ConvertBack functions
ASP.NET AJAX Refactored Microsoft AJAX Library MicrosoftAjaxCore.js MicrosoftAjaxComponentModel.js MicrosoftAjaxSerialization.js MicrosoftAjaxGlobalization.js MicrosoftAjaxHistory.js MicrosoftAjaxNetwork.js MicrosoftAjaxWebServices.js MicrosoftAjaxApplicationServices.js MicrosoftAjaxTemplates.js (New ) MicrosoftAjaxAdoNet.js (New)
ASP.NET AJAX Created by John Resig Open Source Microsoft Product support jQuery Intellisense Supported in Visual Studio 2008 Supported in Visual Studio 2010
ASP.NET MVC
Enables a clear separation of concerns Enables testability including test-driven development Enables fine-grained control over HTML and JavaScript ASP.NET 4.0 Asynchrnous controllers Declarative Controls Ajax support (+partial rendering)
ASP.NET Dynamic Data
DynamicDataManager Control DynamicHyperLink Control Field Templates for and URL Support for Inheritance and Many-to-Many Relationships Entity Templates
ASP.NET Dynamic Data Entity Templates
Conclusion ASP.NET supports several very different types of web applications
Resources ASP.NET 4.0 and Visual Studio 2010 Web Development Overview CodePlex ASP.NET Previews
ASP.NET 4.0