-->
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: NHibernate - New User Question
PostPosted: Wed Jun 10, 2009 3:51 pm 
Newbie

Joined: Wed Jun 10, 2009 3:47 pm
Posts: 4
Hi,

I am trying to learn NHibernate. I was working on this sample (http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/01/your-first-nhibernate-based-application.aspx)

and I was stuck at creating "Domain.cd" file
How its gets created? If its manual, How to create it and when?

2. Always, do we need to write the hbm.xml file manually?


Top
 Profile  
 
 Post subject: Re: NHibernate - New User Question
PostPosted: Mon Jun 15, 2009 10:22 am 
Hi there.

Try to use nhibernate reference. (https://www.hibernate.org/5.html#A27)

And you don't need to write your hbm.xml files.
There is some programs you can use to create them for you, or you can use Fluent, or NHibernate.Mapping.Attributes.

[]s


Top
  
 
 Post subject: Re: NHibernate - New User Question
PostPosted: Mon Jun 15, 2009 12:49 pm 
Newbie

Joined: Wed Jun 10, 2009 3:47 pm
Posts: 4
Thanks for reply! I have 2 more questions.

1.What are the advantages of using NHibernate?

2.If I we use Nhibernate and what is the architecture called? (3 tier)


Top
 Profile  
 
 Post subject: Re: NHibernate - New User Question
PostPosted: Mon Jun 15, 2009 1:03 pm 
1)
The advantages of using NHibernate (or another ORM framework) is that you can spend more time developing your application, and let NHibernate deal with SQL and database;

You won't need to write SQL command, like this. INSERT INTO TABLE1, or UPDATE TABLE2 (field1, filed2) VALUES();
instead of that you'll be able to use merge, insert, delete. Simple NHibernate methods.
You'll work with objects. If you are developing using .NET (or JAVA) you're problably using OO.

Your code gets more simple, and easy to mantain and test.

2)
This architecture is called n-tiers. You can have 3 tiers, but sometimes you can have more than that. It all depends on your application.


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