Monday, December 29, 2003

ObjectSpaces not ready for prime time?

So I have spent the last few days trying to get ObjectSpaces working for some fairly straightforward stuff working with the pubs database that goes beyond the few simple examples they give in the Tech Preview docs. So far the experience is less than pleasant.

Conceptually I am enamored with ObjectSpaces. I am somewhat of an object bigot, and would love to cut out all the ADO.NET code I always end up writing that amounts to a mapping layer per app to populate my objects and store their state after changes. I haven't spent any time yet looking at any of the commercial products that do this because for the work and writing I do, I generally try to stay away from solutions that result in vendor lock in. I want to teach people how to get things done with the framework, not third party products. That is what they pay their marketing folks for. (OK, I realize this makes me an unpaid Microsoft marketeer, but that is a whole separate discussion).

I was able to get some one to one, one to many, and many to many scenarios working, especially for reading data. When it came to persisting changes, things got dicier until I realized that it was not hacking foriegn key constraints with inserting new object graphs too well. If I got rid of the FK constraints (not often an option in a production DB), I was able to persist new objects with one-to-one and one-to-many relations without a problem.

The real problem at this point is a combination of lack of documentation and REALLY uninformative exceptions. It is already a tough transition to make since all the talking to the database is done for you based on the mapping XML files that you author. There is no code to step into to see what is going on. At least when you have something really gooned in the mapping files, you will get an error message with some info on where you are breaking the schema.

But if problems occur at the DB, no usable information gets propagated back to you in your app. You just get really useful information like:

Error(s) updating one or more objects.

Yeah. Big help, thanks. Should have just stuck with an exception message like “You're screwed” until you have something useful to say.

Add to that the fact that in all of the three newsgroups (beta, private, and public) related to ObjectSpaces that I have found, people are more interested in debating the philosphies of ORM and whether MS should create a ORM layer or leave it to third party products than discussing how to actually use the product.

I think OS has a lot of potential and I want to figure out where it fits into the apps I develop. But we are going to need some better information to work with before that becomes viable for the masses.

Anyone out there working with it successfully for real world projects involving complex object mappings tied to other-than simple demo databases?





Monday, December 29, 2003 1:24:40 AM (GMT Standard Time, UTC+00:00)
Comments [3]  |  Tracked by:
"online casinos" (online casinos) [Trackback]
"how to play poker" (how to play poker) [Trackback]
"online casinos" (online casinos) [Trackback]
"slot machines" (slot machines) [Trackback]
"free offline texas holdem poker software" (free offline texas holdem poker soft... [Trackback]
"online casino stats" (online casino stats) [Trackback]
"excalibur hotel casino las vegas" (excalibur hotel casino las vegas) [Trackback]
"casino game downloads" (casino game downloads) [Trackback]
"system of a down roulette" (system of a down roulette) [Trackback]
"cash advance" (cash advance) [Trackback]
"maquinas tragaperras portal internet" (maquinas tragaperras portal internet) [Trackback]
"play free casino slot machine" (play free casino slot machine) [Trackback]
"buy including online prescription valium valium without" (buy including online ... [Trackback]
"juego interactivo portales internet" (juego interactivo portales internet) [Trackback]
"best online gambling casinos" (best online gambling casinos) [Trackback]
"ameristar casino" (ameristar casino) [Trackback]
"texas holdem tables for sale" (texas holdem tables for sale) [Trackback]
"online casino business" (online casino business) [Trackback]
"loans" (loans) [Trackback]
"ruleta hoteles playa" (ruleta hoteles playa) [Trackback]
"juego seguro portal" (juego seguro portal) [Trackback]
"casinospiel" (casinospiel) [Trackback]
"black jack learn play" (black jack learn play) [Trackback]
"online casino and sports book" (online casino and sports book) [Trackback]
"tamiflu price" (tamiflu price) [Trackback]
"business tournament" (business tournament) [Trackback]
"diet pills relacore" (diet pills relacore) [Trackback]
"online pharmacies requiring no prescriptions" (online pharmacies requiring no p... [Trackback]
"casino online caribbean poker legacyforlife.net" (casino online caribbean poker... [Trackback]
"online poker tour" (online poker tour) [Trackback]
"canada discount online pharmacy" (canada discount online pharmacy) [Trackback]
"buy phentermine on line" (buy phentermine on line) [Trackback]
"currency exchange rates" (currency exchange rates) [Trackback]
"international exchange rate" (international exchange rate) [Trackback]
"blackjack online" (blackjack online) [Trackback]
"backgammon stratagy" (backgammon stratagy) [Trackback]
"free video keno games" (free video keno games) [Trackback]
"didrex" (didrex) [Trackback]
"medications" (medications) [Trackback]
"student loan" (student loan) [Trackback]
"betting casino online poker video" (betting casino online poker video) [Trackback]
"keno sadler" (keno sadler) [Trackback]
"phentermine and no prescription" (phentermine and no prescription) [Trackback]


Monday, December 29, 2003 3:40:24 PM (GMT Standard Time, UTC+00:00)
It sounds like your experience closely matches mine. I finally feel like I'm getting over the hump, though. One thing that may be a help to you: "Error(s) updating one or more objects" I'm guessing is a PersistenceException exception. PersistenceException has an Errors property that contains the "real" exception(s) that caused the problem.

As far as the OS newsgroup, I generally agree. The problem is that the ng has been around since the first OS release at the last PDC. In the mean time there hasn't been much to discuss besides all the third-party O/R mappers out there. I think posting such problems/queries as we have encountered might help push the activity there in a more practical direction.
Daniel Pratt
Monday, December 29, 2003 4:04:51 PM (GMT Standard Time, UTC+00:00)
Just have a look at http://weblogs.asp.net/klaus.aschenbrenner/archive/2003/12/21/44983.aspx

-Klaus
www.csharp.at
http://weblogs.asp.net/klaus.aschenbrenner
Saturday, November 19, 2005 12:35:16 PM (GMT Standard Time, UTC+00:00)
buy vicodin online
Comments are closed.



















Sign In
Copyright © 2006-2007 Brian Noyes. All rights reserved.
designed by NUKEATION STUDIOS