Channel Insider content and product recommendations are editorially independent. We may make money when you click on links to our partners. View our editorial policy here.

A team of AJAX experts is working on a new capability to enable Web applications to work offline.

Brad Neuberg, a San Francisco-based software architect and programmer, said that he, along with the support of some developers at SitePen, of Palo Alto, Calif., is working on the Dojo Offline Toolkit, a small, cross-platform, generic download that allows Web applications to work offline. The tool kit is based on the popular Dojo Toolkit, an Asynchronous JavaScript and XML development system maintained by the Dojo Foundation. Major companies such as IBM and Sun Microsystems are members of the Dojo Foundation.

“I had been prototyping and playing with some ideas around bringing true offline access to Web applications in a simple, generic way,” Neuberg said.

To accomplish his goals, Neuberg said he will be working for the next three months “on bringing the Dojo Offline Toolkit from the drawing board to reality.”

The tool kit will be an open-source library that brings true, offline access to Web applications, where “users will be able to access their Web applications and work with their data even if no network connection is available, just like desktop applications,” Neuberg said.

Neuberg said he sees uses for the technology in consumer Web sites such as Gmail and Blogger and with corporate portals and CRM (customer relationship management) systems, among others.

Dylan Schiemann, chief executive at Web application design and development firm SitePen, said there is considerable demand for a product like the Dojo Offline Toolkit.

“A common user feature request is being able to interact with Web applications and its data while offline,” Schiemann said. The opportunity to respond to this need is what prompted SitePen to work with Neuberg, Schiemann said.

“SitePen and I believe that not having offline ability has been a major speed bump on the way to truly bringing applications to the Web,” Neuberg said. “For the Web to continue its forward momentum, it must gain this ability.”

Schiemann said the team decided from the start to launch the project as an open-source effort.

“Unlike many initiatives that eventually end up as open source, we decided that the best approach would be to do the entire development of the project from start to completion in the open, and contributed to the Dojo Foundation,” Schiemann said. “Given the wide range of applications that could benefit from this capability, we believe it is imperative to engage the community early in order to make this project something that everyone can use.”

Most online retailers aren’t adopting AJAX development techniques yet, according to a recent study. Click here to read more.

The Dojo Offline Toolkit will be fully open source, available under the same licenses as Dojo: the BSD and the AFL, Neuberg said.

To deliver the tool kit, Neuberg said, he does not need to “adopt radically different or exotic programming models, such as loading Single Page Applications like TiddlyWiki from the file system, adopting Adobe’s Apollo framework, or downloading huge, entire Web servers with specialized application logic that run locally, such as Zimbra’s offline solution.”

Instead, the Dojo Offline Toolkit will use a simple, small Web proxy that runs locally. The proxy will cache files that need to cached for later access without hitting the network, Neuberg said.

In addition, to enable the browser to talk to the local Web proxy, the new tool kit will use a standard technology known as PAC (Proxy AutoConfiguration). A PAC file is a small bit of JavaScript that is invoked on each browser request.

With the Dojo Offline Toolkit, the Web browser does not if the user is online or offline, since the proxy serves up the user interface either way, Neuberg said.

The last step of the process is to wrap the Dojo Offline Toolkit into a small installer for each target platform and to have it start up silently on system startup, Neuberg said.

Much of the work on the Dojo Offline Toolkit, Neuberg said, has been done in terms of delivering working prototypes. Yet, there is much engineering work to be done, he added.

The system will use an off-the-shelf, open-source, C-based Web proxy named Polipo to save months of development time creating a custom HTTP/1.1 proxy. Polipo compiles to only 150K and is portable to Windows, Linux and Mac OS X, Neuberg said.

The open-source NSIS (NullSoft Install System) will be used for the Windows installer, while Linux installation will be through Firefox’s XPI (Cross-Platform Installer) technology, Neuberg said. The Mac OS X installer technology has not been determined yet, he said.

The final deliverables for the Dojo Offline Toolkit will include the Dojo Offline proxy; installers and uninstallers; PAC file generation and registration; the Dojo Offline API for easy, application-level access; the Dojo Offline Web-based installer UI for downloading Dojo Offline; documentation; a sample application, Moxie, modified to work with Dojo Offline; and quality assurance and bug fixing.

“Pieces of the Dojo Offline Toolkit have been prototyped to ensure the design is correct, but it mostly currently exists on the drawing board,” Neuberg said.

A key component that comes bundled with the Dojo Offline Toolkit is Dojo Storage, which Neuberg helped develop.

Dojo Storage allows Web applications to store hundreds of kilobytes or megabytes of information inside the browser, with the user’s permission, Neuberg said. It works across 95 percent of the existing installed base of Web browsers, including Internet Explorer, Firefox, Safari, and Mozilla on Windows, Linux and Mac OS X.

“True offline access for Web applications is one of the holy grails of Web development,” Neuberg said. “I believe that providing the Web with true, reliable offline access will open the door to many exciting, powerful possibilities; this is why I have devoted the last few years to figuring out how to bring this ability to the contemporary Web.”

Wrote Neuberg in a post about the Dojo Offline Toolkit, using the upcoming technology: “Consumer Web sites, such as Gmail and Blogger, can continue their relentless march to being the central applications users work with day-to-day by operating even when users don’t have a network; companies can make their corporate portals and sales CRM systems available offline for a mobile work force, such as sales agents out in the field; and the Web itself can begin to replace many custom, vertical Visual Basic and Java Swing applications that could only be done as applications because they had to work offline. With Dojo Offline these can now migrate to the Web, bringing the Web’s operational and development cost-savings to many companies’ internal important applications.”

Check out eWEEK.com’s for the latest news, reviews and analysis in programming environments and developer tools.

Subscribe for updates!

You must input a valid work email address.
You must agree to our terms.