You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/07/04 21:40:53 UTC

cvs commit: jakarta-turbine/xdocs/proposals bo-managers.xml

jvanzyl     01/07/04 12:40:53

  Added:       xdocs/proposals bo-managers.xml
  Log:
  - adding proposal for BO Managers in torque by Leandro
  
  Revision  Changes    Path
  1.1                  jakarta-turbine/xdocs/proposals/bo-managers.xml
  
  Index: bo-managers.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
    <properties>
      <title>Business Object Managers</title>
      <author email="leandro@ibnetwork.com.br">Leandro Rodrigo Saad Cruz</author>
    </properties>
  
  <body>
  
  <section name="Description">
    <p>
      As it is today, torque is able to generate source files from xml schemas that 
      represent BO's of your project. Torque would be extended to generate one Manager, 
      implemented as a service, per BO. This manager would deal with
      inclusions, exclusions,updates,transactions,thread isolation, cache management, etc.
    </p>
  </section>
  
  <section name="Rationale">
    <p>
      <li>
        BO's should shrink to be application independent and improve code reuse instead 
        of agregate other functions like it does today.<br> To aliviate the BO's of 
        the its actual functions , a service dedicated to all BO's of the same type 
        would have to be created and deal with inclusions, exclusions, associations, etc.<br>
      </li>
      <li>
        Aditional advantages of having a Manager per BO would be : transaction
        control, thread isolation and cache managment.<br>
        - transations would occur in Manager level and update all related caches.<br>
        - the manager should be responsible to limit access to it's internal data 
          structures and BO's
        - the manager should have a pluggable cache (LRU for example). Compare this to all 
          small caches that torque uses. 
      </li>
    </p>
  </section>
  
  <section name="Requirements">
    <p>
      Torque has to be modified to generate code using other templates. For example : om/Control.vm has to be patched to add the following lines :<br>
      <blockquote>
      + #set ( $fname = "${basePrefix}${firstcap}Manager.java" )<br>
      + #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )<br>
      + $generator.parse("manager/BaseManager.vm",$path,"table",$tbl)<br>
      </blockquote>
      <br>
      # This should follow the same code generation policy and create : Base___Manager.java and ___Manager.java ( empty )<br>
      # All BO's will be modified, but all functionality will be preserved to avoid breaking existing code.<br>
      # aditional code could be generated ( Facades, Tools ,Screens and Actions )
      
    </p>
  </section>
  
  
  <section name="Scope">
  <p>
  </p>
  </section>
  
  <section name="Initial Source">
  <p>
  </p>
  </section>
  
  <section name="Initial Committers">
  <p>
      ??? - I don't commit
  </p>
  </section>
  
  </body>
  </document>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine/xdocs/proposals bo-managers.xml

Posted by Leandro Saad <le...@ibnetwork.com.br>.
jvanzyl@apache.org wrote:
> 
> jvanzyl     01/07/04 12:40:53
> 
>   Added:       xdocs/proposals bo-managers.xml
>   Log:
>   - adding proposal for BO Managers in torque by Leandro

I have two options to implement the relations described in
project-schema.xml

stair-like message diagrams : 
         ______          ______          ______          ______
	|ACTION|	|__M1__|	|__M2__|	|__M3__|
    ------->|               |               |               |
            |-------------->|               |               |
            |               |-------------->|               |
            |               |               |-------------->|
    <-------|---------------|---------------|---------------|

 One Manager delegates the responsibility to the next manager to
accomplish the result


fork-like message diagrams

         ______          ______          ______          ______
	|ACTION|	|__M1__|	|__M2__|	|__M3__|
   ------->|               |               |                |
           |-------------->|               |                |
           |---------------|-------------->|                |
           |---------------|---------------|--------------->|
    <------|---------------|---------------|----------------|

 There is a control object that orchestrates the messages that need to
be sent in order to accomplish the result

I prefer the second option, since it simplifies mantainance, code reuse
and error recovery.
Does anyone has any opinions about this ???

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org