commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: jakarta-commons-sandbox/chain WHITEBOARD.html
Date Wed, 17 Sep 2003 15:02:57 GMT
husted      2003/09/17 08:02:57

  Added:       chain    WHITEBOARD.html
  Add whiteboard page with Agility entry.
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/chain/WHITEBOARD.html
  Index: WHITEBOARD.html
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  <html xmlns="">
    <meta name="generator" content=
    "HTML Tidy for Windows (vers 1st July 2003), see" />
    <title>Whiteboard notes for Chain of Responsibility
  <body bgcolor="white">
    <div align="center">
      <h1>Whiteboard notes for <em>Chain of Responsibility</em>
    <p>Agility is a working project name for a business-layer
    framework based on the Commons Chain package.</p>
    <p>The core idea behind Agility that is as much work as possible
    should be pushed up to the business layer. Input and output is
    encapsulated with a Context object that is passed to and from
    Agility using a ProtocolAdaptor. Depending on its implementation,
    a ProtocolAdaptor may collect input and deliver output directly
    from the native platform or from a presentation framework.</p>
    <p>Agility is a Request/Response framework: for each request
    there is a response. The request is encapsulated in a Context
    object, which includes a Command identifier. Each request must
    correspond to a Command, which may also be a Chain of Commands.
    Commands may nest or chain other Commands as needed. The request
    Command is referred to as the "Action".</p>
    <p>When a request comes in from the presentation layer (or a
    presentation framework), it is received by a ProtocolAdaptor. The
    ProtocolAdaptor extracts the Action Command name from the native
    request and consults with a ContextFactory to generate a Context
    for the request. The request Context is then passed to the
    RequestProcessor for the given protocol.</p>
    <p>The RequestProcessor is a Command Chain which includes (at a
    minimum) an Action Command. Each protocol can have its own
    RequestProcessor, which may be a combination of protocol-specific
    and generic commands. The Action Command (or Chain) is the core
    unit of work for the request.</p>
    <p>The Action Command may consult business rules and the
    persistence layer to complete the unit of work. Any output or
    messages generated by the Action may be added to the Context
    under predetermined keys. If the Action completes normally, an
    attribute is added to the Context to signify the outcome of the
    Action. The value of the outcome attribute is arbitrary and
    defined by application implementing the framework ("success",
    "failure", "xylophone").</p>
    <p>When the RequestProcessor Chain completes, the Context is
    returned to the ProtocolAdaptor. Agility defines the
    ProtocolAdaptor interface but does not provide an implementation.
    If the ProtocolAdaptor is a simple Servlet, it may forward to a
    server page by munging the outcome value. If the ProtocolAdaptor
    is a presentation layer framework, it may pass the value to an
    internal mechanism that selects or assembles a server page, or
    generates a dynamic response. A ProtocolAdaptor might even
    utilitize its own "ResponseProcessor" to execute a series of
    Commands to assemble an approriate response.</p>

View raw message