1 / 23

Visual Studio 2010 and .NET Framework 4 Training Workshop

Visual Studio 2010 and .NET Framework 4 Training Workshop. What’s New In ASP.NET AJAX 4. Name Title Organization Email. Agenda. Client-Side Templates Client Controls Declarative Instantiation Command Bubbling Live Bindings.

lorand
Download Presentation

Visual Studio 2010 and .NET Framework 4 Training Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Studio 2010and.NET Framework 4Training Workshop

  2. What’s New InASP.NET AJAX 4 Name Title Organization Email

  3. Agenda Client-Side Templates Client Controls Declarative Instantiation Command Bubbling Live Bindings

  4. “ASP.NET AJAX is alright, but it is way too server-centric for serious client-side development…” - Uninformed Guy

  5. Common Myths ASP.NET AJAX is tied to ASP.NET, namely WebForms… You must use a ScriptManager and UpdatePanels to get anything done… It requires Visual Studio to work…

  6. Requirements In order to seriously use ASP.NET AJAX, some need… Client-side controls Data binding UI templating Easy service communication Modular functionality

  7. Why do some find JavaScript painful?

  8. Who in their right mind wants to do manual XMLHttpRequest work, HTML generation, or data wireup?

  9. Server vs. Client AJAX Server AJAX Initial request: HTML Rendering Rendering Form POST HTML Client AJAX HTML + JSON JSON JSON

  10. The server should only be concerned with data, not presentation

  11. Client Templates Server-Side (WebForms): <ItemTemplate> <li><%# Eval("Name") %></li> </ItemTemplate> Client-Side: <ul class="sys-template"> <li>{{ Name }}</li> </ul>

  12. Client Controls

  13. DataContext ASMX 1. Request WCF ADO.NET Data Services Data Context 2. JSON Data ASP.NET MVC JsonResult 3. Modify Data 4. Save Data Etc. * DataContext includes change tracking automatically

  14. Client TemplatesDataViewDataContext

  15. Maybe you’d prefer to write as little JavaScript as possible…

  16. Declarative Instantiation Map: xmlns:dataview="javascript:Sys.UI.DataView“ • 2. Attach: • <div sys:attach="dataview"></div> • 3. Use: • <div … dataview:serviceuri="myService.svc"…>

  17. Did I mention that it is XHTML compliant?

  18. Declarative Instantiation

  19. Command Bubbling Server-Side (WebForms): <asp:Buttonrunat=“server” CommandName=“Select" … /> Client-Side: <button sys:command="select" … />

  20. Live Bindings Source Target Object #1 Property #1 Property #2 Property #3 Object #2 Property #1 Property #2 Property #3 • One-Time • One-Way • Two-Way

  21. Command BubblingLive BindingsChange Tracking

  22. Summary Client-Side Templates Client Controls Declarative Instantiation Command Bubbling Live Bindings

More Related