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="[EMAIL PROTECTED]">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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]