260 likes | 501 Views
Microsoft ‘Atlas’ Part 1: The Microsoft Ajax Library. Presenter: Tim Kremer. About Tim. Project Manager at SSW Software Engineering Background Developing websites since 1998 Developing in .NET for 5+ years. Ajax Timeline. Microsoft invents it IE in 1998 OWA, MSDN take advantage
E N D
Microsoft ‘Atlas’ Part 1:The Microsoft Ajax Library Presenter: Tim Kremer
About Tim • Project Manager at SSW • Software Engineering Background • Developing websites since 1998 • Developing in .NET for 5+ years
Ajax Timeline • Microsoft invents it • IE in 1998 • OWA, MSDN take advantage • Google popularises it • Google Maps • Web 2.0 explodes • Flickr • Digg • Live.com • YouTube • www.Spyk.com (the newest!)
Why is Web 2.0 difficult? • JavaScript apps are difficult to develop • Poor debug tools
Many Popular Libraries • PrototypeJavaScript extension library, and crux of many of the open-source offerings. • Script.aculo.us built on top of prototype • Dojo toolkit – rich client-side UI library built on top of prototype • Google Web Toolkitserver side java libraries that emit javascript and html • Component ArtServer controls and update panels for ASP.NET • Microsoft ‘Atlas’ - **This presentation** • Many more: http://wiki.osafoundation.org/bin/view/Projects/AjaxLibraries
Problems with the landscape • Most existing libraries are: • Incomplete • Some improve on the javascript structure • Some do cool UI effects • Some on client side • Some tied to a particular server technology • Can’t be used with each other
3 Parts of Atlas • Client Side Stuff **this presentation** • Server Side Stuff • Atlas Control Toolkit
Briefly - Microsoft ASP.NET 2.0 Server Extensions • Server Controls • Script Manager • Update Panel • Server side equivalents of UI controls • Server Control extensions • Server Extensions • Web Services Bridge • JSON serialiser • Javascript proxy generation • Bridge files (*.asbx) to connect via the server to external web services.**Awesome for mashups!! • Application Services Bridge • User authentication (using membership service) • User data storage (using profile service)
Briefly - Microsoft ASP.NET 2.0 Ajax Toolkit Overview Asp.net Official Link:http://atlas.asp.net/default.aspx?tabid=47&subtabid=477 Project Source on Codeplex: http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=AtlasControlToolkit Join the open community effort!
The Microsoft Ajax Family • Formerly codenamed ‘Atlas’ • Client-side framework • Server side extensions • Atlas Control Toolkit • New Official Names, Sept 2006: • Microsoft Ajax Library **this presentation** • Microsoft ASP.NET 2.0 Ajax Extensions • Microsoft ASP.NET 2.0 Ajax Toolkit
Microsoft Ajax Client Library More than just Ajax: • Cross-Browser Framework • Extends Javascript to a rich OO model • Components, Events, Actions • Imperative or Declarative programming paradigm • Control Binding • Control Extensions & Behaviours • Data Binding • Not just for ASP.NET • More efficient AJAX calls using JSON
Microsoft Ajax Client LibraryBrowser Compatibility Browser Compatibility Layer Supports • IE • Mozilla • Safari • Opera (in the works)
Microsoft Ajax Client LibraryScript Core - Rich OO model Your client-side script supports: • Inheritance • Interfaces & Abstract classes • Namespaces • Enumerations • Delegates
Microsoft Ajax Client LibraryBase Class Library Useful types: • StringBuilder • Debug • Event • IDisposable Other Support: • Serialisation for JSON • Authentication integration with the server counterpart • Profile integration with the server counterpart Abstractions: • Abstractions for XMLHTTP • WebRequest • WebResponse • Further Abstractions for invoking WebMethods • Aspx pages • Web services • any server class
Microsoft Ajax Client LibraryClient-side Programming Models • Traditional Imperative Code And/or • Declarative XML-script mark-up called ‘Atlas Script’
Microsoft Ajax Client LibraryComponents, Events & Actions Components Components arereusable, self-describing types Common components include: • ControlsIncludes visible UI Controls (eg. ListView, VEMap)and non-visible controls (eg. Timer, Counter) • BehavioursPre-written functionality to attach additional semantics to existing controls (eg. drag/drop and hover behaviours) • ValidatorsLike Behaviours, but allow you to define validation rules for input controls
Microsoft Ajax Client LibraryComponents, Events & Actions Events Components can raise events. Events can have Actions attached to them. (eg. An event could be raised when a property changes on the component) Actions Actions allow performing work, by calling Component methods or setting properties in response to events
Microsoft Ajax Client LibraryControl Bindings Control Bindings Bindings allow wiring up components to transfer property values from one component to another. Transformations can be called in the process, and methods can also be invoked. <span id="label2">Empty</span> <input type="text" id="textBoxInput" /> <script type="text/xml-script"> .. <textBox id="textBoxInput"/> <label id="label2"> <bindings> <binding dataContext="textBoxInput" dataPath="text" property="text" /> </bindings> </label> ..
Control Extensions & Behaviours Control Extensions exist to add interesting functionality to simple html or asp controls • Client Side Extenders • Eg. AutoCompletion • Server Side Extenders • Eg. AutoCompletion
Microsoft Ajax Client LibraryData Binding Atlas provides a rich set of data controls using familiar html templates:Variety of DataBound Controls • ListView • DataNavigator • ItemView • Paging Control • Additional Client-side behaviours • Sorting behavior • Variety of Data Sources • DataSource • DataTable • XML Data Source – uses XPATH on the client side for filtering!! This is a whole topic of its own, and ripe for future usergroup presentations.
Essential Tools • http://www.fiddlertool.com • IE powertoy from Microsoft • HTTP debugging proxy. Inspect traffic, set breakpoints, and ‘fiddle’ with requests • Microsoft Internet Explorer Developer Toolbar • View & manipulate Browser DOM, Caches • Highlighting & labelling of html elements • Validate CSS, HTML, Links
Real World Web 2.0 Spyk.com Property Search Using: • Atlas (mostly client-side with service calls) • Virtual Earth • SQL Server • ASP.NET • .NET multithreaded rich client for spidering properties.
Future Atlas Presentation Topics: Client-side Data Binding Client-side Authentication + Profile Server Control Creation Web Services Bridge for Mashups Gadget Creation