Presentation is loading. Please wait.

Presentation is loading. Please wait.

ASP.NET AJAX Fedorov Sergey, student of Computing Mathematic and Cybernetics faculty, software department, NNGU

Similar presentations


Presentation on theme: "ASP.NET AJAX Fedorov Sergey, student of Computing Mathematic and Cybernetics faculty, software department, NNGU"— Presentation transcript:

1 ASP.NET AJAX Fedorov Sergey, student of Computing Mathematic and Cybernetics faculty, software department, NNGU serginiofnn@gmail.com

2 ASP.NET Shortcomings Page updates require a round-trip to the server and page refresh Round-trips do not persist any effects generated by JavaScript or other client-side technology Postbacks may involve a high amount of bandwidth There is no unified model for accessing Web Services through JavaScript or other client-side technology

3 Основные составляющие технологии AJAX Web Browser Java Script Logic Web Server XMLHttpRequest

4 XMLHttpRequest Object if (window.XMLHttpRequest) { xmlHttp=new XMLHttpRequest(); } else if (window.ActiveXObject) { xmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”); } xmlHttp.open(“GET”,url,[true],[“MyUserName”],[“MyPassword”]); xmlHttp.onreadystatechange=HandleFunction; xmlHttp.send([“some text”]);

5 ASP.NET AJAX Architecture Microsoft AJAX Library ASP.NET AJAX Extensions Components Non-visual components, Behaviors, Controls Browser Compatibility Support for most modern browsers Networking Asynchronous Requests, XML & JSON Serialization, WEB & Application Services Core Services JavaScript Base Class Extensions, Type System, Events, Serialization Script Support Localization, Globalization, Debugging, Tracing Web Services Proxy Generation, Page Methods, XML & JSON Serialization Application Services Authentication & Profile Server Controls Script Manager, UpdatePanel, UpdateProgress, Timer

6 ASP.NET AJAX Client Libraries JavaScript Type Extensions  Array Extensions  Boolean Extensions  Date Extensions  Error Extensions  Number Extensions  Object Extensions  String Extensions Support for Object Oriented Programming  Classes  Namespaces  Interfaces  Inheriting

7 Server Controls in ASP.NET AJAX ScriptManager Control ScriptManager Proxy Control UpdatePanel Control ProgressPanel Control Timer Control

8 Script Manager Control Capability to communicate with ASP.NET authentication services Access web services Render culture-specific information Perform sophisticated script management Perform partial page rendering Extended error-handling mechanism

9 ScriptManager Control ScriptManager Control Methods

10 ScriptManager Control ScriptManager Control Properties

11 ScriptManager Control ScriptManager Control Properties

12 Scripts and Services [System.Web.Script.Services.ScriptService] public class WebService: System.Web.Services.WebService { [WebMethod] protected returnType MethodName(parameters) { method definition } <asp:ScriptManager ID=“id” runat=“server”

13 UpdatePanel Control UpdatePanel Control Properties

14 UpdatePanel Child Tags Definition of elements that will get updated by UpdatePanel control

15 Guidelines about using UpdatePanel Nest UpdatePanel as little as possible, not only within-units, but also across units of code Keep the ChildrenAsTriggers property set to false, and explicitly set triggering events Use the smallest possible unit to achieve functionality

16 UpdateProgress Control Displaying elements Timer Control

17 Sources Foundation of ASP.NET AJAX. R. Pars, L. Moroney, J. Grieb AJAX in Action. D. Crane, E. Pascarello, D. James www.asp.net/ajax

18 Any Questions?


Download ppt "ASP.NET AJAX Fedorov Sergey, student of Computing Mathematic and Cybernetics faculty, software department, NNGU"

Similar presentations


Ads by Google