← Back to home

SGen: an XDoclet killer

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.

Comments (19)

Dion

What license is this under? I noticed that the dist contains src/ but I didn't see a copyright...

Cedric

I plan to license it Apache and maybe fold it into XMLBeans at some point.

Congratulations

Congratulations. You just invented XDoclet 2, only without the plugable input source and plugable metadata processor.

Congratulations

Actually, rereading it, this sounds exactly like XDoclet 2. I wonder if you care to differentiate between the projects?

Hani Suleiman

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.

diprey

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 ?

Cedric

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?

Jason

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.

Robert Watkins

Where can I find out more about JAM?

Anjan Bacchu

>>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/

techno.blog("Dion")

<strong>Cedric has been busy: SGen</strong> 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...

techno.blog("Dion")

<strong>Cedric has been busy: SGen</strong> 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...

Ara

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.

Barre Dijkstra

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. ;-)

Gerry

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....

Gerry

Cedric, your naming scheme makes me want to cry. IBooHoo

Show me the code 2.0

<strong>No ejbgen example's for SGen</strong> It sounds interesting. But there is no examples of using it with ebjgen.

Robert's House of Cards

<strong>XDoclet 1.2 vs SGen</strong> 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

free big boob pix

Hello