Since I've just recently started using nHibernate, I'll add my two cents. The learning curve is not that bad because the community is good, the documentation is decent, and there are a lot of good samples available. I have had some difficulty with mapping by code since the documentation still deals mainly with XML-based configuration, but part of my issue was unfamiliarity with Lambda expressions and other concepts (never used an ORM before). For someone more experienced, I doubt it would be too much trouble.
I definitely have been developing DB first and it hasn't presented any problems. For a new system I'm working on, I have a separate DB project that generates SQL scripts but isn't connected to nHibernate in any way. Very easy. I even have some very customized stored procedures that I use through nHibernate, which were also very easy to setup. You can return full, managed entities or just report-type DTOs. We evaluated EF as an alternative but found that it just wasn't quite as good. And honestly, once you get into more complicated scenarios, I can't imagine the learning curve for EF being any better. I was worried at first that nHibernate would be too complicated to learn in a short amount of time but it appears that fear was unfounded. -Patrick On Wednesday, March 21, 2012 11:18:02 AM UTC-5, Belvasis wrote: > > Hi Joel, > > >> 1. The learning curve is massive (I come from Grails, where Hibernate >> was extremely well wrapped). I found very little in regards to guides >> and tutorials. >> >> > I think, the learning curve for NH is not that massive. But i think this > depends on > your general knowledge. There are a lot of guides and tutorials out there. > I can > recommend the two books "NH in Action" and "NH Cookbook". The nhforge.org > site has a (nearly) complete documentation and some good blog posts. > Fabio's > blog at http://fabiomaulo.blogspot.de/ has also a lot of informations > about NH > and at http://ayende.com you can also find helpful informations. And i > think > you can find a lot more. > > >> 2. I got the impression that using database first would be difficult, >> I found no tutorials! I have always done migrations with simple .sql >> scripts and helper apps I wrote myself. >> >> > In my last projects i always used an DB first approach, mainly because I > had to work with an existing database. I don't think it is that difficult > to map > entities against an existing DB schema. > >> >> 4. The user base is shrinking? This group got 900+ msgs in feb'09, >> 800+ msgs in feb'10, 550+ msgs in feb'11 and now only 130+ msgs in >> feb'12! I hope this is because users migrated somewhere else to >> discuss but this is scary as I will need help from time to time. >> >> > Yes, in the last months it was a little quite around here. I think this is > because > some of the guys like Fabio are no longer involved in the project. But > thats > just an assumption. Today it is a lot better and there are many people who > are willing to answer your questions. And since the new 3.3 release is on > it's > way, one can see that the project is still alive. > > > >> Currently I'm caught in limbo thinking it might be easier if I just >> wrote the sql statements myself with simple classes and wiring them >> together using duct tape - but it really, really looks like ASP.net >> MVC 3 apps are meant to be used with an ORM. >> >> > There are for sure cases, where NH is to big to solve a problem. But in > most cases it helps a lot and for MVC apps it is as far as i can see > the best solution. > > >> My databse will be quite simple, <20 tables with 1-1 and 1-n relations >> only. Point me to a starting point >> >> > Maybe EF CodeFirst would be an alternative to NH in this case, but there > a lot of comparisons between EF and NH that show, why NH is still the > better choice. > > Hope this helped a little :-) > > >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/5jIPWAvS0ZYJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
