There is yet another player entering the game of OR-Mapping in the .NET-World: Persistor.NET. Like their competitor Genome they come from Austria.
The product looks like an implementation of an OO-Database that uses SQL-Server as backend.
I have not done a deep investigation of the product, but I am sceptical concerning the usefulness of the product for enterprise applications. The issues I have are the following:
- The goal of the product is to shield the developer completely from persistence-concerns:
- The developer can not define the DB-schema (resp. in their philosophy he does not have to care about the schema).
- The mapper does not work on an existing schema.
- The mapper generates (extends?) the schema on the fly.
The product basically implies, that when we are doing Object-Oriented development, all persistence-details are not a business-concern and therefore should be handled by the infrastructure. I don't agree with this opinion at least on two levels:
- From an architectural standpoint the persistence details are very much a business concern for business applications:
- There is no logical separation of the Data-Storage-Layer and the Application Layer. There is no decoupling between those two layers: As soon as I have defined my object-structure, the DB-schema is also defined.
But this logical separation is a crucial requirement for non-trivial business applications:
- The persistent data is almost always the real asset of a company, not the applications that handle the data. The data often lives a lot longer than the applications on top of them. So it is a critical concern how the data is stored, and the schema plays a very important role here. Data-migration is a keyword that comes to mind.
- The persistent data has often to be accessed in different ways and even different applications. Not all consumers of the data can or want to use the same logical (object) model to work with the data. Think about reporting, advanced queries, exports and imports…
- From a development standpoint it rings my alarm bells, when all persistence details are hidden in a black-box:
- What if the application has to scale? Does the black-box scale as desired? What if not?
- What if there are performance problems?
- What if the black-box does not behave as I expect it?
- What if I want to use the black-box for an exotic use-case? (Example: What happens If I have an existing application with existing data and then I introduce some new subclasses for an existing class? There are several ways to map inheritance in a relational DB, each has pros and cons, a tool cannot make the decision for me! What happens with existing data, when the schema changes because of the new inheritance-hierarchy?
So, I think for the big picture of an enterprise application, persistence and how it is realized is a very important business concern. A lot of effort should be put into that topic, mostly in the early phases of a project (architecture, design). It is also important to fix the persistence-details as early as possible in a project, since a strong fundament is always a good thing.
What I think OR-Mapping as all about, is to shield the implementation of business logic from persistence details. The developer does not have to be concerned about persistence. He should not have to have any knowhow about the persistence-backend. He should be able to work on a higher level of abstraction, with an object-model, that was designed and optimized for the specific application he is developing
Also the implementation of the business logic should be decoupled from the persistence-backend, so that the backend can be changed with minimal effort.
My above concerns are more or less applicable for all OO-Databases. In my opinion OO-Databases are not suited for the core data-storage of business applications. I see the following scenarios for OO-Databases.
- Prototypes that need a data storage
- Systems that do need an embedded data storage, but where the raw data is no business concern. Clients/Users of those systems do not mainly interact with the data in the system, but with the functionality of the system. (Control platforms, embedded systems, standalone desktop applications …)
- Intermediate repositories of business-data for distributed business applications. For instance for disconnected smart-clients. The repositories hold a copy of a subset of the business-data and there is some kind of synchronization with the primary data-storage.
But back to Persistor.NET: I don't see how they place themselves on the market. Do they compete with full blown OR-Mappers like NHibernate, Genome or OpenAccess? I dont think so, according to my concerns above. On the other side there is competition from pure OO-Databases like db4o. All the features of Persistor.NET seem to be standard OO-Database features and the so called ‘Zero Configuration’, can be provided by db4o even better, because it does not rely on a SQL-Server as backend.
By the way: Ted Neward is writing some tutorials about db4o (Part 1, Part 2). In the tutorials he addresses also some general topics of object databases.