1 / 29

Sponsoren

Sponsoren. Softwaresponsoren. Mediasponsoren. Einführung in die Ajax Library. Jan Molnar Jan-Cornelius.Monlnar@studentprogram.de Dennis Zielke i-denniz@microsoft.com. Agenda. Ajax Library Grundlagen Javascript Debugging, Webservices Javascript Events Javascript Authentifizierung

eytan
Download Presentation

Sponsoren

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. Sponsoren Softwaresponsoren Mediasponsoren

  2. Einführung in die Ajax Library Jan Molnar Jan-Cornelius.Monlnar@studentprogram.de Dennis Zielke i-denniz@microsoft.com

  3. Agenda • Ajax Library Grundlagen • Javascript Debugging, Webservices • Javascript Events • Javascript Authentifizierung • Databinding • UI Effekte

  4. Mehralsnur Ajax • Cross-Browser Framework • Objekt-OrientiertesJavascript • .NET Event Modell • Imperative + DeklarativeProgrammierung • ControlBinding • Control Extensions + Behaviours • Data Binding • Support für ASP.NET, Java, PHP...

  5. Architektur Client Server Components Script Support Browser Compability Web Services Networking Application Services Core Services Server Controls

  6. MicrosoftAjax.js Sys Sys.Net Sys.Services Sys.Serialization Sys.UI String- Builder WebRequest- Executor _ProfileService JavaScript- Serializer DOMElement _Debug XMLHttp- EXecutor ProfileGroup DOMEvent EventArgs _WebRequest- Manager _Authentication- Service Behavior Component WebRequest Control Point _Application WebService- Proxy Bounds CultureInfo WebService- Error _Timer Other Other

  7. JavascriptErweiterungen • Vererbung • Interfaces + AbstrakteKlassen • Namespaces • Enumerations • Delegates • Events • Partial Rendering Engine • Reflection

  8. Base Type Extensions • Microsoft AJAX Library erweitert JavaScript • Array - add, addRange, contains, insert, etc. • Boolean - parse • Date - format, parselocale, parseInvariant, etc. • Error - argumentOutOfRange, etc. • Number - format, parseLocale, parseInvariant • Object - getType, getTypeName • String - format, endsWith, startWith, trim, etc.

  9. $get, $find & $create … • GlobaleFunktionen • Verweise auf statischeKlassen • $get -> Sys.UI.DomElement.getElementById • $create -> Sys.Component.create • $find -> Sys.Application.findComponent • $addHandler -> Sys.UI.DomEvent.addHandler • $removeHandler -> System.UI.DomEvent.removeHandler • $clearHandlers -> Sys.UI.DomEvent.clearHandlers

  10. JavascriptWebservices • JSON statt XML • Ca. 30% weniger Overhead • Neues [ScriptService] Attribut • Automatische Generierung • Webservices Bridge • Alternative: PageMethod

  11. JavascriptWebservices demo

  12. Javascript Debugging • Sys.Debug Objekt • Debugging • Tracing • MicrosoftAjax.debug.js • Lesbare Formatierung • Kommentare

  13. Debuggint • Debugging unterstützt • "assert" • "fail" • "trace" • "traceDump" • Sys.Debug = newSys._Debug();

  14. Javascript Debugging demo

  15. Sys.Application • Zuständig für den Client-Page-LifeCycle • Läd & initialisiert Komponenten

  16. Client Page LifeCycle Window Sys.Application Component 1. Open Page 2. init 3. $create 4. load 5. $get 6. Close Page 7. unload

  17. Client-Page-LifeCycle demo

  18. Ajax Events functionpageLoad() { varelement = $get(“elementId“); $addHandler(element, „click“, elementClick); } functionelementClick(e) { // eventhandling }

  19. Ajax DOM • Sys.UI.DomElement • addCssClass / removeCssClass • containsCssClass • toggleCssClass • getBounds • setLocation • setVisible

  20. Ajax DOM demo

  21. Ajax Services • Authentication ServiceZugriff auf ASP.NET Membership • Profile ServiceZugriff auf ASP.NET Profil

  22. Ajax Services demo

  23. Sys.Preview.[UI.].Data • EnthältDatabindingfähigeKlassen • ItemView und ListView

  24. JavascriptDatabinding demo

  25. Sys.Preview.UI • Component • Timer, DragDropManager, … • Behavior • Floating, DropZone, Opacity, … • Control • TextBox, Menu, CheckBox, …

  26. Ajax Drag & Drop demo

  27. Q&A

  28. www.justcommunity.de www.dnug-koeln.de

  29. Sponsoren Softwaresponsoren Mediasponsoren

More Related