Looking for a Web App Generation Tool

I’m looking for a tool that makes it astonishingly easy to generate a web app that facilitates the editing of the contents of a bunch of database tables. Details follow…

I’m looking for a tool that makes it astonishingly easy to generate a web app that facilitates the editing of the contents of a bunch of database tables. I want to specify:

  • which tables to allow editing (and viewing)
  • which fields to allow editing (and viewing)
  • which fields to show dropdowns for (rather than making users type IDs)
  • what captions to use for all table and column names
  • constraints to enforce
  • constraints to notice and complain about, but not enforce
  • a reasonable user management system for the web app (login/password/rights/etc.)
  • rules that define row-level security, i.e. allow users to edit some rows of a given table but not others

I’d like a “generative” tool, one that spits out a fully functioning app which doesn’t depend on the original tool for runtime infrastructure.

The specification of the things above can be mostly textual. Drag-drop-UML doesn’t excite me all that much (though I’ve used such beasts for Java work before). The generation process must be customizable, since no tool is likely to meet 100% of my present and future needs.

The generated app will preferably be in PHP or Java. PHP seems reasonable as it is ridiculously easy to get up and running (at most, a few packages to isntall in a common Linux distro), and Java is reasonable because I use it heavily for other purposes anyway.

It should be possible to support several common DBs (SQL Server, MySQL, PostgreSQL) with the flip of a switch or two.

The generation process should act like a build process – i.e. the “source” of the application would be the specificaiton file plus perhaps a few files work of manually tweaked code.

OK, so I’m asking for a lot.

… but there are dozens (or even hundred) of tools out there, both commercial and open/free, that meet at least some subset of the above. I Googled for a few minute and was overwhelmed at how many there are to look at.

A good starting point is the Code Generation Network, and a few of the specific tools I saw are phpCodeGenie, PHPMaker, Camino, Jag, JRpt, etc.

Of course, it’s entirely possible that none of them does everything I need – but that’s OK too, there is another layer of tools out there that make it easy to get start with my own generative approach: FMPP, Jostraca, etc.

Enough hoping for tonight. If anyone out there has had a very positive experience with any of these tools, for the kind of problem I’m looking to solve, I’d love to hear about it.


A few clarifications, after the initial post:

  • For this particular need, I prefer a generative approach to an “executable model” approach, though I think the latter might be the long-term winner in MDA.
  • Yes, I know that I’m mostly asking for DB-centric CRUD operations, rather than a domain centric behaviour model. I have plenty of time for the latter approach (with lots of Java code, Hibernate, perhaps even a rules engine) in other place, but for today’s need, which is for the “admin” side of an application, DB-centric CRUD will do the job fine, with a little help from constraints, validation, etc.

Graph Visualization in Delphi

For a project at Oasis Digital, we need to show the end user a graphical representation of a graph (in the “graph theory” sense of the word). The application is written in Delphi, and in looking around I didn’t find any native Delphi components for doing that.

I did find GraphViz, and a COM Wrapper for it called WinGraphViz. Wiring the latter up to Delphi turned out to be quite easy. The minimal code to do it, for a demo app, is below. To make this compile you’ll need to import the type library for WinGraphviz.

procedure TExampleForm.DrawGraphForData(Data: string);
var
Dot: IDot;
Image: IBinaryImage;
ImageFileName: string;
begin
ImageFileName := 'c:image.gif';
Dot := CoDOT.Create;
Image := Dot.ToGIF(Data);
Image.Save(ImageFileName);
WebBrowser1.Navigate('file:///C:/image.gif');
end;

Production code would probably use a better way of getting the generated graph on to the screen. GraphViz support imagemaps, making it easy to make the notes clickable. It can draw various arrow types, node shapes, etc., and tries to lay out graphs in a readable way, without crossing lines, etc.

A trivial sample app looks like this:

Update: a correspondent pointed out that the graphic example above is a bit ugly, with non-anti-aliased lines and fonts. To resolve that, I turned to SVG; GraphViz can produce output in SVG format (among others), and the freely downloadable Adobe SVG Viewer can display them.

With slightly different code:

ImageFileName := 'c:image.svg';
Dot := CoDOT.Create;
Image := Dot.ToSVGZ(Data);
Image.Save(ImageFileName);
WebBrowser1.Navigate('file:///C:/image.svg');

We get an application with this appearance:

You can download the Delphi WinGraphViz Sample Application Source code.

Word Chains Kata Solution

I worked out a solution for “Pragmatic” Dave Thomas’s Code Kata 19 (Word Chains) in Java; it’s somewhat different than Dave’s published solution.

I’ve been watching PragDave’s Code Katas with interest, since I am also in the habit of occassionally solve a small, standalone programming problem just for the learning experience. Today I worked out a solution for Kata 19, Word Chains. I did this Kata the “pure” way, i.e. without looking at any of the discussion of solution approaches before coding. Here are the results (also on github). I wrote the code this time in Java.

Unlike Dave’s published solution, I didn’t precalculate adjacency lists; rather I took the more brute-force approach of scanning the word list at each step looking for neighbor words. In spite of that non-optimization, this still calculates the word chains for a bunch of examples in a few seconds (total).

I was curious how much of the program’s time is spent checking for neighbor words; this provided a good reason to try out a profiler plug for Eclipse, available on SourceForge. The profiler worked fine, and told me, as I would have guessed, that the program spends approximately 100% of it’s time looking at words to decide if they are neighbors (in the word-chains sense). Of course the usual optimization advice applies: it would have been actively stupid of me to optimize without measuring where the slow parts are.

Introduction to the Ruby Language

Presentation and notes from a talk on the Ruby language to the St. Louis Unix User Group.

On June 12, 2002, I gave a talk at the St. Louis Unix user group introducing the Ruby language. The presentation is available for download here:

http://kylecordes.com/files/IntroToRuby.ppt

The text of the presentation, without useful formatting also appears here, so that search engines (particularly the one I need to add to this web site) will be able to find it.

We don’t use Ruby much (yet?) at Oasis Digital, but there are some interesting and useful ideas in it; I recommend looking it to expand your exposure to what’s possible in language design, even if you don’t need or plan to use yet another scripting language.

Addendum: Oasis Digital’s resident “Pythonista” pointed out that like Ruby, Python now supports multiple inheritance and garbage collection (not just reference counting).

Continue reading “Introduction to the Ruby Language”

Test Intensive Development in Delphi

Slides from a Birds of a Feather session at BorCon 2001

At the 2002 Borland Conference, I presented a “Birds of a Feather” session on Test Intensive Development in Delphi. A couple of dozen people attended, in spite of the early morning time slot. Most of the attendees were new to test intensive development, though a few were experienced in it and shared useful tips.

My introductory talk and demo was adversely impacted by a technical problem with the projector and missing microphone; hopefully this slightly expanded set of slides will fill in the gaps that caused.

Download TID-Delphi-BOF-Borcon-2002.ppt

Design Considerations in a Mobile/ Wireless Application

Mobile / Wireless applications must let the user get work done even with a network connection is not available. That and other consideration were covered in this talk to the St. Louis Wireless SIG meeting.

On April 23, 2002, I gave a talk at the St. Louis Web-developers Wireless SIG (what a mouthful!) on design considerations in a mobile/wireless application. The slides from that are available at:

http://kylecordes.com/files/DesignConsidMobile.zip

Of course, there was much more in the talk (a very full 90 minutes) than is shown in the slides; hopefully they are useful nonetheless.