Saturday, January 24, 2009

Ajax frameworks - contd

In this post, I am going to talk about the 3 major framework created by the big Corporations - Microsoft, Google and Adobe - each offering their own version to enable their Evangelists and followers to continue to use their technology. I am reproducing below the writeups from each of these corporates - my aim is to provide a single page where all the information is available.
Google Web Toolkit (GWT)
GWT promoted by Google looks at allowing developers to quickly build and maintain complex yet highly performing JavaScript front-end applications in the Java programming language.

How Google Web Toolkit works

With Google Web Toolkit (GWT), you write your AJAX front-end in the Java programming language which GWT then cross-compiles into optimized JavaScript that automatically works across all major browsers. During development, you can iterate quickly in the same "edit - refresh - view" cycle you're accustomed to with JavaScript, with the added benefit of being able to debug and step through your Java code line by line. When you're ready to deploy, GWT compiles your Java source code into optimized, standalone JavaScript files. Easily build one widget for an existing web page or an entire application using Google Web Toolkit.
ASP.NET AJAX from Microsoft

ASP.NET AJAX is a free framework for quickly creating efficient and interactive Web applications that work across all popular browsers.

ASP.NET AJAX is built-into ASP.NET 3.5. It is also available as a separate download for ASP.NET 2.0. With ASP.NET AJAX you can:
  • Create next-generation interfaces with reusable AJAX components.
  • Enhance existing pages using powerful AJAX controls with support for all modern browsers.
  • Access remote services and data from the browser without tons of complicated script.
  • Take advantage of the improved efficiency and ease of use in Visual Studio 2008, with its built-in support for ASP.NET AJAX, improved JavaScript support, and a new Web page designer interface.

What is ASP.NET AJAX?

ASP.NET AJAX refers to new components in ASP.NET that allow for building rich AJAX styled web applications using the design patterns familiar to ASP.NET developers. ASP.NET AJAX 1.0 was available as a separate add-on for ASP.NET 2.0. With the release of ASP.NET 3.5, the AJAX components have been integrated into ASP.NET (no separate download required). AJAX components in ASP.NET integrate cross-browser script libraries with the ASP.NET server side Web application framework. This integrated architecture empowers developers to rapidly create pages with sophisticated, responsive user interfaces and more efficient client-server communication by simply adding a few server controls to their pages.
It allows developers to choose their preferred method of AJAX development, whether it is server-side programming, client-side programming, or a combination of both.

Server-side AJAX Programming
Developers familiar with ASP.NET's server-side programming model can add AJAX functionality using the familiar server controls, and the convenient drag and drop gestures. For example, partial update functionality can be added to ASP.NET applications by wrapping sections of their websites in the AJAX server control 'UpdatePanel', which enables the server controls to update without a post back. This is as simple as AJAX programming gets. Developers don't have to learn about the underlying scripting or browser technologies. Based on the ASP.NET server side design patterns, developers continue to get key advantages such as a clean declarative model of specifying web page UI, an event-driven programming model, and a rich set of APIs from the .NET Framework.

Client-side AJAX Programming

Developers with a basic understanding of JavaScript can leverage client-side AJAX framework, that allows building client centric AJAX applications. For example, the client AJAX Framework allows developers to build rich client side components and controls and make calls to remote servers, including web services and then updating the Web page with the response. The response can be an HTML snippet or an XML document, allowing for simple or extensive updates to the Web page. The Client side AJAX Framework works well with ASP.NET. The ASP.NET team also ships this framework independently as Microsoft AJAX Library. Since this framework is not tightly coupled with ASP.NET, it can be used with other server side technologies as well such as PHP and Cold Fusion.

ASP.NET AJAX Programming

ASP.NET AJAX shines in its ability to combine the best of server-side and client-side AJAX programming, providing Web applications with a user experience similar to the richness of traditional desktop applications. Watch some of the following videos to learn how simple it is to get started with ASP.NET AJAX programming.

Spry framework for Ajax from Adobe

The Spry framework for Ajax is a JavaScript library that provides easy-to-use yet powerful Ajax functionality that allows designers to build pages that provide a richer experience for their users. It is designed to take the complexity out of Ajax and allow designers to easily create Web 2.0 pages.

The Spry framework is a way to incorporate XML, JSON or HTML data into pages using HTML, CSS, and a minimal amount of JavaScript, without the need for refreshing the entire page. Spry also provides easy to build and style widgets, providing advanced page elements for end users. The Spry framework is HTML-centric, and easy to implement for users with basic knowledge of HTML, CSS and JavaScript. The framework was designed such that the markup is simple and the JavaScript is minimal. The Spry framework can be used by anyone who is authoring for the web in their tool of choice.

Happy programming viewers.

Monday, January 19, 2009

Ajax framework

Continuing on my write up on Ajax, this post is going to deal with Ajax framework. After the framework posting is over, there will be one more poston this topic of web 2.0.

The AJAX Framework is a cross browser framework that allows developers to quickly develop web pages that can call web services, web pages and other types of content through JavaScript without having to submit the current page. The AJAX Framework Supports both GET and POST and works with Internet Explorer 6+, Opera 8+, Safari 3+, Firefox 2+, Google's Chrome and other Mozilla based browsers.

The AJAX Framework was developed by Jason Graves and is free to use under the GNU General Public License (GPL).

http://www.godlikemouse.com

Ajax framework is an engine and is intended to suppress the delays perceived by the user when a page attempts to access the server. A framework eases the work of the Ajax programmer at two levels:

  1. on the client side, it offers JavaScript functions to send requests to the server.
  2. On the server side, it processes the requests, searches for the data, and transmits them to the browser.

Some frameworks are very elaborate and provide a complete library to build web applications.

Types of frameworks

Ajax frameworks can be loosely grouped into categories according to the features they offer and the skills required of the user:

Direct Ajax frameworks

These frameworks require HTML, CSS and Ajax expertise: as a developer is expected to author pages directly in HTML, and framework APIs deal directly with HTML elements. Cross-browser APIs are provided for a variety of purposes, commonly including communications, DOM manipulation, event handling, and sizing/moving/animating HTML elements. While these frameworks are generally smaller, they are commonly used for a web site such as a shopping experience only

Ajax component frameworks

These frameworks offer pre-built components, such as tabbed panes, which automatically create and manage their own HTML. Components are generally created via JavaScript or XML tags, or by adding special attributes to normal HTML elements. These frameworks are generally larger, and intended for web applications. Some component frameworks require the developer to have extensive HTML/CSS/Ajax experience and to do cross-browser testing. For example, grids, tabs, and buttons may be provided, but user input forms are expected to be authored directly in HTML/CSS and manipulated via Ajax techniques. Other frameworks provide a complete component suite such that only general XML and/or JavaScript abilities are required.
Ajax component frameworks can enable more rapid development than direct Ajax frameworks, but with less control, hence it is key that an Ajax component framework provides the following:

  • customization APIs, e.g., an event that fires when the user stops editing within a grid
  • skinning facilities, where appearance can be changed without affecting behavior or layout
  • programmatic control, e.g., dynamically adding tabs or dynamically creating components based on user data
  • extensibility—creation of new components based on other components, so that the benefits of a component-based framework are not lost

Server-driven Ajax frameworks

Several frameworks offer a server-side component-based development model with some degree of Ajax support. Components are created and manipulated on the server using a server-side programming language. Pages are then rendered by a combination of server-side and client-side HTML generation and manipulation. User actions are communicated to the server via Ajax techniques, server-side code manipulates a server-side component model, and changes to the server component model are reflected on the client automatically.
These frameworks offer familiarity for server-side developers at the expense of some degree of power and performance. Ajax frameworks that handle presentation completely within the browser offer greater responsiveness because they handle many more user interactions without server involvement. The main disadvantages of the server driven model is the number of network requests and the inability to provide offline support. However, this approach is followed where the ajax architecture cannot be utilised to the maximum.

The following webpost from Minidxer details out a list of ajax framework and a brief writeup of each of these frameworks.
http://ntt.cc/2008/02/13/the-most-complete-ajax-framework-and-javascript-libraries-list.html

In my next post I will write in detail about the Microsoft, google and adobe frameworks available for the developers.