Have you used the OpenAccess ORM from Telerik? How does it compare to NHibernate? When should I consider using it over NHibernate?
I'm wondering the same thing myself. On one hand, there's NH with its free, open-source self, but with limited support options. On the other, a fairly new addition to a well-known tool provider's box, OA.
OA costs money, but you get support. NH is free, but support has been known at least in my brief experience to be limited and slow in coming.
I think both are likely fine products. I've decided to give OA a try since I am already a user of Telerik's tools. OA and its support are being paid for anyway.
NH uses plain classes and object with no decorations on the class properties whatsoever. OA requires decorations (nicely generated by the OA Visual Studio GUI).
NH requires a "session" in which to do a unit of work with the database; OA calls it "scope". Both use "transaction".
OA has integration with Visual Studio and can both forward- and reverse-map to and from a database. Forward mapping is so you can design your classes and then "push" those into the database for persistence. The "reverse" is for you "domain model" developers which is what I prefer.
OA is definitely undergoing some major updates as Telerik plays "catch up" per its recent acquisition and release of OpenAccess, formerly owned by Vanatec (out of Germany).
As far as an "ease of use" and "performance / scalability" standpoint, I wish I knew where each stood. I'm sure someone out there could put together an honest test between the two and make those determinations.
One thing I like about NH is the available templates to generate the needed code not just for the "dumb" business objects (which is all OA generates now), but for a BLL and DLL. After much conversation with Telerik, I have the impression they plan for more code-generating options so OA is more useful out of the box.
Hope this helps! Someone please try to get some stats on the performance issues.
I've not used it but one benefit obvious to me, is OpenAccess is supported by Telerik, where as nHibernate is supported by the community. Depending on your company this can be a deciding factor if your ready to embrace open source solutions with no guarentee of support.
Edit
For the record I am a big supporter of nHibernate, and open source in general. I have been using nHibernate for the last six months, using it for all new work in our web application. For my current company it is a good fit (Startups love free).
However, my previous employeer, would have had a very difficult time accepting a community supported component as a core piece of their infrastructure. This is perfectly reasonable as these companies' web sites are their sole source of revenue. Would you want to stake your entire business on software that has no accountability associated with it? Some people wouldn't want to take that risk on.
Personally I have found the support for nHibernate to be on par and even better with some commercial vendors.
My point is not to bash OSS, but to highlight one benefit of using software that has a coporate backing, with a fully staffed and dedicated support channel.
One more reason: Currently OpenAccess has better performance characteristics, if you need fast ORM for your project it will be a better choice. See ORM benchmarks for details.
I would say nHibernate is free and OpenAccess is $399. Although CodeSmith with nHibernate templates is $99-$399 if you want nHibernate easily automated. It looks like OpenAccess has more transparency in the data layer and is probably easier to maintain. But, if you used something like Spring.Net you would not only have nHibernate automating the data but the service layer automated as well. Although take that with a grain of salt because nHibernate and Spring.Net are another batch of configuration files that need to be maintained. I bet OpenAccess is GUI friendly. Either one works, but there is alot more info out there on nHibernate.
Related
I need to choose an ORM for a project and I only have some experience with NHibernate. I have been reading Q&A from StackOverflow, and the most similar to my needs is What ORM for .net should I use?, but I would like to have an answer more adequate to the present products (the link is from 2009) and that also take into account some points of my project.
The easiest solution for me would be to use NHibernate because it is mature, feature rich and I have already used it, but I prefer to choose the best option for the project even if I have to "study" again.
The project is going to start as a core that communicates with SAP. The core has to support standalone and/or co-dependent modules, and each one of them may need to work with its own data from the database. The final step will be to implement the part of SAP that we use. The characteristics I need are the ones from the previous link and here are some more things to have in mind:
I would like to be able to split the data access layer so that a user with one or two modules won't need the whole thing.
A designer would be appreciated.
It will start with about 20-30 tables and, within a couple of years, that number will grow in several hundreds.
The amount of registers per table will vary from two or three to 150000+ (very few).
IT DOES NOT NEED TO BE A ONE PRODUCT SOLUTION. Combinations like NHibernate and Devart Entity Develop are also welcome.
The team for this project will also have students that will have to learn C Sharp and some of them probably don´t know exactly what an ORM is, so it would be great if it is simple or, at least, the basic stuff is not very complex (mixing tons of lambdas, reflection, extension methods, etc.).
The last one is not very important. I hope this is specific enough to avoid been closed (the question I link is still open).
EDIT:
-It is a desktop application.
-Documentation and comunity are also very very important.
The most popular ORM for .Net these days is Entity Framework. It comes from Microsoft, so well documented in MSDN style. And it fits your criteria.
I worked with NHibernate and found that documentation is patchy, inconsistent and sometimes missing. Most of the time I had to use docs for Hibernate which were not for NHibernate, just similar.
EF can do the same things and more than NHibernate, and the latest release have Migrations, which was missing (when I worked with NHibernate).
Consider it Dapper: dapper-dot-net.
Dapper is a pretty simple ORM, developed and used by StackOverflow.
There is a lack of documentation, but that is because of it simplicity. You can find some usage example in the project page or in some websites like this.
I know this is a pretty old question, but I though I would post an answer for anyone who lands here. Check out SQL Data. It is extremely simple to use, very powerful and fits all the OP's requirements.
A little briefing first; I've been a Delphi person for years, and been away from C# for two years. The last thing I've done in C# was a mid scale DB app with my own custom DAL. Ie, I had coded my own functions to retrieve data as list, functions to append data and so on. Now I am offered a small to mid scale project using C# WinForms and SQL Server, and there's a deadline which is about 2 or 3 weeks. Note that I forgot LINQ syntax and lots of things.
Now, which ORM would be easiest and fastest to learn? I can cope with not using business abstraction layer if need be, to gain time that is. I need something that'll ease manual labour. Thanks in advance.
For quick-to-implement etc, I'd look at LINQ-to-SQL; the jury is still out on who considers it to be full ORM, but tbh I don't care; it lets me map my data quickly, simply, conveniently and safely, with decent IDE/language support. The LINQ you generally need is pretty minimal... from, where, select, etc. And setting it up is just a case of telling the designer about the tables/columns vs clases/properties.
If I were you I would go for Entity framework. It's pretty simple,easy to implement, efficient and successful ORM tool. You can use LINQ as well in the entity framework while retrieving the data.
As a recent ex-Delphi developer I've been amazed with using MyGeneration to generate basic DAL/BLL classes from an existing database, via custom templates. Takes a lot of the drudgery out of the task.
I've also seen some high praise for Business Logic Toolkit for .NET. Its clean and simple architecture and small learning curve makes it very attractive. Not really ORM, but will get you up and running quickly.
If you search for the terms C#/ORM here, you will find lots of lively and interesting debates!
Choosing Database and ORM for a .NET project
Some suggestions on which .NET ORM to look at learning
https://stackoverflow.com/questions/132676/which-orm-for-net-would-you-recommend
https://stackoverflow.com/questions/146087/best-performing-orm-for-net
If you don't mind a commercial product, Lightspeed is almost too good to be true. I've used it for about 6 months now and it has helped me in every way possible, from designing the model using a graphical tool, to migrations when upgrading, updating the database with a single click, good unit testing, easy custom extending, validation, etc. At least try out the free version!
I have a project on .NET and MySQL. I've learned Devart LinqConnect in three weeks to complete it. All of LINQ functionality, wide support of MySQL, high quality support - like this product.
I am looking for ORM frameworks, came along to NHibernate, Genome, L2S, Entity Framework and now the DataObjects.NET.. So far a I read the documentation it seems pretty cabable, but have you ever tried this ORM?
Any issues/bugs with DO.NET would be approciated :)
I used DataObjects.Net v4.
It supports VS 2010 and .Net 4.0 and it is really good ORM.
It's easy to use and it constructs the database automatically so you do not design the database and reverse engineer it to classes like some other ORMs.
The only thing that was so annoying about it is the Session management and switching mechanism in case of web applications. I think even this is being taken care of in version 4.4 currently under development.
I think you should take a look at LLBLGen Pro as well. I think this is probably the best .NET ORM out there.
Aside from the fact that this question sound a lot like an informercial, there's a big problem with DataObjects.Net - it's dual-licensed as a GPL or commercial w/o evaluation. So the answer is - no, I have not tried it and it is quite unlikely I will try it.
I have no beef with GPL (though I do not like it for various reasons), or dual-licensed products - after all the license choice is a right to the copyright holder. However, I also want to reserve that right for my software as well. I am writing commercial software, which I have no problem releasing as open source, but under a license of my choice. If I am to adopt a new ORM, I want, nay - I need to be able to release a CTP preview of my product to a limited set of customers for real-life testing. And that would mean I either have to splurge the money for DO.Net upfront without knowing whether my investment will benefit me; or I have to release my sources under a license that effectively takes away the control over my app from me and has the potential to ruin my business by commoditizing my product.
Now, if there was a limited evaluation license, say one month noncommercial use, I might consider giving it a quick trial and see how it works.
If a product wants commercial adoption, it needs to have a risk-free way for early adopters to evaluate it.
Does DataObjects.NET support SQL identity columns yet? I abandoned v3 because I couldn't find a way to support identity columns.
We are about to commit to implementing Rocky Lhotka's CSLA as an application development Framework for our Visual Studio 2008 solutions. I would like to test the water on SO and am particularly interested in developer's opinions of the approach in comparison with other ORMs such as Entity Framework or nHibernate.
Also, what is the learning curve like and is it as easy (as I have heard) to maintain the applications written to this methodology?
Also would be very interested to hear from any Public Sector (especially Government Agencies) who have implemented this.
Thanks,
MaS
CSLA is not an ORM framework. It is a framework for implementing business objects. However, there are code generators available which can generate data access code for you. The CSLA framework is based on Active Record Pattern. This pattern will not scale for large scale project. In my opinion, you should implement a prototype. The goal of the prototype should be to:
Define a layering Scheme
Unit Testability of Classes
How the framework plays well with other framework
How it fits with other OR mapping tools
Learning Curve
If your evaluation seems to be positive against the above items, then go for it. In short, there should be a proper justification for using such a framework. You should not go with some one's advice, rather try it out by your own.
The learning curve of CSLA isn't too bad but be prepared to spend some time reading in the book. We have taken care of a lot of the learning curve for you by generating a DAL (Parameterized SQL or Stored Procedure support) for you, so it adds an ORM feel to CSLA only because it manages the DAL for you if you choose. But you can completely use it as just a set of BO templates. I find that active generation makes it much easier to upgrade to newer versions of CSLA as well as add functionality without having a strong need for an intermediate class.
Thanks
-Blake Niemyjski (Author of the CodeSmith CSLA Templates)
I love CSLA.
I used it to implement some ASP.NET 2.0 applications, some very large. It's easy to understand (after you understand Root, Child and Switchable objects), but you'll rely heavily on code generation (like CodeSmith).
Main question is: do you need CSLA? What feature do you like, or you just need to use some ORM? Today, I'm writing new applications with ADO.NET Entity Framework and it's more productive than CSLA.
Keep in mind CSLA isn't a metodology, but just a tool: you'll need to understand it and to tweak it when appropriate.
CSLA is a business object framework. There are many strategies for dealing with Data access - there is much overlap between ORM and data-access. I have had a lot of success using Linq-to-SQL in a Data Access Layer to simplify development. I think this is an approach that will work for you - especially given (based on your comments) your need to support both SQL Server and Oracle.
Using a seperate DAL is well documented in Rocky's book and samples on www.lhotka.net
As far as TFS - it's an ALM tool for Source Control, Project Managment and Build Automation. You would want to put the CSLA Source under source control like any other code. The simplest approach would be to include CSLA in your solution.
Another approach would be to compile it seperately and use a file reference in your projects to the CSLA.DLL. In TFS Automated build there is a property group which you could put the path to that DLL on your build server.
Lastly Rocky sells CSLA training videos on his website at http://download.lhotka.net/default.aspx?t=Core38
You can check Rocky's thoughts on SOA in the following broadcast:
http://www.slickthought.net/post/Minneapolis-Developer-Roundtable-Podcast---Talking-REST.aspx
The main thing you will need to grasp is that CSLA is a Business framework. Even though ORMs can give you basic validation (and other) features they do not IMHO really compensate for the lack of a solid business layer. You can of course use an ORM with CSLA (there is an example of using EF in the CSLA examples and NHibernate is used as an example in the CSLA Contrib project I believe) but the technologies are just complimentary.
The learning curve... well that depends on you. I found it quite easy to get started with. i think if you have a good grasp of OO you should be fine to get something basic up and running soon. The recent videos released are also very good to get yuo started.
According to this question, the most popular ORM tool for .Net is NHibernate. However, zero explanations are given. What are the compelling advantages of NHibernate over the other frameworks?
The NHibernate website makes a pretty good case for itself:
NHibernate supports transparent
persistence, your object classes don't
have to follow a restrictive
programming model. Persistent classes
do not need to implement any interface
or inherit from a special base class.
This makes it possible to design the
business logic using plain .NET (CLR)
objects and object-oriented idiom.
For an unbiased comparison of many of the major O/RMs out there for .NET, I would recommend that you visit ORM BATTLE .NET
For me, the big feature is Fluent NHibernate's Automapping which can take a reasonably complex class model, and create a relational database schema from it.
I'm not aware of any other tool - commercial or open source - that will do this.
Also, extremely powerful and configurable (which can make it arcane, alas).
There is plenty of reading available for you to do:
Advantages and Disadvantages of NHibernate
What differentiates Nhibernate from other ORM’s?
And a ton more links to people's opinions on the various .NET ORMs:
NHibernate, Entity Framework, active records or linq2sql
In a nutshell, NHibernate is feature rich and battle tested. It's free and open source.
I highly recommend EntitySpaces. it's the best ORM for me, saves me tons of time and money.
I have long time suspected that site, ormbattle is a scam. And as far as i remember, that Yakunin is one of the owners or operator of ormbattle. so take it with a large grain of salt.
check for yourself and don't trust strangers on the net. (except for me, of course).
Not recommended at all for critical mission software.
You'll get cryptic generated SQL, and will run crazy to do the silliest of things.
By 2012, big software factories have the explicit instruction of NOT using nHibernate for any projects. It's too risky, too hard to use and too buggy.
Every FAD has its expiration date.