Women in Technology

Hear us Roar



Article:
  A Look at Commons Chain, Part 1
Subject:   Playing to Weakness
Date:   2005-03-03 11:25:49
From:   BillSiggelkow
Response to: Playing to Weakness

IMO the Template Method and Strategy pattern solve different problems. Template method defines the steps of an algorithm; Strategy turns an algorithm defined in a method into a class. The Struts RequestProcessor is, in fact, an implementation of the Strategy pattern -- it defines the strategy for request processing used by the Struts ActionServlet. To me, Chain addresses the issue of coupling quite nicely. Regarding the Struts community, I have found them this group to be intelligent, friendly and open.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Playing to Weakness
    2005-06-01 03:34:34  isto.nikula [View]

    There is also a middle way approach: using template method and strategy together. Instead of using inheritance and calls to abstract methods in the template method, the method implementations could be provided via a strategy (interface).