Your SlideShare is downloading. ×
0
New Features of ASP.NET 4.0<br />Buu Nguyen, MVP (ASP.NET)<br />www.buunguyen.net/blog<br />buunguyen@kms-technology.com<b...
Agenda<br />ASP.NET Web Forms 4.0<br />ASP.NET AJAX 4.0<br />ASP.NET MVC 2.0<br />ASP.NET Dynamic Data<br />
ASP.NET Web Forms 4.0<br />
Web Forms 4.0<br />SEO Improvements<br />Clean HTML<br />Chart Control<br />
Meta Tags<br />Available in Page directive & Page object<br />set<br />out<br />
Routing<br />Tired of ugly URLs yet?<br />Routing to rescue<br />http://server/songs.aspx?genre=rock<br />http://server/al...
Routing<br />define<br />use<br />link<br />
Meta Tags & Routing Demo<br />
Web Forms 4.0<br />SEO Improvements<br />Clean HTML<br />Chart Control<br />
Client IDs before 4.0<br />Microsoft Confidential<br />10<br />Not so CSS-friendly and JS-friendly!!!<br />
Client IDs in ASP.NET 4.0<br />ClientIDMode gives developers control<br />Can be specified at different levels<br />machin...
ClientIDMode<br />
Client IDs Demo<br />
Semantically Correct Markup<br />Rendering version<br />Menu control generates <ul>, <li><br />CheckBoxList’s and RadioBut...
Web Forms 4.0<br />SEO Improvements<br />Clean HTML<br />Chart Control<br />
Chart Control<br />35 chart types<br />3-D support<br />Ajax support<br />Data binding<br />Statistical formulae<br />High...
Simple Static Chart<br />
Dynamically Populated Chart<br />
Chart Control Demo<br />
ASP.NET AJAX 4.0<br />
The ASP.NET AJAX Family<br />
ASP.NET Ajax Library<br />JavaScript library<br />Server-side platform agnostic<br />Include Ajax Control Toolkit (with cl...
Using Client Controls<br />All ACT controls now available at client-side<br />Also known as “Client Controls”<br />Also ex...
Script Loader<br />Manage scripts & dependencies<br />Detect script duplication<br />Load scripts in parallel<br />Enable ...
Client Controls & Script Loader Demo<br />
DataView<br />A JavaScript component allowing JSON data to be bound to an HTML template<br />Support 2-way binding, master...
DataView Demo<br />
ASP.NET MVC 2.0<br />
Technology Stack<br />ASP.NET Web Forms<br />ASP.NET MVC<br />ASP.NET Framework<br />(Configuration, Security, Membership,...
MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
Areas<br />Allow an MVC app to have multiple “areas”<br />Like sub-projects although sharing 1 app<br />Each area defines ...
Partial Action<br />Render partial might cause coupling except for no-model partial view<br />Partial action to rescue: in...
MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
Model Validation<br />Model validation in MVC 1.0 is ad-hoc<br />xVal (http://xval.codeplex.com)<br />ASP.NET MVC Validati...
Applying Validation<br />Model<br />Action Method<br />View<br />
Model Validation Demo<br />
MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
Strongly-Typed Helpers<br />1.0 Way<br />2.0 Way<br />
Model Templates<br />ASP.NET can render model based metadata provided by developers<br />Built-in templates for data types...
Helper Methods<br />Display<br />Editor<br />
Model Templates Demo<br />
Custom Templates<br />MVC is shipped with built-in templates<br />Can override templates easily<br />
Custom Templates Demo<br />
MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
Asynchronous Controller<br />No blocking-thread during IO/network-bound operation => improved throughput<br />Source: http...
Asynchronous Controller Demo<br />
Dynamic Data<br />
Overview<br />Built-in page, entity, field and filter templates<br />Easy to customize or add new templates<br />Declarati...
Dynamic Data Demo<br />
References<br />50<br />
ASP.NET Web Forms 4.0<br />URL Routing<br />http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-w...
ASP.NET AJAX 4.0<br />Libraries & source code for Ajax Library<br />http://ajax.codeplex.com<br />Tutorials & sample apps ...
ASP.NET MVC 2.0<br />Model validation<br />http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validatio...
ASP.NET Dynamic Data<br />Dynamic Data Presentation Layer Customization<br />http://msdn.microsoft.com/en-us/library/ee211...
Upcoming SlideShare
Loading in...5
×

New Features of ASP.NET 4.0

12,442

Published on

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
  • for more details of asp.net 4.0 go through this URL:
    http://tech-records.blogspot.com/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
12,442
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
284
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide
  • Global.asax -&gt; Default.aspx -&gt; Songs.aspx
  • ClientID.aspxClientID_Predictable.aspx-&gt;AutoID -&gt; Static -&gt; Predictable
  • Chart.aspx- Switch chart type: Column, Bar, Pie, LineChart_Programmatic.aspxMicrosoft Chart SamplesChart Types / Area Charts / 3D AreaChart Types / Advanced Financial Charts / StockAppearance / 3D PerspectiveInteractivity &amp; Ajax / AJAX / Real Time Chart
  • ClientControls.aspx
  • DataView.aspxDataViewRemote.aspx2_DataContext/1_WCF_SaveChanges.htm
  • RegisterLogon
  • Account/Register.ascxBlogEntry/Entry.ascxAccount/Show.ascx
  • Account/Register.ascxBlogEntry/Entry.ascxAccount/Show.ascx
  • Master.aspxTwitterControllerTweetBox
  • Build from scratch and apply some customizations:1.namespace DynamicData.Models{ [MetadataType(typeof(TrackMetadata))] public partial class Track { } public class TrackMetadata { [StringLength(48)] public string Name { get; set; } [ScaffoldColumn(false)] public bool Bytes { get; set; } }}2.using System;using System.ComponentModel.DataAnnotations;namespace DynamicData.Models{ [MetadataType(typeof(InvoiceMetadata))] public partial class Invoice { } public class InvoiceMetadata { [DisplayFormat(DataFormatString = &quot;{0:yyyy-MM-dd}&quot;)] public DateTimeInvoiceDate { get; set; } }}3.List.aspx move to CustomPages/Tracks
  • Transcript of "New Features of ASP.NET 4.0"

    1. 1. New Features of ASP.NET 4.0<br />Buu Nguyen, MVP (ASP.NET)<br />www.buunguyen.net/blog<br />buunguyen@kms-technology.com<br />Microsoft Confidential<br />1<br />
    2. 2. Agenda<br />ASP.NET Web Forms 4.0<br />ASP.NET AJAX 4.0<br />ASP.NET MVC 2.0<br />ASP.NET Dynamic Data<br />
    3. 3. ASP.NET Web Forms 4.0<br />
    4. 4. Web Forms 4.0<br />SEO Improvements<br />Clean HTML<br />Chart Control<br />
    5. 5. Meta Tags<br />Available in Page directive & Page object<br />set<br />out<br />
    6. 6. Routing<br />Tired of ugly URLs yet?<br />Routing to rescue<br />http://server/songs.aspx?genre=rock<br />http://server/albums.aspx?year=2010&month=4&day=12<br />http://server/songs/rock<br />http://server/albums/2010/4/12<br />
    7. 7. Routing<br />define<br />use<br />link<br />
    8. 8. Meta Tags & Routing Demo<br />
    9. 9. Web Forms 4.0<br />SEO Improvements<br />Clean HTML<br />Chart Control<br />
    10. 10. Client IDs before 4.0<br />Microsoft Confidential<br />10<br />Not so CSS-friendly and JS-friendly!!!<br />
    11. 11. Client IDs in ASP.NET 4.0<br />ClientIDMode gives developers control<br />Can be specified at different levels<br />machine.config and web.config<br />Page<br />Control<br />
    12. 12. ClientIDMode<br />
    13. 13. Client IDs Demo<br />
    14. 14. Semantically Correct Markup<br />Rendering version<br />Menu control generates <ul>, <li><br />CheckBoxList’s and RadioButtonList’sRepeatLayout now has 4 values<br />Table (old)<br />Flow (old)<br />OrderedList (new)<br />UnorderedList (new)<br />Many other small improvements<br />
    15. 15. Web Forms 4.0<br />SEO Improvements<br />Clean HTML<br />Chart Control<br />
    16. 16. Chart Control<br />35 chart types<br />3-D support<br />Ajax support<br />Data binding<br />Statistical formulae<br />Highly customizability<br />Appearance & data serialization<br />
    17. 17. Simple Static Chart<br />
    18. 18. Dynamically Populated Chart<br />
    19. 19. Chart Control Demo<br />
    20. 20. ASP.NET AJAX 4.0<br />
    21. 21. The ASP.NET AJAX Family<br />
    22. 22. ASP.NET Ajax Library<br />JavaScript library<br />Server-side platform agnostic<br />Include Ajax Control Toolkit (with client-side support)<br />Tight integration with the “adopted” jQuery<br />Support client-side template with DataView<br />Provide script loader<br />Support invoking web services<br />Work seamlessly with ASP.NET services<br />Released separately from ASP.NET and VS.NET<br />Latest version: 0911 beta<br />http://ajax.codeplex.com<br />Microsoft Confidential<br />22<br />
    23. 23. Using Client Controls<br />All ACT controls now available at client-side<br />Also known as “Client Controls”<br />Also exposed as jQuery’s plugins<br />Microsoft Confidential<br />23<br />
    24. 24. Script Loader<br />Manage scripts & dependencies<br />Detect script duplication<br />Load scripts in parallel<br />Enable lazy script loading<br />Microsoft Confidential<br />24<br />
    25. 25. Client Controls & Script Loader Demo<br />
    26. 26. DataView<br />A JavaScript component allowing JSON data to be bound to an HTML template<br />Support 2-way binding, master-detail, and conditional rendering<br />Can retrieve data from local or services (e.g. ASMX, WCF, and WCF Data Services etc.)<br />Microsoft Confidential<br />26<br />
    27. 27. DataView Demo<br />
    28. 28. ASP.NET MVC 2.0<br />
    29. 29. Technology Stack<br />ASP.NET Web Forms<br />ASP.NET MVC<br />ASP.NET Framework<br />(Configuration, Security, Membership, Roles, Profiles, Routing, Caching, Session, Application State, Cookie, .aspx/.ascx/.asax/.master files etc.<br />.NET Framework<br />
    30. 30. MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
    31. 31. Areas<br />Allow an MVC app to have multiple “areas”<br />Like sub-projects although sharing 1 app<br />Each area defines its routes<br />Microsoft Confidential<br />31<br />
    32. 32. Partial Action<br />Render partial might cause coupling except for no-model partial view<br />Partial action to rescue: invoke action which renders UI<br />Microsoft Confidential<br />32<br />
    33. 33. MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
    34. 34. Model Validation<br />Model validation in MVC 1.0 is ad-hoc<br />xVal (http://xval.codeplex.com)<br />ASP.NET MVC Validation Library (http://aspmvcvalidation.codeplex.com/) <br />ASP.NET MVC 2.0 solves this nicely<br />Client-side and server-side validation<br />Provider for Data Annotations on server-side<br />Adapters jQuery and MS AJAX on client-side<br />
    35. 35. Applying Validation<br />Model<br />Action Method<br />View<br />
    36. 36. Model Validation Demo<br />
    37. 37. MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
    38. 38. Strongly-Typed Helpers<br />1.0 Way<br />2.0 Way<br />
    39. 39. Model Templates<br />ASP.NET can render model based metadata provided by developers<br />Built-in templates for data types<br />Built-in provider for Data Annotations<br />Data Annotations attributes<br />DisplayName, HiddenInput, DataType, ReadOnly, ScaffoldColumn, DisplayFormat, and UIHint<br />
    40. 40. Helper Methods<br />Display<br />Editor<br />
    41. 41. Model Templates Demo<br />
    42. 42. Custom Templates<br />MVC is shipped with built-in templates<br />Can override templates easily<br />
    43. 43. Custom Templates Demo<br />
    44. 44. MVC 2.0<br />Separation of Concerns<br />Model-based Validation<br />Model Rendering<br />Scalability<br />
    45. 45. Asynchronous Controller<br />No blocking-thread during IO/network-bound operation => improved throughput<br />Source: http://msdn.microsoft.com/en-us/library/ee728598%28VS.100%29.aspx<br />
    46. 46. Asynchronous Controller Demo<br />
    47. 47. Dynamic Data<br />
    48. 48. Overview<br />Built-in page, entity, field and filter templates<br />Easy to customize or add new templates<br />Declarative validation and rendering<br />Integrated with ASP.NET Web Forms and MVC applications<br />
    49. 49. Dynamic Data Demo<br />
    50. 50. References<br />50<br />
    51. 51. ASP.NET Web Forms 4.0<br />URL Routing<br />http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx<br />Client IDs<br />http://weblogs.asp.net/scottgu/archive/2010/03/30/cleaner-html-markup-with-asp-net-4-web-forms-client-ids-vs-2010-and-net-4-0-series.aspx<br />Chart Control <br />http://www.4guysfromrolla.com/articles/072209-1.aspx<br />SEO Improvements<br />http://weblogs.asp.net/scottgu/archive/2010/01/05/asp-net-4-seo-improvements-vs-2010-and-net-4-0-series.aspx<br />
    52. 52. ASP.NET AJAX 4.0<br />Libraries & source code for Ajax Library<br />http://ajax.codeplex.com<br />Tutorials & sample apps for Ajax Library<br />http://www.asp.net/ajaxlibrary<br />Microsoft Ajax CDN<br />http://www.asp.net/ajaxLibrary/cdn.ashx<br />Microsoft Ajax Minifier 4.0<br />http://aspnet.codeplex.com/releases/view/40584<br />
    53. 53. ASP.NET MVC 2.0<br />Model validation<br />http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx<br />Model Templates<br />http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html<br />Strongly-typed Helpers<br />http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspx<br />Areas<br />http://msdn.microsoft.com/en-us/library/ee671793%28VS.100%29.aspx<br />Asynchronous Controller<br />http://msdn.microsoft.com/en-us/library/ee728598%28VS.100%29.aspx<br />
    54. 54. ASP.NET Dynamic Data<br />Dynamic Data Presentation Layer Customization<br />http://msdn.microsoft.com/en-us/library/ee211433%28VS.100%29.aspx<br />Dynamic Data Schema Customization<br />http://msdn.microsoft.com/en-us/library/ee225428%28v=VS.100%29.aspx<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×