ObjectSpaces
Some information about ObjectSpaces that was given in Luca Bolognese's presentation:
- It is designed to be a thin layer on top of ADO.NET. It's just as ADO.NET but with objects. There isn't an object server and they don't provide caching, so it's not a Entity Beans clone.
- They are targeting a 30/40% performance decrease compared to the DataSet/ADO.NET approach. They are currently 2 times slower.
- One of the usual issues with O/R mappers is that they have to decide how to load an object graph. Using the example from their demo, if you have:
Continent
string Name
ArrayList Countries
Country
string name
Continent continent
if you retrieve one Continent, you could want to load all its countries or not. In ObjectSpaces you can specify a 'span' when you query for Continent that says that you want to retrieve the Country, or leave the span empty to specify that you just want the Continent but no the Country.
The other way to deal with this is to use 'Lady Loading' (which Luca said they'll call 'Delayed Load' because marketing did not like 'Lazy' ;), which means that countries are loaded the first time you access the Continent.Countries property. To do that you need to use a special class for the collection. You cannot use ArrayList, as they need to have a hook to execute the data loading code when you access the property. The same happens if you want to lazy load a field (i.e., the 'continent' field in 'Country')
- They are using reflection to load the fields from the database. It seems in Whidbey there is a feature called 'Lightweight Reflection' that is really fast.
- The first version will support SQL Server 7 -> Yukon. They will provide a way to add support for other Managed Providers in the future.
UPDATE:
Andrew Conrad made some clarifications on the performance issue.