Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Strategy pattern


Related Topics

In the News (Mon 13 Feb 12)

  
  Strategy pattern - Wikipedia, the free encyclopedia
In computer programming, the strategy pattern is a particular software design pattern, whereby algorithms can be selected on-the-fly at runtime depending on conditions, like strategies in a war situation.
The strategy pattern is useful for situations where it is necessary to dynamically swap the algorithms used in an application.
The strategy pattern is intended to provide a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable.
en.wikipedia.org /wiki/Strategy_pattern   (113 words)

  
 GoF Design Pattern::Behavioral::Strategy   (Site not responding. Last check: 2007-11-05)
Strategy pattern is commonly used to encapsulate a family of related-algorithms and allows client that uses it to interchange the algorithms independently and dynamically in run-time.
The idea behind the Strategy pattern is to encapsulate the behavioral variations in separate classes.
From the face of it, both the Strategy and the State pattern uses object to encapsulate variation of behavior, however, they are indeed very different.
pages.cpsc.ucalgary.ca /~chi/SENG/609_04/StrategySummary.html   (502 words)

  
 CodeGuru: Applying Strategy Pattern in C++ Applications   (Site not responding. Last check: 2007-11-05)
Strategy Pattern is also used in the implementation of the Layout Manager in Java.
Strategy Pattern is also used in many popular sorting algorithms, graph layout algorithms and memory allocation algorithms.
Strategy is mainly concerned in encapsulating algorithms, whereas Bridge decouples the abstraction from the implementation, to provide different implementation for the same abstraction.
www.codeguru.com /Cpp/Cpp/cpp_mfc/patterns/article.php/c845   (2725 words)

  
 Strategy
Configure the original application with an instance of the Strategy hierarchy, and delegate to that "contained" object whenever the "algorithm" is required.
The distinction is in intent: Strategy is a "behavioral" pattern (the focus is on delegating responsibilities), Bridge is a "structural" pattern (the focus is on establishing relationships).
The Strategy pattern should only be used when the variation in behavior is relevant to clients.
home.earthlink.net /~huston2/dp/strategy.html   (470 words)

  
 Strategy Is...A Lot of Things
As pattern, strategy is the "rhyme and reason" that emerges in the course of making the endless decisions that reconcile the reality we encounter with the aims we hold dear.
Strategy is a general plan of attack, an approach to a problem, the first step in linking the means or resources at our disposal with the ends or results we hold in view.
A series of events in which an otherwise sound strategy is botched during execution can result in a series of shifts to increasingly inadequate strategies, leading to a downward spiral in the level of the organization’s performance.
home.att.net /~nickols/strategy_is.htm   (1091 words)

  
 Strategy: Definitions and Meaning
Strategy is a term that comes from the Greek strategia, meaning "generalship." In the military, strategy often refers to maneuvering troops into position before the enemy is actually engaged.
Strategy is the bridge between policy or high-order goals on the one hand and tactics or concrete actions on the other.
Strategy is at once the course we chart, the journey we imagine and, at the same time, it is the course we steer, the trip we actually make.
home.att.net /~nickols/strategy_definition.htm   (2838 words)

  
 Kids.net.au - Encyclopedia Design pattern (computer science) -
Design patterns are lessons that have been accumulated in the community of computer programming.
A design pattern is an abstraction of the best solutions for a particular class of problems.
It is important that patterns accompany a name because it makes possible to describe problems, solutions and talk about them with other folks.
www.kids.net.au /encyclopedia-wiki/de/Design_pattern_(computer_science)   (403 words)

  
 java.net: Principles, Patterns, and Practices: The Strategy, Template Method, and Bridge Patterns
is the strategy interface, and the anonymous inner class within the unit test acts as one of the implemented strategies.
Strategy is preferable to Template Method when the lower-level algorithm needs to change at run time.
This problem is common enough that the combined use of Strategy and Template Method to solve it (as we did in the previous example) is a pattern in and of itself, called Bridge.
today.java.net /pub/a/today/2004/10/29/patterns.html   (1475 words)

  
 Subject-oriented programming and the strategy pattern
In cases in which the strategy's interface depends on the type of node being processed, the strategy pattern becomes somewhat like the visitor pattern because the cue for selection of the interface becomes the differences in the operators' names or signatures.
The fundamental problem for which the strategy pattern is used has two elements: the class of the node on which the behavior depends and the class of the node in which the (extended) operation is defined.
The Strategy pattern creates two redundant elements: the strategy object which must be created and accessed by the node, and the access path by which a node finds the strategy object.
www.research.ibm.com /sop/sopcstrp.htm   (1186 words)

  
 Thomas Chau's Web Site > Course Works   (Site not responding. Last check: 2007-11-05)
The intent of the Strategy pattern, also known as the Policy pattern, is to encapsulate each algorithm in a family of algorithms so that the use of a specific algorithm can be dynamically changed without the clients being aware of it.
This pattern can be used for configuring a component with one of many possible behaviours.
Drawbacks related to this pattern is that tight coupling between clients and specific strategies.
sern.ucalgary.ca /~chauth/courses/seng60904/strategy.htm   (494 words)

  
 CodeGuru: Applying Strategy Pattern in C++ Applications
In the Push method, the Context pushes the data to the Strategy object and the Strategy uses the data to implement the algorithm.
The Context must supply the relevant data to the Strategy for implementing the algorithm and sometimes, all the data passed by the Context may not be relevant to all the Concrete Strategies.
Often, the Strategy Pattern is confused with the Bridge Pattern.
www.codeguru.com /cpp_mfc/strategy.shtml   (2756 words)

  
 Simon Dyck Seng 609.04 Strategy Pattern Summary   (Site not responding. Last check: 2007-11-05)
The GoF text says that the client will need to know how Strategies differ before it can choose amongst them.  This knowledge will expose them to implementation details that may not be relevant to their own purpose.  This implies that the pattern should only be used when these differences are relevant to the client.
Some patterns are related by different design elements.  Strategy shares elements of the "handle/body" idiom with Bridge and State.  The handle/body idiom separates the class defining a component's abstract interface (the handle class) from its hidden implementation (the body class).
Use Strategies as template arguments to support different kinds of memory allocation strategies.  The strategy is passed as a template argument when a collection class is instantiated.
sern.ucalgary.ca /~sdyck/courses/seng609.04/strategy.html   (3361 words)

  
 Null Object Design Pattern
I feel this is an important pattern which was omitted and that it has not been adequately described in the past.
However, the Strategy pattern requires the ball to have objects which implement the strategy interfaces.
The key to the Null Object pattern is an abstract class that defines the interface for all objects of this type.
www.cs.oberlin.edu /~jwalker/nullObjPattern   (1938 words)

  
 Strategy Pattern
Strategies often have internal variables that record the state of the algorithm.
In strategy the only difference I could notice was that the composite or object structure composes a strategy object and calls Algorithm.
State is a specialization of the Strategy where behaviour is based on the state of the object.
c2.com /cgi/wiki?StrategyPattern   (586 words)

  
 SENG 609.04
Strategy pattern avoid these problems by defining classes that encapsulate different algorithms.
Strategy pattern is used by ET++ and InterViews to encapsulate different line-breaking algorithm.
Another benefit is that strategies allows the strategy to be pay as you needed basis, unlike the switch/case where every switch/case target is hard-coded into the switch/case.
www.ucalgary.ca /~samulee/seng60904/strategy.html   (368 words)

  
 Clan MacGaming - A Gamer's Primer on Fundamental Strategy: Pattern Recognition   (Site not responding. Last check: 2007-11-05)
Pattern Recognition can be useful to gamer since most games tend to have elements of internal patterns.
When such patterns exist a game is often broken, though a new strategy may change the flow of the game possibly bringing back operational balance between the opposing sides.
This deception does require that your opponent be alert enough to spot a pattern you want him to see and his proceeding to counter it, while you're real plan is to surprise him with a battle he didn't expect.
www.clanmacgaming.com /articles.php?read=46   (1117 words)

  
 Design Pattern Summary: Strategy   (Site not responding. Last check: 2007-11-05)
The Strategy pattern facilitates the application of a family of algorithms and enabling interchangeability among themselves.
To further add to the benefits of this pattern would be to implement the concrete strategies as stateless objects.
Scalability in that when the strategies are implemented as stateless objects this makes the classes more light weighted and resource consumption is not as sensitive to increase in class instances.
pages.cpsc.ucalgary.ca /~phong/courses/SENG609.04/Strategy.htm   (414 words)

  
 Bambooweb: Strategic management
Strategy formation and implementation is an on-going, never-ending, integrated process requiring continuous reassessment and reformation.
In his classic Corporate strategy (1965) he developed the "gap analysis" still used today in which we must understand the gap between where we are currently and where we would like to be, then develop what he called "gap reducing actions".
The “Strategy of the Dolphin” was developed in the mid 1990s to give guidance as to when to use aggressive strategies and when to use passive strategies.
www.bambooweb.com /articles/s/t/Strategic_management.html   (8100 words)

  
 The Strategy Design Pattern
The Strategy Design Pattern basically consists of decoupling an algorithm from its host, and encapsulating the algorithm into a separate class.
When you have several objects that are basically the same, and differ only in their behaviour, it is a good idea to make use of the Strategy Pattern..
With Strategies, however, all you need to do is switch the object's strategy, and it will immediately change how it behaves.
www.exciton.cs.rice.edu /JavaResources/DesignPatterns/StrategyPattern.htm   (305 words)

  
 The Strategy pattern   Java
The Strategy design pattern encapsulates a family of algorithms, or strategies, by implementing each algorithm in a different class.
The Composite pattern dictates that containers are components, typically with an abstract class that represents both.
The Decorator pattern is accomplished by enclosing an object in another object.
www2.hawaii.edu /~akajiyam/ics665/jdk_patterns.htm   (476 words)

  
 JavaRanch Big Moose Saloon: Discussing Design Patterns -- Strategy Pattern   (Site not responding. Last check: 2007-11-05)
The specific behavior of the class is taken care by the Class(subtype) itself since it is an Expert to handle that behavior.The case statements in the client would be reduced since the behavior is encapsulated in the object.
Strategies provide a way to configure a class with one of many behaviors.
I see Strategy pattern as a right candidate only when there are many variations of a complex algorithm which can't be put inside a Switch block.
saloon.javaranch.com /cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=9&t=000454   (952 words)

  
 Java Forums - DP101: Swiss navy knife is an example of Strategy pattern
Swiss navy knife is an example of Strategy pattern in the sense the knife handle is the context class whereas the blade is the Strategy interface and different shapes of the blade are concrete strategy classes.
I would be like a hybrid car, that switches from the electric to gas strategy based on the driving conditions.
I wouldn't use a Swiss navy knife as a pattern, because it's obviously a fake.
forum.java.sun.com /thread.jspa?threadID=578205&tstart=0   (462 words)

  
 java.net: Using the Strategy Design Pattern for Sorting POJOs   (Site not responding. Last check: 2007-11-05)
When you have several objects that are basically the same and differ only in their behavior, it is a good idea to make use of the Strategy pattern.
The strategy should be applied to the collection as it is in the sort method.
This would solve the problem of having different sorting strategies in a group of Ducks, of course then ALL Ducks would have the same sorting strategy so you would have to be careful not to try and sort two different groups of Ducks using different strategies.
today.java.net /pub/a/today/2005/04/07/pojostrategy.html   (2743 words)

  
 (ootips) Strategy Pattern vs. Case Statement
The code of the strategy's containing class doesn't have to be changed when a new strategy is added.
Each strategy can have local variables and remember calls across time.
Using switch/case means you have to edit and bloat the code.
ootips.org /strategy-vs-case.html   (532 words)

  
 Strategy Pattern for Composing Reliable Distributed Protocols - Garbinato, Felber, Guerraoui (ResearchIndex)   (Site not responding. Last check: 2007-11-05)
Strategy Pattern for Composing Reliable Distributed Protocols (1996)
In this context, protocol compositions is a central concept, because it allows to reuse robust protocol implementations.
In this paper, we describe how the Strategy pattern has been recursively used to support protocol composition in the Bast framework.
citeseer.ist.psu.edu /garbinato96strategy.html   (588 words)

  
 Nikki Staretz -- Strategy Design Pattern
Strategy lets the algorithms vary independently from clients that use it.
Strategy offers a better way of managing your code than to rely on a parameter and a switch statement.
The AWT Component instances act as strategy contexts allowing you to set the desired strategy implementation via the setLayout method.
www.cs.uofs.edu /~bi/2003f-html/se516/strategy.htm   (381 words)

  
 CS635: Doc 10, Strategy and Null Object
Doc 10, Strategy and Null Object Slide # 2
Finding a pattern in text is a common operation
Can be used if Strategy can be selected at compile-time and does not change at runtime
www.eli.sdsu.edu /courses/spring98/cs635/notes/strategy/strategy.html   (897 words)

  
 Knowing and Doing: April 2005 Archives
Owen Astrachan uses a great strategy for driving classroom interaction that has a side effect of holding students accountable for the time they spend in class on exercises.
Strategies like Owen's may be the best we can do in computer science, so we need to share them when we have them.
This sounds like a patterns catalog, and the headings and photo illustrations that lead its sections sound a lot like the iconic photos that Alexander uses to evoke his patterns.
www.cs.uni.edu /~wallingf/blog/archives/monthly/2005-04.html   (7913 words)

  
 Recursive Use of the Strategy Pattern   (Site not responding. Last check: 2007-11-05)
Next: Extending the BAST Framework Up: Strategy Pattern in BAST Previous: Overview of the Protocol.
The recursive use of the Strategy pattern is illustrated in Figure 4.
Each strategy class pictured in Figure 4 is managed by the corresponding context class in the protocol class hierarchy presented in Figure 1 (b).
www.usenix.com /publications/library/proceedings/coots97/full_papers/garbinato/garbinato_html/node14.html   (180 words)

  
 Strategy pattern   (Site not responding. Last check: 2007-11-05)
The strategy pattern is a particular software design pattern.
All is still licensed under the GNU FDL.
With these it was thought As the common people expressed themselves, the net was not spread on in a still more wretched quibble, transposed two letters of the word.
www.termsdefined.net /st/strategy-pattern.html   (263 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.