FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Architecture & Design
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
July 01, 2002
The Freedom of Choice

ASP, ColdFusion, JSP, PHP, Perl, Access, MSSQL, MySQL, Sybase, Oracle-does your Web app framework let you take your pick? CodeCharge 2.0 respects your language and database preferences.

(Page 1 of 2)
Creating database-driven Web applications is easy: Just choose your favorite programming language, code some HTML template pages and write a little code to move data from the database to the Web pages and vice versa. Well, that's the theory, anyway. The reality is a bit more complex--it's all too easy to fall into a bottomless rat-hole at either the HTML or the data marshalling level, not to mention trying to capture repeated coding patterns, such as multifield searching, master-detail pages, table layouts and so on. Even if you've invested in learning one of the many Web-app frameworks out there, you can expect a lot of bit-twiddling for a simple application with just a few pages.
July 2002: Freedom of Choice

Software Development
July 2002

Freedom of Choice

ASP, ColdFusion, JSP, PHP, Perl, Access, MSSQL, MySQL, Sybase, Oracle—does your Web app framework let you take your pick? CodeCharge 2.0 respects your language and database preferences.

By John Reitano

Creating database-driven Web applications is easy: Just choose your favorite programming language, code some HTML template pages and write a little code to move data from the database to the Web pages and vice versa. Well, that's the theory, anyway. The reality is a bit more complex—it's all too easy to fall into a bottomless rat-hole at either the HTML or the data marshalling level, not to mention trying to capture repeated coding patterns, such as multifield searching, master-detail pages, table layouts and so on. Even if you've invested in learning one of the many Web-app frameworks out there, you can expect a lot of bit-twiddling for a simple application with just a few pages.

Enter YesSoftware's CodeCharge, a rapid application development environment for the Web. CodeCharge takes a unique approach to Web development, neither operating in a proprietary language nor committing you to one Web application technology. Happily, the product lets you choose from among ASP, ColdFusion, JSP, PHP and Perl. You also get your pick of databases: Access, MSSQL, MySQL, Sybase, Oracle and others are all supported, using the connection types that are native to your chosen language (for example, JSPs will use JDBC, ASPs will use ODB and so on). The upside of this technology agnosticism is that you can change your mind later by a simple update to a drop-down menu control. Of course, any code snippets you've added in your chosen language will have to be rewritten, but, as I'll explain, CodeCharge handles most of your coding tasks, so the need for such snippets is minimized.

The best way to learn CodeCharge is to download the tutorial from www.codecharge.com. This document stipulates, down to the last button-click, how to make use of the major, and many of the minor, product features. It took me a good four hours to get through it, but the tutorial was never repetitive, and I appreciated the absence of hand-waving. It uses ASP and IIS, but I chose my favorites, JSP and Tomcat. I had almost no difficulty doing this transformation—a testament to CodeCharge's cross-platform abilities. The Web site also helpfully displays numerous sample apps, including both code and online demos.

In CodeCharge nomenclature, you work on sites, not applications. Your site's characteristics are stored in a single file with a .ccs extension and displayed as a hierarchical list of items, including Properties, Style, Pages, Modules (code and global variables that are independent of a particular page) and Diagram. You start by editing the information in the Properties window: Select the language (ASP, JSP and so on), the database and the output directory of your favorite Web server. Should your site need secure access, you can specify the database table and fields used to determine who has access to what pages. The built-in page-level security model is fairly flexible, and, like much else in CodeCharge, is easy to override. You can also specify a default header and footer to be included in each page, which can then be overridden on a per-page basis. If you're a visual thinker, you can click on the Diagram item to see a graphical layout of all your pages with the links between pages represented as connecting lines.

Pages and Forms
The basic conceptual units in this product are pages, which are broken down into forms. These pages and forms correspond directly to the HTML variety. Page wizards help you generate common page patterns such as a grid of database records with an associated edit form for individual records (either on the same or on a different page), two Master/Detail patterns (a three- and a four-page variety) and a hierarchical tree of records. The wizards are just shortcuts to page layouts that you can do yourself, if you so choose: You can add forms and specify different types such as Grid (for a list of records), Record (for an editable view of a single record), Search (for multifield searches) and so on. Forms are broken down into fields, which generally correspond to database fields. Although this approach sounds a bit rigid, it actually has enough knobs and buttons to make it work for most Web pages I was able to dream up.

A small number of standard events are associated with each page and form, and you can type code snippets you want to run when particular events occur. For a small number of events (those that start with the word "Custom"), you can leave the code window blank to get default behavior, or click the "Obtain generated code" button to view and edit the default code that will be generated for these events.

Events can be divided into two types: those that fire before a page is displayed and those that fire after, although no such distinction is explicitly made in events window. The pre-display events determine exactly what will be displayed on the pages, while the others determine what will happen in response to form submissions. I found this coding model more reasonable than thinking of all code as associated with the generation of a particular form, a common approach in Web development.

When you're done specifying your pages, forms and fields, one click will generate all necessary code and HTML template files, and launch a browser displaying your default page. This click-and-run feature worked without a hitch the first time I tried it. You can view and edit the generated code and HTML by clicking on the "Edit Files" icon in the toolbar—but be careful, since CodeCharge gives you enough rope to hang yourself with.

Under the Hood
CodeCharge assumes that you know at least a bit of HTML and allows control freaks to tweak the generated code or HTML to their hearts' content. In practice, I don't see much need to edit the generated code, but it's nice to view the well-structured machinery under the hood. The generated HTML pages, on the other hand, would need editing to look really good, even though the included style sheets make it easy to add nice color schemes. Once you've edited an HTML page, CodeCharge will ask before overwriting it, and you can turn off regeneration on a per-page basis. Unfortunately, if you later add a form to a page with hand-edited HTML, you must choose between obliterating your beautiful page design or hand-coding the new HTML form, meticulously following CodeCharge's conventions. However, this problem has been addressed in the upcoming CodeCharge Studio, a product in beta test at the time of this writing.

Coders First
As its name suggests, CodeCharge is aimed at coders first and artsy site developers second, if at all. This is both a strength and a weakness—depending on who's using the product. It's great for quickly translating a design into a working application. The generated pages look clean, but they'd never win a Webby.

I encountered only a few problems with the product, and the three questions I posted to the frenetically active discussion group at www.codecharge.com were answered within hours, and sometimes minutes. Still, some of the UI windows were perplexingly slow on my machines at work and home, feeling more like Web pages than installed software. This makes certain repetitive operations unnecessarily torpid—I hope that YesSoftware will fix this in the upcoming release. I was also a tad disappointed that there was no UI for simple formatting à la Access or Excel—I had to write some one-line Java snippets to do field formatting.

Despite these minor blemishes, CodeCharge fulfills its promise of making it easy to build solid Web apps fast. Because the generated code is clear and well-structured, using CodeCharge doesn't lock you into this vendor's framework. CodeCharge challenges the old saw "fast, good, cheap—pick two" by helping you to quickly build applications that rival those you'd craft keystroke-by-keystroke.



CodeCharge 2.0

YesSoftware
2226-A Westborough Blvd. #405
South San Francisco, CA 94080

Tel: (650) 754-9810
Fax: (866) 312-8049
E-mail: info@yessoftware.com
Online: www.codecharge.com

Pricing Scheme:

$149.00 for a single user license. $279.95 for a single user license, one year of support and one year of free upgrades, including CodeCharge Studio.

System Requirements:

Windows 95, 98, ME, NT4, 2000 or XP. Database application (MS Access, MS SQL, MySQL and so on).

Web/application server supporting either ASP 2.0, ColdFusion 4.5, JSP 1.1, PHP 4.0 or Perl 5.0.

Generated code runs on Windows and Unix.

Rating: 4 stars The Rate Sheet
Pros:

  1. CodeCharge combines the best of platform neutrality and custom coding.
  2. The prebuilt page patterns speed development.
  3. It has good documentation, including an excellent tutorial.

Cons:

  1. The code-centric approach can lead to generic-looking applications.
  2. The UI is sluggish at times.
  3. Field formatting is minimal.

 

1 | 2 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK