|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
TOP THREE LINKS YOU MUST CLICK ON Testing Exposing and Preventing Errors in AJAX Applications
Using a quality infrastructure
By: Nathan Jakubiak
May. 16, 2007 07:15 PM
When organizations focus on exposing errors in any kind of application, they traditionally focus on testing. Once an application is finished, it's passed to a QA team to find and report problems. There's some back and forth as the QA team reports problems, development fixes them, QA retests the application, and so on. Once that cycle has been repeated a few times (if there's time for that), the application is released. This approach is problematic, however. The quality of the application is assessed at the end of the project. By that time, incorrectly implemented requirements or bugs may be firmly planted in the application and have features built on top of them, and addressing the problems can be very difficult and time-consuming, if not impossible. With no way to determine whether the quality objectives are actually being met throughout the development process, it's impossible to deliver a truly quality application.
The answer to ensuring quality lies in creating a quality infrastructure that enables an organization to establish quality through all stages of development. However, in the case of AJAX applications, the following challenges arise:
1. AJAX applications are very complex. A large number of components make up the application such as application server, database server, back-end Web Services, client-side JavaScript engine, and different browsers with different JavaScript/DOM implementations, just to name a few. Logic no longer resides only on the server, but also in client-side JavaScript. Figure 1 shows the aspects of a typical AJAX application on which I focus in this article. Because of these complexities, AJAX applications require specific ways of ensuring their quality. In this article, I'll focus on what it means to define a quality infrastructure, and I'll also explain what that looks like in detail for an AJAX application.
Defining and Enforcing Development Best Practices One source of best practices that you should adopt is common industry best practices for how code should be written to prevent errors. Conventional wisdom exists regarding the best way to write code in different languages to solve different problems. Any given project may not benefit from all the coding best practices that exist, but every project can benefit from some subset of them. In addition, your organization may have defined its own internal standards for ensuring that applications are written properly. Most development groups already have these kinds of best practices defined, either formally or informally. However, defining them is only part of the solution - you must also enforce these best practices. Best practices do no good unless they're followed. You'll get pushback from developers here. I know because I am one. Developers don't like being told how to write code. However, if the infrastructure is defined in such a way that best practices can be enforced and followed painlessly, developers can easily adapt. Enforcing best practices means using some means (either open source or from a vendor) of validating the code on a regular basis to ensure that best practices are being followed. Each developer should be able to run best practices validation on his code before checking it in. There should also be a nightly process running against the entire code base that identifies violations and which developer is responsible for them, and sends a report to that person so that he can fix them. This handles cases where the developer forgot (or refused) to check his code before he checked it into the source code repository.
Development Best Practices for AJAX Applications
JavaScript
Security issues are more important for AJAX applications than for traditional Web applications. There are two reasons for this. First, the application logic that now resides on the client in the form of JavaScript exposes more of the guts of the application to would-be hackers, making it easier to determine how to attack the application. Second, the automatic page update mechanisms of many AJAX applications provide more opportunities for cross-site scripting kinds of exploits. LATEST AJAXWORLD RIA STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||