e-Gov meets Web 2.0

Related Links

The Web developer's toolbox

When you're ready to start building Web 2.0 applications, the Web itself is your best resource. Here's a quick-and-dirty directory of links to downloadable tools, tutorials and other things you need to create a more citizen-centric online presence.

Adobe Flex SDK. A free collection of tools for building Flash-based applications, including a compiler, class library and basic components. www.adobe.com/products/flex/sdk

AJAX: A New Approach to Web Applications. This online essay was written by Adaptive Path co-founder Jesse James Garrett, who coined the term AJAX. GCN.com, GCN.com/617.

AJAX Toolkit Framework. Posted by IBM Corp., this site features tools for developing, debugging and testing AJAX applications. .

ASP.NET. This site is Microsoft's clearinghouse for ASP.Net tools and tutorials. www.asp.net.

ASP.NET Atlas. This AJAX toolkit from Microsoft Corp. works with the company's ASP.Net framework. A beta version, which works as plug-in for Visual Studio 2005, can be downloaded for free. atlas.asp.net.

ASP Tutorial. A highly detailed online tutorial, including ASP samples, from a group called W3Schools, which specializes in e-learning. www.w3schools.com/asp.

Dev-PHP IDE. An open-source IDE for programming with PHP. GCN.com/620.Dive into Python. An online book for learning the Python language. diveintopython.org.

Ruby on Rails. The home page for Rails, the open-source Web development framework, with software downloads and tutorials. www.rubyonrails.org.

Starter Toolkit for DB2 on Rails. The free download allows IBM's DB2 database to be used by Ruby on Rails (Rails originally worked with MySQL and PostGreSQL open-source databases). GCN.com, Quickind 622.

Each year, thousands of people contact the Veterans Affairs Department asking where long-lost relatives and others who served in the military are buried. VA has always had the information on hand'in some form'across various sets of internal electronic records. Historically, people would call or write the agency, and diligent employees would find the location and return the answers.

In 2004, though, VA debuted a Web site called the Gravesite Locator, which included a simple search program that people could use themselves to discover where fallen soldiers rested. The site brought together data from multiple sources and presented it to the public as one seamless user interface. And it moved beyond first-generation e-government initiatives to exploit the latest Web application technology.

During the mid-1990s, VA's National Cemetery Administration created the Burial Operation Support System to keep track of service members in the agency's national cemeteries. Later, a read-only database was built to collect information from this and other sources, which the Locator, in turn, can tap.

'It was natural progression of what we had to do internally,' said Joe Nosari, deputy CIO for Memorial Affairs, whose office built the database.

Today, most agencies have well-developed Web sites that offer a wide range of materials'much of it static information such as documents. A few progressive organizations however, such as VA's Memorial Affairs, have taken a step beyond early e-gov programs, using the Web as a platform for delivering interactive services, aka Web 2.0. These new services, or Web applications, make better use of an agency's data and other resources, including human resources, by creating bridges from public-facing Web sites to back-end databases. And increasingly, thanks to a slew of new open-source and commercially available tools, government Web applications can be as rich as software run on a PC.

We've come a long way since the mid-1990s, when agencies posted their first Web sites. Back then, if you wanted Web surfers to tap into a database, you used the Common Gateway Interface and a programming/scripting language of choice. Web server software would recognize a CGI request and look in a directory for the executable file that would handle such advanced tasks as actually accessing the database.

Though groundbreaking, CGI has its shortcomings, specifically in areas of security and performance. Not surprisingly, Web designers have moved on to more advanced technologies with names like Ruby on Rails, Python and AJAX. Others have embraced widely recognized application platforms from Microsoft Corp. and Sun Microsystems Inc. A survey of the Web application landscape shows variety is truly the spice of e-gov life (see sidebar, right, for a menu of technologies).

These days, there's significant buzz surrounding Ruby on Rails, a Web application framework developed by David Heinemeier Hansson, a partner at Chicago Web application development company 37signals LLC. Freely available, Rails has grown immensely popular in its short existence.

'Ruby on Rails changed some fundamental assumptions about Web application development,' said Barg Upender, who runs his own software development firm, Concentric Methods LLC of Potomac, Md. Upender taught a six-week class on Rails for the National Institutes of Health.

In a nutshell, developers use the Rails package because it automates several mundane tasks required to set up a database-driven Web site. Most frameworks (frameworks being the fancy word for a collection of tools to develop a piece of software) offer a great deal of flexibility in allowing developers to tweak specifications. Rails does also, but offers a set of unusually intuitive helper scripts that cover many common duties.

Hansson's motto for designing Rails was 'convention over configuration.' When you start a new project and identify a database, Rails automatically generates a set of methods to create, read, update and delete the records in that database. It also builds a Web page with fields that correspond to those in the database. If you add a field to the database, and a new field appears automatically on the corresponding Web page. In the end, Rails can help minimize, if not eliminate, the need to write structured query language commands to read, write, alter or delete data.

Of course, Rails isn't the only way of establishing the connection between a database and a Web page, an essential link for providing richer Web interactivity. Other languages and frameworks, such as Python, Active Server Pages and PHP, can do the job as well. And they even predate several so-called Web 2.0 technologies.

Many feel Python is one of the easiest programming languages to learn and read. If you write scripts to handle such duties as accessing databases, performing authentication, or mapping requests to specific programs, Python would be the natural choice.

'Python is an excellent language for people who are accidental programmers or part-time programmers,' said Joel Burton, head of the Washington D.C. Python/Zope users' group (Zope is an application server based on Python). 'Python code is particular elegant for taking an idea in your head and simply expressing it in code.'

As an interpreted language, Python code does not need to be compiled. A Python module or service can be added to the server software to execute the code. After you write instructions in a plain-text file, you simply place that file in a directory where a Web server can find it.

For those who prefer a visual environment, Microsoft has a framework for building Web applications that relies heavily on cut-and-paste, point-and-click interfaces. Using Microsoft Visual Studio or Visual Web Developer Express, developers can visually link databases with Web pages and write business logic to manipulate that data. The site then can be rendered with Active Server Pages, Microsoft's technology for generating Web pages on the fly. Used with Microsoft's Internet Information Server, ASP creates dynamic Web pages, or pages generated using information from a database or personalized to individual users.

Microsoft has offered ASP for several years now, but the company recently expanded the software to encompass its .Net platform, said Keith Smith, Microsoft senior product manager. With .Net, developers can build programs in their favorite languages, such as C++ or Visual Basic, and the applications will work together on a common run-time platform. ASP.Net separates the appearance of a site from the logic that generates the content, allowing developers to change the style of a Web site without worrying about modifying the underlying logic, or vice versa.

The open-source alternative

To create dynamic Web pages, most developers use either ASP or an open-source language called PHP, which performs similar duties. (PHP stands for PHP Hypertext Preprocessor.) A quick check on the Google government search service finds about twice as many government Web pages generated by ASP as by PHP (GCN uses PHP for its own Web site).

Although PHP offers many of the same features as ASP, one of its chief advantages over Microsoft's offering is that it operates across platforms, said Robyn Wyrick, head of the Washington, D.C., chapter of the PHP users' group, which is holding a conference in October. If a set of PHP scripts for a Microsoft Windows server later need to run on Unix servers, developers can simply move the scripts to a Unix directory and run without modification, Wyrick said.

But as Web applications grow more complex, agencies, including VA's Memorial Affairs, turn to well-established, full-fledged application servers, which deliver rich applications over a network to a Web browser. They format the pages' look and feel, and handle the orchestrations needed to generate the content. Most app servers use the Java 2 Enterprise Edition set of specifications, maintained by Sun Microsystems.

'J2EE brings together a lot of different pieces. It is almost a smorgasbord of technologies that are bundled under the J2EE label,' said Tom Palmer, chief application architect for USinternetworking Inc. of Annapolis, Md.

'Once you start to talk about real enterprise applications, it is not just you and your Web server and your database. It's a lot of other heterogeneous systems that have to be run together,' Palmer said.

For VA's Grave Locator, a J2EE approach seemed the natural choice, Nosari said. Material from the Burial Operation Support System resides on an Oracle database. Every night, it's copied from the original database to the read-only database set up for the Web site. VA also adds information on service members buried in private cemeteries. Today, the site records more than 6 million markers, and the National Cemetery Administration is adding about 1,000 records per day.

Recently, Nosari's Web team added another function that draws data from a different source. Visitors can now look at maps of the graveyards listed within their search results. These maps are gathered from the individual cemeteries, which run on-site kiosks that visitors use to find grave markers when offices are closed.

Look and feel

Just as a plethora of new technologies ease the back-end development of Web applications, new technologies such as AJAX have popped up to improve the look and feel of Web applications.

When Google Inc. of Mountain View, Calif., introduced its U.S. Government Search engine (www.google.com/ig/usgov) last month, it offered the ability to personalize the site, which proved easier than on most other sites. On many portal-style pages you can add a box summarizing weather or news headlines. But this one lets you actually drag the boxes around on the screen and place them in any location you'd like.

This magic comes courtesy of a new presentation technology called Asynchronous JavaScript and XML (AJAX). Although JavaScript and Extensible Markup Language have been around for a while, the combination standardizes the way data gets passed between server and browser, said Christopher Warner, solutions architect at Software AG Inc. of Reston, Va.

Thanks to Google's various Web 2.0 services, including Google Maps, AJAX has caught the interest of Web developers (Microsoft has been using an AJAX-style program for several years to replicate its Outlook e-mail software in a Web browser). Both the Google and Microsoft services feel more like regular applications than Web pages.

Traditionally, when a live Web page needs a change or update, the browser sends a request to a server, which sends back a new page. This approach limits the features a page can offer and gives them a clunky feel. In contrast, AJAX deposits a JavaScript-based processing engine in the browser, usually in a hidden frame. The engine acts as liaison between the browser and the server, smoothing over performance during transitional times and allowing the developer to offer richer capabilities.

The National Oceanic and Atmospheric Administration's Pacific Marine Environmental Laboratory used AJAX to create a browser-based application called the Dapper Data Viewer for viewing oceanographic and atmospheric data. Users can interact with the map without having the entire page redrawn. They can also zoom in or out, or drag different parts of the map into the viewing area.

AJAX competes against a better-known technology, Flash, which Adobe Systems Inc. recently acquired. Most of us think of Flash for short (and sometimes distracting) browser-based animations. In fact, the Flash player is a virtual machine that can run not only animations but also complex scripts (Adobe uses its own ActionScript, which is very similar to JavaScript).

Adobe has packaged its Flash tools into a software development kit called Flex, which comes close to providing the functionality of a full application development environment, said Christophe Coenraets, Adobe Flex Technical evangelist.

While AJAX uses XML tags, which take up a lot of bandwidth, Flash swaps data via binary protocols, which cut the size of the data being moved. In addition, basic Flash-based applications don't need server-side components. A Flash application works on any browser where Flash is installed, which is to say most browsers in use today.

But whether Flash, AJAX or some other technology becomes the dominant method of presenting Web applications, the trend is clear: Users can expect browsers to serve as the home for many, if not most, of the applications they'll use in coming years. And by using tools such as AJAX and Rails, agencies can be at the forefront of the Web application revolution.