The Artima Developer Community
Sponsored Link

Java Buzz Forum
Re: Objects and Wars

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
Re: Objects and Wars Posted: Jul 22, 2004 7:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: Re: Objects and Wars
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

Ted Neward recently slammed object/relational mapping technologies. I have a lot of respect for Ted, so it was interesting to read. It is nice when your beliefs and work get slammed by someone whose opinion you respect. It keeps you honest =)

I think what Ted describes isn't object/relational mapping, though. He describes sunk-cost driven design and career driven design, and assigns the blame to O/R mapping. There is definate validity in the example of O/R mapping as driving SCDD, as rolling-your-own O/R mapping framework seems to be even more popular than writing blogging software or IRC bots (I blame PoEAA). As another more famous guy writing O/R tools has said, O/R mapping is hard to do well.

Its entire premise is that it is an edge case designed to handle the sharp bits. A lot of people go into using an O/R mapping tool expecting that using it is like pulling object references out of a really big in-memory hash map. It isn't, and I doubt it ever will be. Transparent Persistence is a marketing term (that means "lie"), it isn't. However, because you need to spend far less effort on persistence you tend to really want it to be true, and code as if it is. It is much like Sun's laws about network programming. You cannot pretend it isn't there when the libraries make it too convenient.

I recently gave a presentation (sorry I cannot post it =/) looking at when and where it is appropriate to use different styles of persistence in Java: tabular, entity, and transparent (misnamed). Interestingly, entity systems are generally the most successful in my experience, simply because they force the programmer to consider persistence. They don't offer much over a sophisticated transparent solution in terms of speed, scalability, or power, but they affect programming style more, and don't let the programmer "forget" that the object is persistent.

An interesting pattern I have seen in the use of O/R mapping is that a team will start using persistence Project A, which will solve everything for them. They write a bunch of gnarly code, and along the way learn about how O/R mapping works. The project fails miserably as the team didn't understand the technology, and learned as they went. As it is always easier to blame the technology than the people, Project A is labeled as crap, and they switch to Project B. Knowing the constraints of the tool now, and having better expectations, they have miraculous success with Project B. I have seen this across lots of pairings of tools, and both ways, depending on which is used first. I have seen this pattern in more than just persistence, but this is about persistence.

Probably, what we all need to do, is to remove the word "transparent" from "transparent o/r mapping" and admit that it is simply a high level tool, be up front about the design considerations, and talk a lot more about how to design applications using these tools rather than what the tools can do.

Read: Re: Objects and Wars

Topic: [Jul 14, 2004 08:54 PDT] 6 Links Previous Topic   Next Topic Topic: Link: obscure but useful java projects

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use