|There's more than one way to do things|
Re: Code Generation with Perl?by adamk (Chaplain)
|on Oct 04, 2003 at 04:33 UTC||Need Help??|
I'll throw this in as a general comment.
I'm currently doing a software startup to make an application for creating perl web applications, somewhat like some of the other things that are out there for Java or Microsoft stuff. I've been working on this part time for 4 years, it's finally near a commercial stage, so I'm going full time.
Part of what makes this tool great for me, is that it combines lots and lots of different time saving activities into one process. It's not so much that I couldn't do it by hand, it's just that it's much more laborious that way.
Using the part of the tools I have so far, I can produce the core perl code, add in any infrastructure modules needed, striping out parts that arn't needed to avoid bloat, compile the POD for the parts that remain into the documentation, create the HTML "skeleton" templates, pull in the widget classes needed by the interface, write the default config file, create SQL scripts, attach post-generation development and management tools and adapt those tools to work with just the features needed by the application, embed debugging code if I think I'll want to do debugging, adapt the code to work with either CGI or mod_perl, tweak the SQL generators to work with the appropriate database, or alter it to work with SQLLite, package the application into a PAR file, bundle CPAN modules I don't want the end user to have to install, the list of tweaks goes on and on. It's like encoding all the tricks and tools you do on a daily basis to happen automatically based on the structure of the application you want to make.
Now, while the stuff that gets generated is RARELY the final form, it provides that initial 90% of the work. The generated code is good enough that it's easy to work with directly once generated, you don't have to go back and generate again unless you wanted to dramatically change things.
I'm finding it really usefull. The applications follow good security practises, don't bloat out too much, and generally make my life a lot easier.
Once I get the automatic installer tools building into the projects properly, and if the application is fairly standard, I figure I can design, build, document, package and deploy a robust, good looking, secure and featureful application in... oh... 20 minutes?
The code generation aspect is not for the "bad smell" issues, it's mainly to make application production process as efficient, fast, and cheap as I possibly can. Every hour I save either knocks a couple of hundred bucks of the cost of the application, or adds to profit, or both. I gotta compete with India somehow :)
Of course, it's commercial and it ain't finished yet, so I'm not telling details, but I figure making it cheaper to make web apps by combining dozens of these little time savers is a good thing.
As much as I hate to make this look like a plug (cringe), if anyone's REALLY REALLY interested, just mail me directly...