Documentation Index

CPAINT :: Cross-Platform Asynchronous INterface Toolkit

Features

Not to be slack, but most of the CPAINT features can be found on the changelog. :-)

However, we started CPAINT because we wanted to build a better AJAX toolkit, so here is a discussion of the major features that we believe set CPAINT apart from other open-source AJAX toolkits.

Separation of Presentation and Logic

This was one of the major reasons why we built CPAINT. The majority of AJAX toolkits available today force you to include both your frontend presentation and backend logic in the same file. While this may work perfectly fine for short code-blocks or smaller web sites, when it comes to building enterprise-strength web applications, code reuse allows the project to be completed by multiple developers and share code across multiple applications.

We designed CPAINT so that it truly does not matter how far apart your presentation and logic files are, provided they can both be accessed by the user's browser. (In fact, utilizing the proxy utility, you can access files that are located on internal servers without having to open them up to the public, files located on other external servers outside the presentation file's domain, or access XML or WSDL servers.)

True to the AJAX Acronym

Most AJAX toolkits do not even support XML, which we believe is a little misleading to say the least. The CPAINT backend allows developers to easily return properly formatted XML to the frontend where it can be used directly or be transformed into a JavaScript object automatically by the CPAINT frontend functions. In addition, we plan on supporting new formats (such as JSON) in the near future.

Single API, Multiple Languages

While some AJAX toolkits support multiple languages (such as PHP, ASP, and PERL), differences exist between each language-specific implementation. We have worked extremely hard to ensure that each implementation is identical across each language that we support now and in the future. This eliminates you from having to learn a new toolkit and API if you happen to develop in heterogeneous environments.

Easy, Flexible API

We wanted CPAINT to be the "swiss army knife" of AJAX toolkits. That means, we have a simple API that can easily be extended or modified to fit your needs. In both the frontend and backend code, we provide you with utility functions, such as those for generating XML on the backend and transforming XML into a JavaScript object on the frontend, that you can utilize if you wish.

Because all of the code was refactored and improved in v2.0, you can easily remove these utility functions from the frontend or backend code if you need to save disk space or bandwidth. This also means that we, the developers of CPAINT, will be able to implement and release new functionality for your use in the future without breaking code-compatibility (both CPAINT code and your application code).

Greater Control of the XMLHTTP Object

In the AJAX toolkits we have seen in the past, the developers of that toolkit controls the behavior of the XMLHTTP object, which does not necessarily fit everyone's needs. We've abstracted that control through the use of default flags and configuration options that can be changed statically or dynamically as your code executes. This includes changing the connection type, URI, backend function name, transport method, return data type, synchronicity, and reuse of the XMLHTTP object.

Retrieve Non-local or Non-CPAINT Files

The frontend can work in conjunction with the included proxy utility scripts to retrieve data from remote servers or servers on an internal network that you don't wish to expose to the public. You can also use the frontend to interface with backend functions that was not implemented using CPAINT or retrieve static XML or HTML files - provided they are accessible via the web browser.