The Artima Developer Community
Sponsored Link

Java Buzz Forum
Rope

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
Bill de hÓra

Posts: 1137
Nickname: dehora
Registered: May, 2003

Bill de hÓra is a technical architect with Propylon
Rope Posted: Mar 21, 2008 1:27 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Bill de hÓra.
Original Post: Rope
Feed Title: Bill de hÓra
Feed URL: http://www.dehora.net/journal/atom.xml
Feed Description: FD85 1117 1888 1681 7689 B5DF E696 885C 20D8 21F8
Latest Java Buzz Posts
Latest Java Buzz Posts by Bill de hÓra
Latest Posts From Bill de hÓra

Advertisement

Brandon Craig Rhodes: "Ruby people do this. Monkey patching: F".

In fairness to Ruby people, Zope and Python people have been monkey patching for years (that's where the term comes from). I only know this because I've been in the 8th ring of Zope2/Plone hell, which is where all the monkey patchers go, and they are legion (the 9th circle is reserved for those who hack zcatalogs - a story about that some other day).  Object Adapters get a B from Brandon because he says the wrapping is annoying - and he's right, it is annoying, even though it's my reflex pattern for binding domain objects into Atom/AtomPub. Gone wrong you end up with parallel hierarchies and implicit mappings and a lot of noise - Brandon has a picture in his presentation that captures that perfectly.

Personally, I've always felt that Zope2 is a possible anti-future for Rails. And I suspect there is a cultural difference in emphasis between Python and Ruby insofar as the Python community tends to frown on monkey patching, even though it's their "fault":

Ian Bicking: "It's the second generation that's going to be less enthused, that's going to stare in bafflement at these classes that mysteriously spawn methods, and trying to figure out what's going when there's an exception in dynamically generated code. You can monkeypatch code in Python pretty easily, but we look down on it enough that we call it "monkeypatching". In Ruby they call it "opening a class" and think it's a cool feature. I will assert: we are right, they are wrong."

Chad Fowler: "But this 'monkey patching' thing is seriously powerful and, as an end-usre [sic] in this case, I can say that it makes things better for the users of Ruby."

Suggestion: if you're a Rails fan, take at look at Brandon's presentation: http://rhodesmill.org/brandon/static/2008/grok-walk-duck.pdf It gives a quick overview of Zope3's Component Architecture (ZCA) It's easy to be dismissive, but therein Zope3 captures a decade's worth of lessons learned from trying to deal with large monkey patched codebases written in a dynamically typed language. It's hard to figure out the real size of a Zope2 install because it's component/product based, but ohloh.net has it at 500Kloc - Rails according to ohloh.net is passing 100Kloc. Am I saying monkey patching doesn't scale with line count? Sort of.

If there's a downside to the Zope3 approach, it's that ZCF gives you a shadow object model alongside Python inheritence, and that can be confusing. ZCML is also noisy, but Grok seems destined to make that go away - vaguely similar to Spring XML wiring versus Guice's in-code approach.

Read: Rope

Topic: Why tech predictions are stupid (and a small prediction) Previous Topic   Next Topic Topic: F1 2008 Season to start this weekend

Sponsored Links



Google
  Web Artima.com   

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