burtonator <[EMAIL PROTECTED]> writes:
> I took the bridge/proxy/adapter/ approach within Jetspeed but this was taking
> more time than core Jetspeed development because the generated APIs are too
> bad.
Indeed, I certainly won't use a generator which produces a poor API.
Fortunately, not all products suffer that problem.
> The XJay project uses an XSLT based approach. You write your object markup and
> API in XMLSchema and then a stylesheet produces your packages/classes/methods.
> If you want to add a few lines of code or a licensing agreement you just update
> the LICENSE section or correct Javadoc (it is all fairly obvious if you know an
> XML file format) and it will make the change without doing anything crazy to
> your generator. This allows you to only check in the XSLT file to provide your
> customizations and then produce your .java files when you deploy
>
> I think it is the perfect solution but I haven't needed an XML or API generator
> for a while so I haven't released 1.0.
So, like any generator worth its salt, XJay allows you to modify your
inputs to it and/or your "transformation algorithm" (specified via
XSLT in XJay's case), to produce the desired output. A nice
demonstration of the "only use a flexible generator" rule. ;)
> > > These questions were rhetorical. My point in the original e-mail was that
> > > code generators can be "non-ideal". I wasn't making a logical argument against
> > > them just that there was enough evidence to consider using the small parser we
> > > already have. Considering the above issues (which don't exist currently) it IMO
> > > isn't worth switching.
> >
> > I disagree. Most of your points are supported by an argument which
> > apparently stems from having either little control over an inflexible
> > generator or using less than ideal development practices (i.e. local
> > edits).
>
> ... regardless... they are sometimes necessary. :( I wish they were'nt but I am
> very pragmatic on this subject.
The circumstances that would cause permanent local edits to be
"sometimes necessary" do not apply to a project like as Alexandria
when combined with an open source generator such as ANTLR.
> I hope my above explanation helps. I agree with the more flexible generator
> philosophy which is why I created XJay. I doubt that Antlr is as flexible
> though. :)
It appears to be nearly as flexible, and much more powerful. See
"Getting Started With ANTLR" and "Parsing Simple Data" from
<http://antlr.org/articles.html> for some nice examples. (Note that
I've never used ANTRL.)
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]