Transcript
Page 1: What’s New in ASP.NET 4
Page 2: What’s New in ASP.NET 4

10 % Read

20% Hear

30% See

50% Hear + See

70% Say + Write

90% Experience

You generally remember…

Page 3: What’s New in ASP.NET 4

Todd AnglinChief Evangelist, TelerikMicrosoft MVPASPNET InsiderNHDNUG President & O’Reilly Author

@toddanglin

telerikwatch.com

Page 4: What’s New in ASP.NET 4

Telerik

One-stop provider for .NET tools & UI components

UI DATA PRODUCTIVITY TESTING TFS CMS

UI: ASP.NET AJAX, MVC, WinForms, Silverlight, WPFDATA: Telerik Reporting, OpenAccess ORMPRODUCTIVITY: JustCodeTESTING: WebUI Test StudioTFS: Work Item Manager, Project DashboardCMS: Sitefinity CMS.NET Developer Productivity

Page 5: What’s New in ASP.NET 4

Today’s Road Map

Web Developer Landscape

What’s New Overview

What’s New Demos

Dynamic DatajQuery & MVCWhat’s Next

Page 6: What’s New in ASP.NET 4

What are the technologies of the web?

Page 7: What’s New in ASP.NET 4

Web Development

CSS

Java Script

HTML

jQuery

Page 8: What’s New in ASP.NET 4

Memory Lane

1991

1993

19961998

2002CSSASP 1.0

Page 9: What’s New in ASP.NET 4

At the time of ASP.NET 1…

JavaScript was a pain– But, IE6 held 96% browser share

.NET was brand new– WinForms was new, VB6 was popular

Yet to be invented:– AJAX*– jQuery– Web 2.0– Silverlight/XAML– Twitter

Page 10: What’s New in ASP.NET 4

Cloud

JSON

REST Web Services

AJAX RIA

WebMatrix

MVC

Video

HTML5

CSS3

Mobile

Browser War IISocial Media

Page 11: What’s New in ASP.NET 4

4

Page 12: What’s New in ASP.NET 4

What is “ASP.NET”?

Page 13: What’s New in ASP.NET 4

Core Services WebForms MVC Dynamic

Data AJAX

ASP.NET

Page 14: What’s New in ASP.NET 4

HTML + JS asp.net webforms

On the Metal

Abstracted

asp.net mvc

Page 15: What’s New in ASP.NET 4

introduction to asp.net 4.0

putting you in control

ViewState Control IDs Caching

Extensibility Control Rendering URLs

Page 16: What’s New in ASP.NET 4

HTML + JS asp.net webforms

On the Metal

Abstracted

asp.net mvc

Page 17: What’s New in ASP.NET 4

*important notes– Side-by-side enabled– Backwards & Upwards compatible

• controlRenderingCompatibilityVersion– VS 2010 only

Page 18: What’s New in ASP.NET 4

ViewState can be opt-in

ViewStateModeEnabled/Disabled/Inherit

ViewState

Page 19: What’s New in ASP.NET 4

4 Mode:– AutoID – Static– Inherit– Predictable (*default)

(+ ClientIDRowSuffix)

Control IDs

<!--Set client ID--><asp:ListView DataSourceID=“odsYourData" ClientIDRowSuffix="ID" ClientIDMode="Predictable"

<!--Global config-><system.web> <pages clientIDMode="Predictable"> </pages> </system.web>

Page 20: What’s New in ASP.NET 4

Improved in 4.0

Routing

public class Global : System.Web.HttpApplication{ protected void Application_Start(object sender, EventArgs e) { RouteTable.Routes.Add("Product", new Route("Products/{category}", new PageRouteHandler("~/Products.aspx"))); }}

<asp:Literal Text="<%$ RouteValue:Category %>" runat="server" />

Global.asax

Page 21: What’s New in ASP.NET 4

New APIs

Page.MetaDescription = "this is meta description";Page.MetaKeywords = "this is a meta keyword";

Page Meta Info

Response.RedirectPermanent(url); //issues HTTP 301

Permanent Redirect

HttpRequest.Browser.HttpBrowserCapabilities

Browser Capabilities (updated for new browsers + mobile)

Page 22: What’s New in ASP.NET 4

Provider-based

Output Caching

<!--web.config--><caching> <outputCache defaultProvider="AspNetInternalProvider"> <providers> <add name="DiskCache" type="Test.OutputCacheEx.DiskOutputCacheProvider,

DiskCacheProvider"/> </providers> </outputCache> </caching>

<%--Configure cache provider per page/control--%><%@ OutputCache Duration="60" VaryByParam="None" providerName="DiskCache" %>

?

Page 23: What’s New in ASP.NET 4

Newly extensible:– Object Caching

• System.Runtime.Caching

– Invalid Path Characters– Request Validation– Encoding

• <httpRuntime encoderType="Samples.MyCustomEncoder, Samples" />

– Browser Capabilities

Extensibility

Page 24: What’s New in ASP.NET 4

New– QueryExtender

Improved– ListView– FormView– Paging– Outer tables– Hidden DIV CSS

Controls

Page 25: What’s New in ASP.NET 4

Client-side libraries

Microsoft Ajax Libraries are dead*– Long live jQuery

What does it mean?For new client-side development, use jQuery

*NOTE: jQuery ships with ASP.NET 4

Page 26: What’s New in ASP.NET 4

Dynamic Data

Core benefits:– Model-driven validation– Field Templates

Now more

flexible!

//Enable via CodeGridView1.EnableDynamicData(typeof(Product),

new { ProductName = "DefaultName" });

<!--OR Enable declaratively on page-%><asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true"> <DataControls> <asp:DataControlReference ControlID="GridView1" /> </DataControls> </asp:DynamicDataManager>

Page 27: What’s New in ASP.NET 4

jQuery & MVC

Baked-in to ASP.NET

Page 28: What’s New in ASP.NET 4

What’s Next

Razor & WebMatrix

Page 29: What’s New in ASP.NET 4

For your research…

Changes to control renderingNew control featuresClient controls & Ajax librariesIIS changesVS 2010 changesASP.NET MVC 2Windows Azure

Page 30: What’s New in ASP.NET 4

It’s too much!

Page 31: What’s New in ASP.NET 4

thanks!

@toddanglin

telerikwatch.com

[email protected]

Page 32: What’s New in ASP.NET 4

Additional ResourcesWhat’s New in Microsoft ASP.NET 4 Web Forms and Dynamic Data– http://www.microsoftpdc.com/2009/FT58

Extensible output caching– http://www.4guysfromrolla.com/articles/061610-1.aspx

(Disk Cache Example Code)

WebForms Routing– http://www.west-wind.com/weblog/posts/54760.aspx

(Good discussion of ClientIDMode on Rick’s blog)


Top Related