Now that I have your attention 🙂
I am happy to announce the initial release of
SGen, a framework that makes it easy to create tools that parse annotations
and generate files. Some of the goals for SGen are:
- Modules can be developed separately and shipped in individual jar files.
All they need to do is contain at least one SGen module (which is achieved
by implementing a certain interface). For example, you can download
ejbgen.jar, drop it in your "modules" directory, point SGenRunner to it and
voila, you have added a new generator to your arsenal.
- SGen is annotation-neutral. It supports both Javadoc and JSR 175
style annotations. The way the annotations are collected is made
transparent to your module through an open-source abstraction layer called
JAM.
- SGen doesn’t mandate any template technology. You are free to use
Velocity or println if that’s what you want.
- SGen is XML-free. That’s right, baby, you won’t have to write a
single line of XML to use it.
Since the question is most likely going to come up, I don’t see SGen as a
direct competitor to XDoclet, although they achieve similar goals. The
idea is that if you wrote an XDoclet module, you should be able to factor out
all the "business logic" of your generators and make an SGen module out of it.
Then your module can be downloaded by your users and mixed with the other SGen
modules they use.
For more details, examples, architecture overview and JavaDoc, please take a
look at the SGen home page.
SGen is certainly in alpha stage at this point and as you can see at the
bottom of the documentation, more features are coming up, but since the current
version works fine for the very demanding EJBGen (which is now an SGen module),
I think it is in a good-enough shape for early adopters.
All questions about SGen should go to the
SGen mailing-list.
#1 by Dion on March 3, 2004 - 2:54 pm
What license is this under? I noticed that the dist contains src/ but I didn’t see a copyright…
#2 by Cedric on March 3, 2004 - 3:01 pm
I plan to license it Apache and maybe fold it into XMLBeans at some point.
#3 by Congratulations on March 3, 2004 - 3:40 pm
Congratulations. You just invented XDoclet 2, only without the plugable input source and plugable metadata processor.
#4 by Congratulations on March 3, 2004 - 3:42 pm
Actually, rereading it, this sounds exactly like XDoclet 2. I wonder if you care to differentiate between the projects?
#5 by Hani Suleiman on March 3, 2004 - 4:21 pm
Woo, I’ll definitely have a look, would be kinda neat to have the same xdoclet tags in source and having a decent processor instead of xdoclet at the back generating all the descriptors.
#6 by diprey on March 3, 2004 - 4:29 pm
Poor Cedric? Maybe, you meant, Poor Yorick ?
But that’s on some other RSS…
Ced, really, care to explain how your stuff is different form XDoclet 2 ?
#7 by Cedric on March 3, 2004 - 4:34 pm
Well, you tell me, where is XDoclet 2?
I’ve been waiting for months and I got tired. Is there some official release that I missed? Documentation? An API?
#8 by Jason on March 3, 2004 - 4:46 pm
I’ve been hearing about the revolutionary XDoclet 2 for longer than I care to remember (years), and I’ve seen exactly jack squat. Not even an alpha quality release. Meanwhile XDoclet number one has become a bloated piece of shite.
I for one am thrilled that someone like Cedric would take on such a project. At least now I know I can count on a useful tool that gets regular updates and improvements, ala EJBGen, and doesn’t get kicked to the curb in favor of the ‘technology du jour’. Yes, I mean PicoContainer.
#9 by Robert Watkins on March 3, 2004 - 5:19 pm
Where can I find out more about JAM?
#10 by Anjan Bacchu on March 3, 2004 - 8:01 pm
>>Where can I find out more about JAM?
JAM : If you’re meaning the build tool from perforce , here’s a good link
http://freetype.sourceforge.net/jam/
#11 by techno.blog("Dion") on March 3, 2004 - 8:11 pm
Cedric has been busy: SGen
Cedric has been a busy guy 🙂 He just launched SGen, which looks like a next generation of his EJBGen…. well a super-set for sure. The cool part of it is that it works on both JavaDoc tags, and the…
#12 by techno.blog("Dion") on March 3, 2004 - 8:12 pm
Cedric has been busy: SGen
Cedric has been a busy guy 🙂 He just launched SGen, which looks like a next generation of his EJBGen…. well a super-set for sure. The cool part of it is that it works on both JavaDoc tags, and the…
#13 by Ara on March 4, 2004 - 1:27 am
Cedric, I’m sure Aslak knows much better than me about xdoclet2 and could eleborate more (I’m not involved with xdoclet for at least a year now). But anyway, let’s do a google for xdoclet2 and see what comes up: http://xdoclet.codehaus.org/. Now click on the links on top of the page. Generama, plugins project and so on. Yes, there’s no release yet, but as far as I know it’s maturer and more functional and feature rich than SGen even in this stage. Actually people hesitate to work on it, because xdoclet1 apparently works fine and they don’t neccessarily find the jsr175 syntax a big deal and also they can already do velocity based template in xdoclet1 and ….
Ara.
#14 by Barre Dijkstra on March 4, 2004 - 2:13 am
Certainly sounds interesting, I’ll have a look when I make my deadline.
Though I got 1 question:
To quote the description:
“SGen is XML-free. That’s right, baby, you won’t have to write a single line of XML to use it.”
But to quote the TODO list:
“Other means to configure the modules (XML maybe?).”
Isn’t that silverbullet named xml great? You can run, but you can’t hide. 😉
#15 by Gerry on March 4, 2004 - 8:19 am
Barre, I think he meant XML-free as in it’s not a requirement, not that it won’t even support it. Yeah, it seems like XML is everywhere. Maybe I’ll use it sometime (outside of web.xml, that is). 🙂 But seriously, I think too many projects are making XML the requirement when it’s not necessary. XML is verbose and sometimes a small properties file or the like is much easier to use.
I much prefer using tools to generate configuration files, as long as the files are human readable and changable. If XML is there in the background, fine, but don’t make me write a big XML file and decode a DTD or schema just to make something work. Give me a tool! At least the Linux guys finally figured that out….
#16 by Gerry on March 4, 2004 - 8:22 am
Cedric, your naming scheme makes me want to cry. IBooHoo
#17 by Show me the code 2.0 on March 4, 2004 - 10:47 am
No ejbgen example’s for SGen
It sounds interesting. But there is no examples of using it with ebjgen.
#18 by Robert's House of Cards on April 20, 2004 - 5:33 am
XDoclet 1.2 vs SGen
I gave a talk at AJUG-QLD last night, on using XDoclet for code generation. Went down pretty well, I think, though that could be just my flattered ego talking.
One of the focus points of my talk was on extending XDoclet and writing your own modul
#19 by free big boob pix on November 12, 2004 - 12:05 pm
Hello