[Home]

Comments


joe: Might be nice to have a separate "When To Use a Code Generator?" section.

jack: I think it's a fairly open ended technique. I've used it for a number of different things and I'm sure I haven't even scratched the surface. Do you have any suggestions for content for that section?

joe: Well, you already have some of this information in your "When to Use" section -- i.e. "There are a couple of clues that you might want to use a code generator..." I'd suggest just breaking that out into this separate section. If you'd like to expand that further, one question people will be sure to ask is not only WHY to use a code generator, but why to use a code generator INSTEAD OF another approach (i.e. doesn't 'a lot of typing' suggest a sub-optimal design?) (One possible rebuttal: sometimes language constraints prevent you from achieving the optimal design even when you know exactly what it is -- i.e. non-Ruby languages preventing you from over-riding base 'method' and 'object' classes.)

jack: I see. Come at it from the positive instead of the negative, so instead of "don't do the typing do the generation", come at it from the "generation can give you all of this" angle. Yes?

joe: Right. And it will widen your audience from "hey, I like code-generators, hey, here's Jack's article" to "hey, I'm a general developer reading freshmeat and, hey! This guy is talking about solving problems that I run into all the time. What is this code-generation business anyway?"

jack: Ok, I think I added it. Let me know.


joe: Might be more whiz-bang to also generate a GUI based on the XML schema.

jack: It certainly would be cool. Unfortunately I can't get mod_ruby to run on my box at the moment, and I don't want to distribute code that doesn't work.

joe: Of course. And that topic potentially could be huge, a follow-on article in itself. Such an article is (I think) much more than just another application of this technique (i.e. we did the db, we did the object-mapping, now we do the GUI), because it places the schema directly in the center of EVERYTHING (i.e. the schema becomes the core from which everything else sprouts) rather than a "useful, one-way-ish" technique (i.e. code-generation helps you with that half, now go do the front-end like you always would.) At that point, you are (possibly) talking about changing the development process. Might be a lot to swallow in an introductory article. But still cool.

jack: Yeah, probably too much to swallow in a single article.

This page is read-only | View other revisions
Last edited June 16, 2002 10:58 pm (diff)
Search: