On Mon, May 08, 2000 at 11:44:25AM -0700, jon * wrote:
[on code to autogenerate java classes and not using WebMacro in it]
> GenerateMapBuilderTask.java and MySQLSchemaToDatabaseMap.java. Doing
> OracleSchemaToDataba
Yeah right - this code _is_ the kind of thing I was talking about, and using
WebMacro might be overkill. I'm not sure though, if you consider that I'm
generating a lot more code (see below) it might be nice to have a template,
just for ease of amendment after the fact.
Certainly your WebMacroEmail class got me thinking that WebMacro has potential
text generation applications outside its designed purpose.
> after i'm done with scarab,
> i will go back and re-do Jyve to use the same techniques (unless someone
> beats me to it of course... :-)).
:-)
> in web applications like
> scarab, almost every single page has some sort of twerk that makes it
> slightly different from the next one.
It all depends on what you're doing I guess, although I'll accept that
with most real world apps things are never as uniform as one hopes/expects
them to be.
> > my interface is pretty much a straight
> > DB front end so the functionality *is* pretty much identical across all types
> > of data object.
>
> In that case, then what you are doing is perfect. If you can generalize it
> and make it re-usable enough, please consider contributing it.
When I've knocked it into shape enough for myself, then sure I'll have a go :)
My script goes beyond generating the DatabaseMapBuilder and goes and generates
the BasePeer subclass and BaseObject subclass as well (actually I'm using
my own baseclasses for some extra functionality). I'm even looking at finding
a way of speccing data constraints in the schema and autogenerating the
validate method I mentioned earlier in this thread.
Again this is useful to me because there's quite a lot of common ground here
between my data objects, and I'm also looking for ways that my non-java-savvy
colleagues can extend the front end/create new ones without too much of my
involvement.
> but IMHO it is harder to un-generalize things because that is
> adding stuff. :-)
Sure, that's absolutely right. And it's all too easy to end up with
"general" code like:
if (specialexception)
{
// blah
}
else if (extraspecialexception)
{
// blah blah
}
// etc etc
else
{
// 'cor how great this generalized stuff is
}
:-)
Cheers,
Sean
--
Sean Legassick
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]