View Poll Results: Is Martin Fowler's article misguiding?

Voters
15. You may not vote on this poll
  • Yes, his opinions are not backed up.

    2 13.33%
  • Yes, he has some points, but he misses some important facts.

    10 66.67%
  • No, most of it makes sense.

    3 20.00%
  • No, I love Martin Fowler's opinions inconditionally.

    0 0%
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Martin Fowler's article & big problems

  1. #1
    Join Date
    Sep 2004
    Posts
    6

    Default Martin Fowler's article & big problems

    It took me a while, but I finally read it...

    Martin Fowler's article is horrible! At the company I work the "service locator pattern" is used instead of dependency injection. Bad Bad Bad.

    As a result, when I had to reuse some classes from the main project in a smaller tool, and instead of using the 17 classes I needed, I had to import 350 classes with LOTS of bugs in it, because the service locator had dependencies to it! Completely pointless! Dep Inj decreses the coupling, service locator increases it.

    In his examples he even implies the locators SHOULD have static class links, and his "interface for locators" solution is completely unclear.

    I completely lost respect for Fowler after that one.

  2. #2
    Join Date
    Sep 2004
    Posts
    6

    Default

    Finally, he doesn't explain why "...(Dependency Injection) tends to be hard to understand and leads to problems when you are trying to debug." He just says it, no backing up whatsoever. He DOES mention that "with a Service Locator every user of a service has a dependency to the locator".

    More Dependency = More Coupling = lower software quality. Basic software metrics.

  3. #3
    Join Date
    Sep 2004
    Location
    Christchurch, New Zealand
    Posts
    73

    Default

    Please post the link to the article you are refering to.

    thanks,
    Chris

  4. #4

    Default

    I assume he's refering to this article: http://martinfowler.com/articles/injection.html

  5. #5
    Join Date
    Sep 2004
    Posts
    6

    Default

    Quote Originally Posted by gpoirier
    I assume he's refering to this article: http://martinfowler.com/articles/injection.html
    Exactly, sorry for missing such an important fact too!

  6. #6
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    I have a lot of respect for Martin, but I agree with some of these criticisms of that article. In my experience, there are huge problems with service location in large applications. That article is far from the best material on this topic. I described the value proposition of DI (before the label, of course) in much more detail in Expert One-on-One J2EE Design and Development over a year earlier.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  7. #7
    Join Date
    Jul 2006
    Posts
    1

    Default

    Quote Originally Posted by Rod Johnson
    That article is far from the best material on this topic.
    I'm a fan of Dependency Injection, but I'm always interested in good discussions of other points of view -- did you have a specific source in mind as better or better still, the best?

  8. #8
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Well I've written two books that cover it, which both go into more detail... Expert J2EE Design and Development and J2EE without EJB.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  9. #9

    Default

    No, you are already rich owning Interface21, I am not making you more rich.

  10. #10
    Join Date
    Dec 2005
    Location
    U-241
    Posts
    237

    Default

    Quote Originally Posted by tatvamasi
    No, you are already rich owning Interface21, I am not making you more rich.
    Get his books and read them. You'll make richer yourself intellectually.
    I have those two (love them) and 'Professional Java Development with Spring'.

    Hey, Rod, anything in works? Looking forward to your next treatise.
    Gonna have it!!!
    Spring, it's a wonderful thing...

Similar Threads

  1. Spring IDE problems with Eclipse 3.1
    By biguniverse in forum SpringSource Tool Suite
    Replies: 5
    Last Post: Aug 20th, 2005, 06:01 AM
  2. MVC step-by-step problems
    By joegaber in forum Web
    Replies: 2
    Last Post: Jul 25th, 2005, 10:16 AM
  3. dependency problems?
    By asaf.lahav in forum Data
    Replies: 3
    Last Post: Jul 21st, 2005, 03:36 PM
  4. Replies: 1
    Last Post: Jun 7th, 2005, 11:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •