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.  [ 3 posts ] 
Author Message
 Post subject: Dream Designer/Code Generator ... Does it exist???
PostPosted: Tue Feb 26, 2008 3:44 pm 
Newbie

Joined: Mon Aug 22, 2005 7:11 pm
Posts: 13
Hi Folks,

I know there are a number of products that are being used to generate NHibernate classes and xml files ... but I haven't found one that has really satisfied me. Below are a list of features I'm especially interested in. Perhaps, a code generator exists that fits this list ... if so, please tell me!

* Visual Studio 2008 integration/designer
* Ability to generate one .cs file per class (should be partial classes so further generation doesn't overwrite custom code)
* Ability to generate on hbm.xml file per class
* Ability to customize both the class and hbm code generation templates

Other wants:

* Ability to use NHibernate attributes instead of hbm files


Right now ... I prefer NHibernate over every other ORM I've worked with and evaluated! But for many clients ... what matters is time-to-market (not maintainability, understandability and even performance). Debate with them however I might ... ultimately they want something up fast!

As such, a framework like the ADO.NET Entity Framework is going to get you there faster than hand-coding NHibernate code precisely because the toolset meets many of the objectives stated above. Personally, I'd rather not have to learn both ORMs ... and be able to stick with one for both those clients that want/need something quickly and those who think more long-termed and willing to take an initial hit when the project starts up. As such, a designer/generator as described above seems key in satisfying both parties.

Any suggestions, input, etc...??? I'm open to anything.

Thanks - wg


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 26, 2008 4:32 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
AFAIK no such general-purpose code generator exists, at least not open source.

We spent many months developing an Visual Studio addin to do most of what you describe. Unfortunately for the development community, it is seen as a selling point of our product so it won't be available as open source anytime soon.

Even so, NHibernate is so flexible that we had to make assumptions about how our customers' database schemas are designed (how normalized they are, expecting foreign keys for all many-to-ones and one-to-manys, etc) and had to impose an entity base class defining a specific type of identifier property. We also did not use entity subclassing as NHibernate uses it; we use it to allow our customers to extend existing entities in our base product by essentially replacing them with ones of the same classname but different namespace.

To purge our tool of these limitations would be a lot of additional work ...


Top
 Profile  
 
 Post subject: Yup
PostPosted: Tue Feb 26, 2008 7:06 pm 
Newbie

Joined: Mon Aug 22, 2005 7:11 pm
Posts: 13
I don't see anything out there either :(

The closest I've seen is ActiveWriter


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.