Frans Bouma's blog

Generator.CreateCoolTool();

Syndication

News



    Visit LLBLGen Pro's website

    Follow me on Twitter

    Add to Technorati Favorites

About me

Fun stuff I created

My work

Yes, that's called O/R mapping, and it exists oh... for a decade or so.

I just watched this video, where Anders Hejlsberg explains to Channel 9 what Linq is. I couldn't help it but think "Why is everyone at Microsoft doing as if they've invented something new, or hearing from it for the very first time?". Also read the comments below the video on channel 9... I seriously doubt it if some people ever look beyond what they get from Microsoft. . I like Linq's general structure, and I think it's a step forward, but please... drop the act as if you all discovered something no-one has thought of before, especially in the department where databases come into play.

Same with the XLinq examples given. I find it interesting Microsoft finally understands that the horrible way the current Xml objects work is something which should be changed. What I also find interesting is that it's a big achievement to be able to finally create elements and attributes in a more convenient way. Anyone who has done some Xml work knows that the first thing you do is to write some wrapper which will produce the elements and attributes at the spot where you want them. Write it once, re-use it everywhere, and even today, not in 200n, n > 6

I'm not that into plugging my own work after making a point, but for creating and using an object-oriented overview of your database(s) and be able to use that with queries which are checked at compile time and are type safe, you don't have to wait till Linq finally arrives. And no, I didn't invent it either nor did a lot of other people in the O/R mapper field. The O/R mapping patent (which uses Xml files ironically, not attributes) states MS invented it, we all know that one of their biggest competitors, Oracle, sells a tool today which is around at least 10 years utilizing this same stuff.

Published Monday, September 19, 2005 12:42 PM by FransBouma

Filed under:

Comments

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 7:53 AM

Very well said - again, MS User arrogance/ignorance showing in the comments.

Personally I like the LINQ things - sadly, I can see tremendous limitations which tell me that while I will support LINQ in the future, I still have to turn our my own langauge, as it looks like. In general, it looks like (just installing it on my computer when RC level bits come) t is not extensible enough to accept a notation for query tips, cache control and a lot more that I actually need.

It is nice to finally see this in the langauge, and the implementation is nice, but the idea is neither new nor revolutionary at all. It is more - the ignorance of the people commenting that shows.

Well, if idiots do not read books on the matter of their work, some nice impelmentation and nice ideas that are just evolutionary may acutally seem like a revolution for them.

Btw., O/R mappers are older. TopLink (the now-oracle tool) was by fast not the first. I think the first were written for Smalltalk and date back about 20 years or so.

Thomas Tomiczek

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 8:53 AM

I don't know. I doubt anybody thinks or claims that ORM is new or exciting. What most people were reacting positively to was the new enhancements to the language that make this sort of thing possible. Personally I find the enhancements that make Linq possible quite elegant.ORM on it's own wouldn't elicit "Oh my God" responses.

Just my $0.02

senkwe

# TopLink@ Monday, September 19, 2005 9:19 AM

TopLink was actually first created for SmallTalk I think, and then ported to Java.

Anders

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 9:27 AM

Argh, I guess I have to toss that blog post I wrote this morning, joking about MS now having invented OR Mapping. I'm too slow compared to you Frans...
:-)

Best Regards,
Jimmy
www.jnsk.se/weblog/
###

Jimmy Nilsson

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 9:34 AM

The impression I got from being at the PDC was not that Microsoft thought they'd invented O/R mappers but rather they were the first to truly integrate it as a core part of what was a general purpose language. I could be wrong though and you're obviously entitled to your perception of the comments in the video.

I also don't think this is even worth talking about/breaking down. I mean, all this does announcement does is validate what you folks already do with your applications (LLBLGen, etc.). I'd rather hear about what your application has and why your applications make more sense than this 'new technology' than I would hear folks complain about Microsoft's percieved ineptitude with the technology. You do yourself and us a better service by doing so.

My two cents.

Alex Lowe

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 9:37 AM

"ADO.NET team showed an .XML file with mappings, and used LINQ over it. The interesting part was that he was not using DLinQ but another mapping technology."

Hmmm

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 10:37 AM

Sorry Alex if my comment was counter productive. It was considered a joke.
:-)

Best Regards,
Jimmy
www.jnsk.se/weblog/
###

Jimmy Nilsson

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 11:48 AM

I'm a little tired of the defense so many are giving that this is just an early preview -- when its the third attempt in at least 5 years.

Paul Wilson

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 2:50 PM

It's not the ORM that they provide that is exciting, it's the languague integration that is facinating.

The fact is that it would be very easy for you to do the same by including ORMApperOfChoice.Query declaration.

This mean that I also don't have to stop and switch cycles from C# to SQL to the ORM query language to whatever.

Add to that the ability to use set operations on in memory objects, and it's pretty powerful.

Ayende Rahien

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 3:05 PM

::when its the third attempt in at least 5
::years.

...and nothing in the fundamental principle is new. Even 5 years ago, for their first attemtp, they could just have read some white papers from other people BEFORE creating their stuff. At least this is how I started it.

Thomas Tomiczek

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 3:25 PM


The part I am not looking forward to is having to know this inferior implementation of O/R mapping because it is inevitable that I will work on a client's project which uses this garbage. I sure hope MS fixes this by then . . .

Jason Bunting

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Monday, September 19, 2005 5:03 PM

Frans + others, I'm not really sure that I understand what the gripe is here. It doesn't really matter whether you invented it or they did, the fact is that we are getting it :-)

Finally we won't have to turn up to a client's site and work out which O/R mapper has been used (or whether they've rolled their own!).

I'd cut some slack here... or at least hammer them about missing features - but not play the "not invented here" card.

Darren Neimke

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 12:43 AM

Hey, Channel 9 is all about 'Softies patting each other on the back. I find that site to be very nearly useless, aside from the Ballmer interview that Scoble did.

Jeff

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 1:51 AM

::Finally we won't have to turn up to a
::client's site and work out which O/R mapper
::has been used (or whether they've rolled
::their own!).

You would on our projects. And our projects would not work with DLINQ. See, the problem with DLINQ is that is is stupid - it is about the worst possible implementation of an O/R mapper.

* Db specific.
* Attribute based. Have fun changing the mapping or getting an overview over 500 objects. Tip: Others hav tools helping with this.
* No inheritance. I have projects hwere using data driven inheritance to a pretty large degree, and the code would explode in an O/R mapper not supporting them. Inheritance rocks.
* No extensibility. We use a mapper in which the mapping code is not generated, which means we can extend the model. A base-class can get a data driven subclass just by linking in an additional DLL, without modification of the original object - great for extensible object models.
* Caching, Remoting. DLinq is totally unable to work in a remoted environment in an optimized way. It is the perfect example of people forgetting everything they should know about architecture (layers, tiers) and THEN writing an O/R mapper. Optimized access paths over tiers are something DLINQ does not.
* Absolutly zero support for paging, prefetch paths and a lot more things.
* No way to redefine mappings. Yes, going into MY posting history you can see me being against this, but I now found a business case where an external mapping file that can be replaced makes absolutly a lot of sense. But then, we use an O/R mapper to develop something like WinFS for hosting, which is, in itself, already pretty special.

Frankly, I have problems using LINQ (not even DLINQ) as query system for my own O/R mapper due to LINQ limitations - I simply can not express enough things in it (what objects to prefetch, whether to prefer original data or cache data, or even something so simple like paging). These features, though, are in heavy use in some applications (like http://www.powernodes.com/) and make the difference between some functions taking a second or taking a minute - so I can not live without them.

So, we have a technology not flexible enough (as it looks) in LINQ (but I seriously hope I can code around some of the limitations somehow), and on top of this we have an O/R mapper made by - well - MS' worst developpers, as it looks like, ignoring what all white paperr show to be the core elements an O/R mapper should have.

Yes, we will get to see this at customer's sides. Bad news.

I just with the MS developpers in this area would learn to READ before coding, and the PM would actually read stuff like Ambler's "Building Object Applications That Work", or his persistence white paper. There are so many white papers around on the net that anyone that does not know what a persistence layer must do, and that is working on one, has to accept he is accused to be an idiot for not reading them.

::It's not the ORM that they provide that is
::exciting, it's the languague integration
::that is facinating.

Yes :-)

::The fact is that it would be very easy for
::you to do the same by including
::ORMApperOfChoice.Query declaration.

Yes :-)

::This mean that I also don't have to stop and
::switch cycles from C# to SQL to the ORM
::query language to whatever.

Not sure about this so far. See, it looks like the O/RM can include search functions and like there is some syntax showing how they are called, which would mean you would have to learn an O/RM's available mechanisms. At least I hope (waiting for the RC version to come out), because otherwise this langauge is just too limited for practical use.

::Add to that the ability to use set
::operations on in memory objects, and it's
::pretty powerful.

Yes.

Thomas Tomiczek

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 5:57 AM

Sorry to say this... but i think that Darren Neimke is sortof right with his statement

"Finally we won't have to turn up to a client's site and work out which O/R mapper has been used (or whether they've rolled their own!)."

Not that i want to use their OR Mapper but the mechanism is definitly going to be the standard. It is maybe not scalable but people are definely going to use it. Because typing "var q = customers
where c.city == "London"" is much more user friendly than creating the correct object and then using complicate predicate objects to do the filter job. Another reason why it is much more user friendly is because "var q = customers
where c.city == "London"" is read easier by a human than reading the complex obect structures that we are using with existing OR Mappers.


Now i have a question to the OR Mappers out there .. Is it going to be possible for you to link your OR Mappers into this same structure? What i mean is. when i type "var q = customers
where c.city == "London"" in C# will i be able to select which OR Mapper i want to use in the background? By the look of things the OR Mapping functionality comes from their namespace System.Query will i have to import for example LLBLGen.Query and have a access to the same power? or do i still select System.Query?

Wayne Barker

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 7:24 AM

I posted this comment to my blog:

http://MarkItUp.com/Posts/Post.aspx?postId=0d4e1330-d852-4cd6-b1af-8afac4810244

But I'll re-post here to keep this thread complete:

*********************************************

I was reading (and replied to) an article by Frans yesterday which was a rant "against" LINQ. The bit that got me - and why I replied - is that it seemed that Frans was playing the player and not the ball.

From my shallow understanding, ORM developers should be embracing "Language integrated query". LINQ is not designed to be an ORM but rather the syntactic sugar that runs over the top of them.

Reading the C# spec. we can see that there is a section there which describes "The query expression pattern". This is a pattern that a Type can implement to support the standard query operators. In fact this is exactly what is happening in DLINQ where the DataContext object implements that very pattern.

So, thinking about the future, I can see that potentially I could walk into a client and write code against any ORM tool using syntax that is common to me as a C# programmer.

Isn't that a good thing?

Darren Neimke

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 8:11 AM

"an article by Frans yesterday which was a rant "against" LINQ."
No! It's not a rant against Linq! It's a rant against "we invented O/R mapping, look how cool this new feature is which offers us an OO view of the db!".

I actually LIKE linq, the general system of being able to traverse any IEnumerable<T> with functions and expressiontrees. See my previous post about Dlinq and Linq, it even has in the title: "Linq==cool".

Watch the video and read the comments below the video post. Then take a step back and think by yourself: "have these guys ever heard of O/R mapping or do they see this phenomenon for the first time?". I got the feeling they did saw it for the first time. Which is why I posted this blogposting.

Frans Bouma

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 8:49 AM

"Watch the video and read the comments below the video post. Then take a step back and think by yourself: "have these guys ever heard of O/R mapping or do they see this phenomenon for the first time?". I got the feeling they did saw it for the first time. Which is why I posted this blogposting."

I agree that it doesn't sound like these guys ever heard of O/R Mapping ever before - so ofcourse they are going to think - Ahh! praise microsoft! (for this technology that we don't know is actually called O/R Mapping)

Wayne Barker

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Tuesday, September 20, 2005 10:36 AM

I had the same reaction when you start hearing all the design patters and unit testing chatter about 2 years ago. They ignored it for so long, or didn't talk about it, then all the sudden, they added a little "best practices" to the koolaid.

AC [MVP MCMS]

# re: Yes, that's called O/R mapping, and it exists oh... for a decade or so.@ Sunday, October 02, 2005 11:06 PM

First to integrate it with the language? I call bullshit! I Use a product for Smalltalk and the code to write looks like this....


session := SSWDatabase new.

orders := (session instancesOf: Order) select: [ :ea | ea customer id = 13 ].
orders do: [ :ea | ea inspect ].


no changes to the language were required, and the only point at which _anything_ is executed against the database is at the point #do: is executed (When it actually executes the joined query against the db and pulls back only records pertaining to a customers Order)

C# can now get f***ed

Jason R