Introduction
The Persistor.Net object persistence framework is featured in the latest issue of MSDN Magazine. From the official Persistor.Net website, “Persistor.NET is a library that provides transparent persistence for pure object oriented development for the Microsoft™ .NET Platform.” If you don’t know anything about object persistence, think “No T-SQL code”.
I have been interested in object persistence for some time and have briefly reviewed NHibernate and Gentle.Net and I have found them to be both promising and daunting. There is no way around the learning curve to use these frameworks. When I set out to evaluate the Persistor.Net Express Edition, I wanted to see if this product would be easy to use as well as functional. Here is the feature breakdown for you:
-
Pure object oriented modelling without trade-off: Use inheritance, polymorphism and interfaces without any restrictions or special treatment.
-
Database unaware: Persistence provided is completely transparent – no database setup, scheme definition or access specification.
-
Persistence for all classes: Persistence is not restricted to specialized classes but incorporates also .NET Framework classes or 3rd party classes.
-
Zero Configuration: Start without any previous configuration or mapping definition.
-
Ready for .NET Framework 2.0: All new features like generics or partial classes are supported.
-
Supports Agile/eXtreme Techniques: The use of non-intrusive Persistor.NET makes it easy to develop, evolve, and maintain software code in an agile manner.
Initial Review
After a quick download (420 KB) and installation, I opened up the sample application in Visual Studio .Net 2005 and stepped through the project. This gave me the information needed to use the product.
I created a new website in Visual Studio .Net 2005 and added references to ToTop.Datastore.dll and ToTop.Persistor.dll. I borrowed code from the sample on creating a reference to the datastore and persistor objects:
Datastore datastore = datastore.CreateDefault();
if(!datastore.Exists())
datastore.Instantiate();
Persistor persistor = new Persistor(datastore);
persistor.Save(myObject);
I created a simple class with 2 private fields, 2 public properties to expose those fields, and marked the class with the [Serializable] attribute. Within ten minutes of installing the product I had a working example to create, read, update and delete data, without writing a single line of T-SQL. This product was immensely easier to use than any other object persistence framework I had seen to date. On the small scale that I have implemented this, it seems very fast for all it has to do at runtime. I look forward to taking a look at the full version.
Conclusion
This is a fast and simple framework that will attract more developers that need to quickly develop business applications. However, unless the future version has the ability to choose a database server, database name, and user credentials, this product will probably not attract many ASP.Net developers. Most ASP.Net development that includes a database typically uses a stand alone database server and doesn’t combine ASP.Net and SQL on one box. The Express version of the product looks for the Persistor database on the localhost. This is great for Windows client software developers, but sends us ASP.Net developers back to the Open Source arena to provide a solution. Look for a review of the full version in Part II of this post.
Updated 6/7/2006:
I contacted the developers to inquire about the Professional Edition features and pricing. At 990 euros (~$1271 US) for the single developer edition, further evaluation of this product is cost prohibitive. Back to open source
.

Hi there,
I’d not seen Persistor.NET, looks interesting albeit pricey! I have been a user of NHibernate for some time, and now Castle ActiveRecord. I’m also a RubyOnRails user.
I took the plunge into NHibernate some years back, and it *was* difficult. I think the main point is learning to “lean” on the tool, work out what it’s good at, and try to work within it’s limits. This sometimes means sacrificing your own personal style and preferences.
I do believe that the only way to get over the learning curve of such frameworks/tools is to jump in, providing you can find a suitable project!
I’d certainly recommend trying the Castle ActiveRecord stuff for starters – it’s great and I’m finding I can get very fast development speed using this tool. You’ll also find you pick up some NHibernate knowledge on the way.
As for getting started, the community is pretty strong, so the forums and documentation should give you a bit of a leg up.