After being "born" by Jesse James Garret with a famous article "Ajax: New solution for web applications" ("Ajax: A New Approach to Web Applications", Adaptive Path, February 2005), Ajax becomes There is a lot of popularity in the web world and there are more and more "Ajax" websites like Google Maps, A9.com and Flickr. (Ajax technology allows creating web applications with rich interfaces and can access data from the server to update part of the current web content without having to reload the entire page as in the transmission website. Refer to "Ajax Programming Techniques" - TGVT A 12/2005, p.124)
Microsoft also has Ajax-style web applications such as MSN Virtual Earth (http://www.virtualearth.com) and Start.com. In fact, Microsoft joined the Ajax game pretty soon. All Ajax components - DHTML, JScript and XMLHTTP are available in Internet Explorer 5 and Outlook Web Access has been using these techniques since 1998. Before Ajax became popular, Microsoft used the method of Callbacks scripting methods. Ajax (but more restrictive) similar working method in the development process of ASP.NET 2.0.
Capture the Ajax trend, at PDC 2005 (Professional Developer Conference - annual conference for professional developers) Microsoft has announced an ambitious Atlas project, promising to provide a more comprehensive and single platform. simplify Ajax web application development.
TARGET
Atlas' first goal is to support client-side development, providing features:
• Additional object-oriented API library for JavaScript.
• Compatible browser automatically (supports applications that run with multiple browsers).
• API library and components that support rich user interface (UI) features.
• Develop declarative client (XML script) to simplify program code.
Atlas' second goal is to combine client-side development with server-side development. Instead of focusing on the client-side or server-side program, Atlas provides support for both, allowing task processing in the most meaningful place. Server side (server), ASP.NET has the following features for Atlas application:
• Web services capable of combining with Atlas applications.
• The web server control generates the necessary client code for the Atlas application.
Atlas: Ajax in Microsoft style Picture 1 ARCHITECTURE
In its simplest form, the web application uses Atlas client's script library to call a service or application on the web server. But with more complex web applications, you will need Atlas server-side components. Not only is the Ajax library complementing ASP.NET, Atlas is designed to be a complete development platform from client, server to communication between client and server. In addition, Atlas provides an application platform - allowing developers to "assemble" the components available to create applications.
Client component
On the client side, Atlas provides the Client Script Framework that can be viewed as an extension of JavaScript, supports object-oriented development, multi-browser compatibility, communication with web services and rich user interface features. Microsoft promises Atlas Client Script Framework to work with all browsers and any web server. It does not require any client-side installation.
Atlas' client-side script library is a set of JavaScript files (.js), including the following components:
• Core (Script Core): adds object-oriented properties for JavaScript (such as class, interface, inheritance, event handling, data type .). This is considered to be a miniature .NET CLR on the client side.
• Base Class Library: provides basic classes and structures used in .NET Framework development (such as StringBuilder, Debug, Event .); provides API library to process client code declaration form (XML). This class also provides support for XMLHTTP with WebRequest and WebResponse, allowing WebMethod calling in .asmx and .aspx files or any web service.
• Component Model and UI Framework (Component Model): defining components, mechanisms for linking together components and implementation methods. The UI Framework section defines interface component types along with behavior (like drag-and-drop).
• Controls and Components: Controls set of built-in components and controls for client-side development such as Timer, Counter, regular form controls , controls associated with data (ListView) or map control (based on Virtual Earth).
• Browser compatibility layer (Browser Compatibility): processing compatible with browsers (currently, Atlas can run on IE, Safari and Firefox).
Server component
Atlas server component is built on ASP.NET 2.0, basically including ASP.NET web services and server controls. These server components work in conjunction with Atlas' client library.
• Control server (Atlas Server Controls): implement client code (JavaScript code and XML declaration code) with Atlas properties. Atlas server controls are similar to ASP.NET server controls, useful for server-side developers. In addition to the usual controls such as command buttons, text boxes, check boxes, links . there are special Atlas controls to handle client behaviors like dragging and clicking . All controls This will be integrated into Visual Studio to allow working on the design screen like the ASP.NET server controls.
• Web Services Bridge: allow client code to communicate (2-way: send and receive data) with .asmx web service of ASP.NET (as well as WebMethod defined on .aspx page ) and Indigo's .svc (latest SOA technology is expected to come with Windows Longhorn in 2006) or any web service.
• Application Services Bridge (Application Services Bridge): use Web Services Bridge to provide ASP.NET application services such as authentication or access and data updates.
Client and server components and declaration code
Declaration code is an interesting feature of Atlas. Control the server to generate the declaration code and send it to the client in XML format. The Atlas Client Framework will analyze this declaration to generate the code (expression and behavior of the page) right at the browser (client) at execution. This method avoids creating a lot of JavaScript code and then embedding it on the page before sending it from the server. By doing this on the client side, the page size can be kept relatively small and the developer does not need to bother with the characteristics of each browser on the client.
Microsoft seems to focus on this type of declarative programming, but you can still implement JavaScript code directly, but note the limited object-oriented features of JavaScript.
Atlas: Ajax in Microsoft style Picture 2 REALISTIC
Atlas is still in development. Microsoft is expected to launch this Atlas in 2006 as an additional component to ASP.NET 2.0 and it will be integrated with Visual Studio 2005.
However, now you can get acquainted with Atlas. Microsoft now has an ASPNETAtlas.vsi file available to install the sample Atlas project (Atlas Web Site Template, http://msdn.microsoft.com/asp.net/info/future/atlastemplate/) on Visual Studio 2005 (http : //msdn.microsoft.com/vstudio/) or Visual Web Developer Express (http://msdn.microsoft.com/vstudio/express/vwd/). This project has everything needed for an Atlas web project, including the Atlas library.
There are also several sample Atlas applications, you can refer to the webblog of Nikhil Kothari (http://www.nikhilk.net) - software architect of Microsoft, who presented Atlas at PDC 2005 You can also easily find many other Atlas application templates on the Internet.
In addition, there are other solutions that allow Ajax-style application development with ASP.NET 1.0 or 2.0 like My Ajax.Net by Jason Diamon (http://jason.diamond.name/weblog/category/my- ajax-dot-net /) and Michael Schwarz's Ajax.NET (http://ajax.schwarz-interactive.de/csharpsample/).
CLIENT HAY SERVER ??
One of the key points of Ajax-style applications is to minimize communication between client and server.The problem to consider is to send-receive what information and which task to handle?This involves the development model centered on the server or client. In the development model centered on the client side, the server initially sends the client information to declare "how to display" with the "behavior" of the user interface. Declare this interface to execute at the client to handle user interaction behavior, send data to the server and receive data (not HTML code) in response, and use this data to generate instance and content . The server takes other resources to the user interface through services. This model enables efficient implementation of situations from computation to dynamic data at the client. This model also allows instant handling of user behavior and is capable of performing visual effects such as drag-and-drop. The price of this solution includes the effort to write client code no less and the transfer of interface logic from server to client leads to the need to build and learn using new tools, new design models . In the server-centric development model, the server sends HTML code to the client instead of pure data. The client process is much simpler, primarily responsible for submitting the request and then receiving the returned HTML code and placing it in the correct place on the page. Most interaction processing and interface are on the server. While some people like the new "path", others prefer the familiar server-side development model.There are features that you can still follow the traditional development model, but features like user interface interaction require an Atlas-style development platform - allowing a rich client model to be balanced with The server-side model is available.