ObjectSpaces Explained

Tweet

ObjectSpaces

Following the introduction to Whidbey article, this blog will feature some new, more advanced features and technologies in Whidbey.

The first technology to look at, and be prepared for, is ObjectSpaces. ObjectSpaces allow you to map your database tables to actual objects you can create and manipulate in your code. Yes, no more scrappy SQL statements :) But ORMs for .NET aren’t new. There are many implementations out there already, but ObjectSpaces is Microsoft

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • M. Johansson

    Nice stuff.

  • Kyle

    Cool… First I’ve heard of this technology.

  • http://www.totalpda.co.uk dhtmlgod

    I had a proper look at ObjectSpaces, finally, last night. Very exciting! Makes my geek juices flow!

    But there are a couple of things though:

    1. Quality of SQL
    If the SQL is, basically, crap, then it

  • http://www.miseldine.com miseldine

    You’re absolutely right in many cases dhtmlgod :)

    Microsoft’s Whidbey release only supports Microsoft databases, and at present Microsoft have no plans to support other database vendors, though have developed the technology to open it up in the future. Read Andrew Conrad’s unofficial-official position on this.

    Microsoft themselves state in their literature for ObjectSpaces, use them if “Raw performance is not your main goal”. That said, overheads of producing your own business object “mappings” will narrow the performance gap too. I’ve used ObjectSpaces in Whidbey, and there is a definite pause when streaming very large data sets with the ObjectReader vs. SqlDataReader…

    Microsoft have entered this field rather late in my mind…if they’d had this available when .NET v.1 shipped, it would be something to get excited about. But its all here already, tested, examined, and available. Try Entity Broker, or Paul Wilsons ORMApper which is based on the ObjectSpaces syntax and supports MySQL.

  • http://www.WilsonDotNet.com PaulWilson

    You seem to be using a really really old preview version of ObjectSpaces, since the Whidbey preview version is different in many cases from your examples. I recall there was another preview back a few years ago, and there are still a few articles on the net based on it. Check out this article for the current syntax and downloadable sample that will run under Whidbey: http://authors.aspalliance.com/paulwilson/articles/?id=21.

  • http://www.miseldine.com miseldine

    I hacked the examples from what we had at University…apologies if it is no longer current…one of the perils of previewing pre-release technologies I guess :)

    The concepts are still relevant however, but I will get on to updating the code. Thanks for the pointer.

  • David

    This is all great and wonderful but, System.Data.ObjectSpaces DLL is nowhere to be found… Does anyone know where I can get it from?..