David Liebeherr wrote:

Hi Elco,

Eelco Hillenius wrote:

I like the idea.

Me too :-)
But i am very very disapointed bc of the very little feedback to my mail. Actually your mail is the only feedback :-(

Hmm, I was busy :-). So, I've built some (few) plugins for middlegen (I don't like xdoclet's templates, I prefer velocity) so I might be of a little help in this discussion. So my experience with code generation is that once you get the taste (and productivity) of it you become somehow dependant on it :-).Haveing an entire suite of plugins writen for middlegen(that would generate an entire functional web application representing the administration interface for a given database) here are my thoughts:

First you have to consider where do you want to start:
a.) From some already written code (anotate some classes that you write in the first place and somehow define your data model, e.g. hibernate POJOs)
b.) From an existing database schema (the approach took by middlegen)
c.) From some (XML anyone :-D) definition files that have nothing to do with code, they'll just generate it.

I took the second approach for several reasons:

a.) I just needed something generated fast, nothing complex, nothing tricky, just the basis from where to develop the rest of the application b.) I worked mainly (well, more or less, any app that I've developed so far needed a database and some persistence) on data centered web applications c.) I liked how Hibernate (well, ORM in general, I suppose) forces you to think of the domain model, so I've decided that an administration interface centered on the persistent entities of the system would be enough for the starters.

How I designed the plugin suite:

I've took the layered approach, so I had one plugin for each of the:
a.) web layer (Struts, WW, whatever MVC actions + of course the JSP views for it) b.) service layer, would generate primarily service interfaces + implementations
    c.) persistence layer, would generate DAOs, interface + implementation
d.) domain model, I didn't wite it, I was dependant on the hibernate middlegen plugin

What happened: productivity boost and an incredible jumpstart for each project.
Drawbacks:
Because I'm lazy I didn't want to deal with the complexities of regeneration (regenerate all the thing in the middle of the development phase) It is HARD to get everyone to agree on the coding standards and styles so be prepared TO PUT THE TEMPLATES WHERE EVERYBODY CAN MODIFY THEM to fit their needs/style.

What I would suggest if we're going to develop a wicket plugin (yes I'm in if we decide to write it :-D ) 0.) See if somehow somebody doesn't already do or planning to do this (well, OS effort) 1.) Decide from what we're going to start our generation process (annotations, db schema, whatever) 2.) Consider writing a plugin for at least the most four or five popular products on the market: XDoclet, Middlegen, AndroMDA, there is another one with a nice GUI, Appgen or somethingh like that I can't remember right now, there is another one not so popular but that I liked it when I looked at it, I don't know the status or the name, It's written by Cedric Beust. 3.) Write a simple plugin first and get everyone's feedback/ideeas and rewrite it until it works fine :-D 4.) Allways keep flexibility in mind and remember that you're writing a code generation product that will need to adapt changes in software (Wicket), even the other technologies around it (you'll never write an application using just Wicket isn't it ? you'll write it using Spring for business or Spring + hibernate or whatever ORM).

As a conclusion, I think a code generator for a wicket GUI would be nice, after all :-) Getting in ideas from Ruby on Rails would be nice also, since everybody says it is an excellent approach (I've never had the time to give it a check, unfortunatelly).


So it seems that noone is realy interested in code generation / prototyping tools!?
This is very sad. I realy expected more feedback on this topic.
And i'm not going to waste my time on a tool which obviously noone need/want.

____So please ppl, if you want to have such a tool give me some feedback!!!!!____

I have been working on a bean panel where I had some - unimplemented -
idea's for detail editing as well. Haven't found the time yet to
finish it though.

Code generation is the other way around though. That can be very
powerful too, and is usually easier to customize later on.

I think the ideal toolkit would be a combination of both: something
that generates code for you (in such a way that you can customize
extension code, but that you can regenerate whenever you want), but
that produces code that is smarter than just static binding everything
too.

You don't like Ruby? It's on my list to learn. From what I've read, I
like it, though when I played around with it a bit, I immediately
missed code completion and documentation hoovers etc. I'm an IDE guy
that's loves all the little productivity boosters and analyses tools
(like java inheritance hierarchy views, call hierarchy views, etc)
modern Java IDE can give you. But Ruby is supposed to be very good
with text processing, so you/ we might even consider using Ruby for
code generation. Otoh, Velocity is easy and good in this too.

To my the ruby language has a syntax which is to far away from C-syntax style.
And this is something i don't like at all...
And i also don't like the idea of dynamic typed variables.
There are serveral other things which i don't like about it.

Cu,
Dave

Eelco


On 10/2/05, David Liebeherr <[EMAIL PROTECTED]> wrote:
Hi!

Today i read a pretty much interesting article about Ruby on Rails (RoR).
First things first. I don't like ruby.
But: The Aproach of Ruby on Rails is very impressing and provides a
effective way to write standard Web-Apps.
So i like the way how wicket works much. And now i am thinking about to
adopt some ideas of Ruby on Rails to wicket.
The most interesting and time saving aspect of RoR is that it has mayn
scripts to automaticly generate Formulars and Lists so that you can deal
with Datas which mostly comes from a Database.
I think a similary tool could be made for Wicket.
The features i think of are somehting likt this:
-Gernation of Formulars and Lists from the Strucure of a certain
Database-Table (Or JavaBean Class).
 Which includes the generation of: Wicket-Class, Wicket-HTML-File and
that all already ready with all necessary connections and handling to
the database or the JavaBean object.

This generated "Prototype" can then be customized to the needs of the
specific project.
But mostly this is not even neccessary if the generator generates stuff
that fits on most common use casses (Of course with pretty basic User
Interface :-)).

So i think all this can be pretty easy implemented (It's a lot of work,
but the principle is pretty clear and easy i think).

My question now to you guys is:
1. Is already someone writing such a Generator?
2. What do you guys think about this idea? (Please stay on the way of
what the tool should be able to do. Please no discussion about how to
implement it bc that comes later!)

Thanks,
Dave

--
Rent-a-Developer
David Liebeherr
Tel.: 0721 3504990
mail: [EMAIL PROTECTED]

SUN Certified Java Associate (SCJA)




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to