Joe Lennon

Rants, Raves & Recommendations

Archive for the ‘ajax’ tag

Maximizing JavaScript and Ajax performance

without comments

(This article was published on IBM developerWorks in September 2010)

In the early days of the web, maximizing the performance of a web page usually meant avoiding the use of unnecessary HTML markup, keeping the amount of JavaScript code to a minimum, and heavily reducing the file size of any images so that the typical surfer didn’t have to go away and make a cup of coffee while your page loaded.

Advancements in various aspects of the web have meant that we are now faced with a whole new set of performance considerations. Despite the fact that DSL and broadband have made high-speed Internet access far more accessible to many people, our expectations of load time and responsiveness have also evolved to a state where we look for instant results when we perform an action on a page. The emergence of Asynchronous JavaScript and XML (Ajax) allowed developers to deliver a desktop-like experience in web applications, no longer requiring entire pages to load before responding to an event. The advantages of this are obvious, but it also led to the average web user expecting this type of responsiveness from all web applications. With the recent rise of the mobile web there is a new challenge of meeting a modern web user’s expectations, and all of this on a target device with a smaller screen, less power, and slower connectivity.

The focus of this article is on informing you of the considerations you should take to maximize the performance of your JavaScript and Ajax web applications. This article offers a set of guidelines on how to best approach any new code you are writing, whether it be in a new application or an existing one. You will also learn about the various tools and techniques that are out there for measuring the performance of your application. Finally, you will learn about various methods of improving performance that do not require you to change your existing code.

This article is available on IBM developerWorks in English and Japanese.

Written by Joe Lennon

November 16th, 2010 at 5:40 pm

Compare JavaScript Frameworks

without comments

Modern Web sites and Web applications tend to rely quite heavily on client-side JavaScript to provide rich interactivity, particularly through the advent of asynchronous HTTP requests that do not require page refreshes to return data or responses from a server-side script or database system. In this article, you will discover how JavaScript frameworks make it easier and faster to create highly interactive and responsive Web sites and Web applications.

JavaScript is an object-oriented scripting language that has long been the client-side scripting interface of choice for Web browser applications. JavaScript lets Web developers programmatically work with objects on a Web page, providing a platform for manipulating these objects on-the-fly. When JavaScript was first introduced, it was commonly used to provide trivial features on Web pages such as clocks and scrolling text in the browser status bar. Another common feature was the “rollover link,” where an image or text color of a link would be changed when the user rolled their mouse over it. In recent times, however, JavaScript has evolved to become far more useful, with the concept of Asynchronous JavaScript and XML (Ajax) bringing a whole new level of interactivity to Web-based programming. Prior to Ajax, any server-side processing or database access would require the entire page to be “refreshed” or a new page to be rendered by the browser. Not only is this slow and frustrating for the user, but it is also a waste of bandwidth and resources.

Read the article at http://www.ibm.com/developerworks/web/library/wa-jsframeworks/

Written by Joe Lennon

February 8th, 2010 at 10:12 am

Use Ext, Aptana and AIR

without comments

Back in July 2008 I wrote a tutorial titled “Use Ext, Aptana and AIR to build desktop applications” that has been published on IBM’s developerWorks website. The tutorial explores the concepts of the Aptana IDE (Integrated Development Environment), the Ext JavaScript library and the Adobe AIR platform, before walking through the process of setting up a development environment for building applications using these technologies. Once the environment is set up, a simple hello world application is created. The tutorial then concludes with the development of a simple contact management utility using Ext and deployed to the desktop using Adobe AIR.

The following is the blurb for the tutorial as found on the developerWorks website:

While Rich Internet Applications and Web 2.0 have been all the rage, the latest wave of emerging technologies are focusing on not only giving Web applications a desktop-like feel but actually bringing them to the desktop. The Adobe Integrated Runtime (AIR) has led the way, allowing Web application developers to leverage their existing knowledge of HTML, CSS, JavaScript, Flash, and Flex to build powerful desktop applications. In this tutorial, you will use the open source Aptana Studio IDE, the Adobe AIR plug-in for Aptana, and the open-source JavaScript framework Ext.

You can view the tutorial in full at http://www.ibm.com/developerworks/edu/os-dw-os-ext-air.html

Written by Joe Lennon

December 9th, 2008 at 2:48 pm