-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 133 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next
Author Message
 Post subject: hbm2jsf
PostPosted: Tue Jul 26, 2005 7:21 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
For those of you w/ JSF, you can generate CRUD based JSPs at the following URL ... just upload a hibernate mapping file. Warning the IP is not static.

http://hbm2jsf.dbyrne.net/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 7:24 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Looks interesting! Could you use some Hibernate JSP tags? I've got them waiting here for commit (tests are missing though).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 7:37 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
I don't see any reason why it couldn't be used to generate another set of tags, although I don't have experience w/ your library. Is it anything similar to what we've talked about before?

http://forum.hibernate.org/viewtopic.ph ... yrne+label


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 7:46 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, its stuff like <h:load id="123" var="myOjbect" scope="page"/> etc.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 7:48 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
What I'm trying to say is: is there a chance to merge the stuff you have done to generate JSF forms with a set of Hibernate Session/Query tags to generate CRUD applications from Hibernate mappings? Or from annotations, to make it future proof? You are using XSLT? Probably better to use the Hibernate Configuration PersistentClass meta model.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 7:59 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
I won't have time to check this out until the weekend. It looks pretty fresh ... I take it you guys are still pre-release?

What I'd like to do is make something that can generate both as an ant task (like hbm2java) and as a webapp (more convenience). By the way, the business labels for my whole site are pulled via tags at run time from the meta data - works great.

In the meantime, if anyone has suggestions about this code generator, post comments here.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 8:02 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I probably should elaborate:

Every half year someone appears on the Hibernate horizon and wants to do something like "automatically generated CRUD application on top of Hibernate". There are similar things for other ORM tools, and even independent projects like NakedObjects. I'm not up-to-date what the current situation is though. I know there is none for Hibernate and the person who usually makes a request or proposal disappears again.

I think there is interest in generating CRUD applications automatically from Hibernate metadata (note that I don't say XML mapping files), either for immediate use or as clean skeletons for further refinement.

Indeed implementing this is rather trivial, but still a lot of work. I guess that is why nobody picked it up so far.

For a pragmatic approach, the following pieces are available:

1. A very sophisticated meta model through the Hibernate Configuration API, independent from the actual mapping method used (XML, annotations, programatic). This model includes all information about all entities and value types in the data model.

2. Hibernate data validation annotations and API for business object validation and database constraint creation.

3. Hibernate JSP tags that map directly to Hibernate Session and Query API calls, for loading, storing, and querying of objects directly in JSP. The primary purpose of this is of course reporting, but it's also a great solution for simple CRUD applications (as long as the consequences of breaking application layering are understood).

4. The JSF form generation stuff you have done?

So, mix this all together, some sugar on top and we have a new "Hibernate WebObjects" subproject that finally implements what I described at the beginning of this posting. Of course Apple will skin us alive so we might need a different name ;)

Any takers?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 8:10 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
XSLT was chosen because it starts w/ tags, ends w/ tags and there are no deps. There really isn't any Java there. The configuration API might be necessary for an application that is more complex.

Getting hibernate tags to play with JSF tags is the larger challenge. A tag must have certain parents in order to be JSF enabled - the FacesServlet is a little "racist" so to say. Even JSTL doesn't work well.

You sound like you want a volunteer.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 8:20 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Absolutely, Serge is the guy who wrote the initial tags, I'll point him to this thread.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 8:28 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
(posts are getting ahead of one another)

I see your point about using the config API as the symbol table.

I'm interested Christian, with or without JSF. Although think of the power you could get by integrating hibernate w/ what is sure take over J2EE web app dev in the coming years.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 8:41 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
If we want to continue with this we need someone to lead that subproject. By "lead" I mean really do something. There has to be someone who can code the first implementation and who takes care of the codebase.

I can give advice about design and help to get something started (setup CVS, etc.). Since pretty much everybody who talked about this subject didn't really stick to it in the end I'm at the same time still enthusiastic about the goal and vision but reserved about making any promises.

No matter if its Dennis, Serge, or anybody else who reads this thread, if you want to commit yourself to it, you have my help (and I'm sure Max will have input as well from the Tools perspective). If it doesn't happen we'll just release the Hibernate Tags standalone.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 8:57 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
I have 15 - 20 hours to spare each week and I'm real good at getting myself into situations where I work too much. If you need someone to make it happen and you feel this will meet the workload, we can start doing something about your reservations this weekend.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 1:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it fits perfectly in to the toolsets of things....would be great if it could use the meta model and thus work for every hibernate meta model.

ping me if info needed...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 3:00 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
christian wrote:
I probably should elaborate:
1. A very sophisticated meta model through the Hibernate Configuration API, independent from the actual mapping method used (XML, annotations, programatic). This model includes all information about all entities and value types in the data model.

We generate hibernate metadata itself from models (UML with extensions), it doe's not make sence to move model to ORM metadata. You will find you need stuff not related to hibernate ( workflow for example ) and most of this stuff is useless at runtime (it just wastes memory) Result of this work will be something similar to MDA anyway.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 27, 2005 4:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
We are not saying use hibernate metamodel for everything - just saying that the orm metamodel contains 95% of everything you need and its already there (+ its fairly easy to add other stuff to it).

It is not possible to come up with any model that can contain everything - we just think that hibernates metamodel have more than enough for most usecases, so why not utilize that instead of having full blown/generic MDA ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 133 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.