«« Next » « Previous
«« Next » « Previous

Link Details

You pick the winners! Login and vote now.
Link 84854 thumbnail

By rick
via use.perl.org
Published: Jun 03 2008 / 21:56

I know this has been a long-standing area of debate and has been discussed to death, but I just have to get this out of my system since it's bugging the heck out of me.
  • 31
  • 1
  • 2514
  • 803

Comments

Add your comment
User 281050 avatar

cbang replied ago:

-1 votes Vote down Vote up Reply

Slightly one-sided. ORM's are needed, however they can be disguised such as to not look like this big clumsy unnatural tier, LINQ is a good example of this.

User 200691 avatar

lem z replied ago:

0 votes Vote down Vote up Reply

linq is not an orm.

User 281050 avatar

cbang replied ago:

0 votes Vote down Vote up Reply

I know, but it's a façade to one - thus masking the usual mismatch.

User 246846 avatar

hartsock replied ago:

0 votes Vote down Vote up Reply

I did web based Perl development off and on for about a decade before, after, and during college. The old Perl hacker design wisdom was called data-centric design. That made sense because Perl's object model was name-space resolution based. That meant it didn't really have objects as we understand them in Java or C++ it had blessed references associated with name-spaces... no type system involvement at all. So I'd say that any ORM you did in Perl would always feel clumsy and unnatural because objects as data types didn't happen in Perl. If you don't have objects as types why have ORM? The only objects that make sense from that perspective are Controllers and Services.

Fast forward to the 21st century and my last few years in Java development. I've been working with GORM since 2007 and I'd say that GORM really is the answer to many of these problems ... it makes working with persisted objects so intuitive that even with sophisticated models (is 135 distinct objects/tables enough for you?) you never ever write SQL queries or DAO. Constraints are kept inside Object definitions so you don't spread an object between package and table definition. Sophisticated searching can use criteria or the Searchable engine. So you never hack together SQL queries. I would tell my Perl programmer friend to try GORM before giving up on this whole Object Oriented business.

No. Really. I'm dead serious.

User 233461 avatar

antych replied ago:

1 votes Vote down Vote up Reply

ORMs look like a gift from heaven the first time you learn about them and a curse one you start using them. They just don't work (with exceptions)

User 261835 avatar

Kenneth Downs replied ago:

1 votes Vote down Vote up Reply

Short answer: no. I've got a blog entry I've drafted on this, and the gist is that ORM *is* the impedance mismatch, it connects devices together with reduced efficiency.

User 200691 avatar

lem z replied ago:

0 votes Vote down Vote up Reply

Yes, very much so, especially when you are the one paying for a project. In many cases getting stuff working and off the ground is alot more important than coding it "properly" or optimizing it for high load... Optimizing for high load when you don't have any kind of load at all is just a waste of time.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.