• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Chain of Responsibility

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm pretty new to Patterns. I was wondering if there was an performance problem with this pattern? Having to iterate through every class in the chain seems like the same problem a linked List would have(Easy to implement new items, but costly for retreival)
thanks in advance
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From a strict performance perspective, indeed, iterating over a series of choices would be slower than a direct link to the corresponding object. When it comes to patterns, however, I would attack the problem from a flexibility and maintainability standpoint. If for some odd reason your implementation of the pattern becomes a bottleneck, then you can always take it out.
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the performance depends on the proportion on how many times more of the requests get handled at top level objects rather than lower level objects in the tree.

pl. read more at http://ciol.com/content/technology/sw_desg_patt/
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
i am new to the patterns , all i want to know about the chain of responsibilty patter that how it works and what is its procedure, please tell me about it procedure completly.i have a project on it , i hope your help will help me in my project.
regards
zafar afridi
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you Google around with the name of a design pattern, you'll get thousands and thousands of hits... One of them is probably this page.
 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlet chaining is the good example of Chain of responsibility pattern.
Guru
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic