-->
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.  [ 4 posts ] 
Author Message
 Post subject: Autogenerated Administration for hibernate models
PostPosted: Mon Apr 23, 2007 2:32 pm 
Newbie

Joined: Mon Apr 23, 2007 2:18 pm
Posts: 2
Location: Vienna, Austria
hi,
after playing around with django for a while i got used to having an auto-generated admin interface for all my models right after configuring the ORM ;) (see also http://www.djangoproject.com/documentation/tutorial02/)

so i wondered myself if it would be possible to have the same features for hibernate.. and.. it seems the meta data which can be retrieved from the SessionFactory would be more than sufficient.. and it's actually very easy ..

i've put up a small "proof of concept" which supports basic CRUD for "simple" models (models with a simple generated primary key and properties of primitive types, date and ManyToOne relations).. i've copied the CSS/HTML from django - you can see it at http://sphene.net:8080/HibernateAutoAdm ... min.action (no authentication implemented.. no error handling, nothing.. just basic CRUD actions without any checking)

so .. my question is .. before i continue development .. is there already something like it out there ? it seems to be very easy and straight forward.. and you would have a ready-to-use admin interface for small websites, prototypes & co without a single line of extra code ...


cu,
herbert

_________________
http://hpoul.sphene.net


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 3:53 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Sounds like JBoss SEAM stuff that you can generate from the HibernateTools project. I'd check the Tools documentation and look at SEAM.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 4:04 pm 
Newbie

Joined: Mon Apr 23, 2007 2:18 pm
Posts: 2
Location: Vienna, Austria
Ananasi wrote:
Sounds like JBoss SEAM stuff that you can generate from the HibernateTools project. I'd check the Tools documentation and look at SEAM.


could you give me a hint for what exactly i have to look in the docs ? the closest i'm finding is: http://docs.jboss.com/seam/1.2.1.GA/ref ... l#d0e15977 "CRUD-application generator"

but what i meant is not code generation, but having an administration interface which gets generated dynamically by retrieving the mappings and meta data of models from hibernate's session factory.

ie. just tell the admin interface where on the classpath it can find the hibernate.cfg.xml so it can set up hibernate and everything else is done on-the-fly

no need to generate code imo ..

_________________
http://hpoul.sphene.net


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 4:40 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Aha, I see what you're looking for. And, nope, never seen an implementation of that. Sounds nice for certain instances (remotely hosted apps, for instance). I've been through the metadata quite a bit, and everything you would need to do that is there. Sounds like a PITA to implement, perhaps someone else has some insight.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

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.