Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

ORM Sentiments

Hello all,

I'm going to check out a prospective customer late next week.  They are writing their software with the .NET Framework with SQL Server, however they are using an ORM framework because, and I quote, "the DataSet model was too slow."

I have to admit that this puzzles me; I've never used any 3rd party framework for development, I've always stuck with the APIs that Microsoft provides - rather than a DataSet models for a performance intensive situation, I'd use the SqlDataReader along with SqlCommand proc execution, if you follow me.

They are using products from DevExpress ( - anyone utilized these?  Everywhere I've worked has been too cheap to fork for stuff like this...

David Seruyange
Friday, April 15, 2005

It's pretty likely that any ORM system that "shuns the DataSet" will be doing what you've done by hand: create data readers, and populate plain old objects (and collections of said objects).

Brad Wilson [MSFT]
Saturday, April 16, 2005

I've used other stuff from Developer Express.  It was all very good.  I think they produce good quality stuff.

As for XPO, which is their ORM product, I've spent a few hours playing with it, but haven't used it "for real".  I vaugely recall disliking the way it handled relationships between persisted objects.

Like you, I'm not entirely convinced by performance arguments against datasets.

John Rusk
Saturday, April 16, 2005

> I'm not entirely convinced by performance arguments
> against datasets

It seems that using Datasets is a question of design in an application. 

The ORM seems like it would add a lot of overhead because things there is an additional layer to what the developer would _already_ be doing.

So what then is the benefit? I know that Java people love these...


David Seruyange
Sunday, April 17, 2005

As over against DataSets, I'm not sure there is very much benefit.  You can annotate your DataSets... get more normal names, like Customer and Customers instead of CustomerRow etc.  Typed DataSets automatically generate properties to return the one side of a relation, and collections to return the many side.  So if you have a Customer with multiple Orders, and each Order has multiple OrderLines, then an Order will automatically have a Customer property and a GetOrderLines function.

Given all this, personally I haven't seen that O/R mapping would offer enough benefit to justify the time investment.

Sunday, April 17, 2005

I was an architect and PM of a certain corporate system built with .NET - rich clients communicating with a middle tier running under IIS.  Database was SQL Server.

We were looking at trying somewhat different approaches so we built one particular aspect (let's say 1/3 of the functionality) to transport typed datasets, and the rest transported serialized business objects coded by hand.  Of course the latter were populated at the server side through firehose-style datareaders.

With both approaches we learned enough to fill a medium-sized book.  To cut a long story very short:

-- Custom coded business objects were blazingly fast, easy to maintain, and the burden of manually writing the O-R handling code (i.e. the CRUD model) was bearable

-- Datasets were a disaster.  Don't even think to go there.  After we've built most of the code, we tried every possible performance trick (that did not involve complete rewrite).  No improvement whatsoever.  D-i-s-a-s-t-e-r.

Kamen Lilov
Sunday, April 17, 2005

Can you elaborate more on what you mean by "disaster"?  Do you mean only that they were too slow, or were there other problems too?

Tuesday, April 19, 2005

If "too slow" relates to development time, then I agree.

Did not use DevEx ORM.

Ruslan Popov
Thursday, April 21, 2005

> The ORM seems like it would add a lot of overhead
> because things there is an additional layer to what
> the developer would _already_ be doing.

Add more overhead, not a lot of. But developers will save a lot of time.

Tien on Software
Wednesday, May 25, 2005

*  Recent Topics

*  Fog Creek Home