collusioni.st

A Hint of Web Services

Tuesday, February 25 2003

I usually doom a project into never never land by mentioning it here, but I’m beyond the point of no return, so I think I’m safe.

I’ve been build some ColdFusion Components recently that do a couple of really cool things, and I’ve been thinking “Hey man, it would be cool to expose these components as web services so that people who don’t use ColdFusion could use the stuff I’ve written on their own site.” And so, I’m going to do some exposing.

I’ll be converting the little snippet of code that I use to control the expiration dates thing on the right hand side of the site here. Andre

was a bit curious about it, and helped spawn the idea that it might be cool to allow others to use it too. I’ll change it so that instead of using a database, it uses an XML file which can sit on the server of whoever is consuming the logic that sits on my server.


But before that, what I’m going to make available is actually mostly of interest if you’re into ColdFusion, but it could be modified to work with any scripting language come to think of it. It’s a tool that generates ColdFusion code based off of a table structure. So, you say “Here are my tables and their data types, here are the primary and foreign keys, write me some code you filthy animal!” and off it goes and writes INSERT, UPDATE, DELETE, SELECT, SELECT with INNER JOINs (based on foreign keys). It writes forms to update and add new records to the database, as well as server side and/or Javascript validation. It knows when to create a select list, textareas, radio buttons, and text inputs. The works!


Also, if you use ColdFusion 5.0 or below, and can’t consume web services, I’m building a form interface to it that can parse your table format information and spit out code that can be copied and pasted.


It all sounds ambitious, but seriously, the hard work has been finished. I just need an hour or two to put it up.


Speaking of web services, can you think of any other cool and simple tools I could make available? I’m thinking that something that could go grab RDF or XML feeds and make them available in a bunch of different formats might be cool. Can’t parse RDF or XML? How about getting it back in pure HTML? Might be handy.