You are not logged in Log in Join
You are here: Home » Members » k_vertigo » Design » smartobjects » model-benefits.html » View File

Log in
Name

Password

 

model-benefits.html

File details
Size
5 K
File type
text/html

File contents

<html>
<head>
<title>Virtual SmartObjects</title>
</head>
<body bgcolor="#FFFFFF">
<h1>Virtual SmartObjects</h1>
<h2>  Vision</h2>
<p>    Zope's oo programming model is a powerful method to build web 
    applications. However Zope's  current integration with external 
    data stores breaks the oo model by treating external data stores as
    sources of raw data or primitive proxies (brains). Virtual SmartObjects
    aim to be a lightweight approach to seamless integration of external
    data sources with zope in oo manner.</p><h2>  Virtual Benefits</h2>
<ul>
<li>Nested Traversal - objects maybe nested at arbitrary levels.</li>
<li>Caching</li>
<li>Transaction Integration</li>
<li>Flexible Permissions (maybe...)</li>
<li>Acquisition</li>
<li>XPath Query Interface</li>
<li>Management </li>
<li>Custom Data Methods (w/ direct traversal)</li>
<li>Attribute Querying Interface for form generation</li>
<li>Attribute Setting Validation</li>
<li>XML Based MetaData Model</li>
<li>Always Synchronized</li>
<li>Scalability for high write ratio or large data applications  </li>
<li>or mapping</li>
</ul>
<h2>  UseCases</h2>
<ul>
<li>integration of legacy rdbms application </li>
<li>integration with ldap</li>
<li>high degree of synchronization for integration with non-zope 
      apps (possibly with high write ratios).</li>
<li>use from outside zope at pure python level (maybe.... doubtful).</li>
<li>extending persistent objects with external data attributes 
      (first as composites)</li>
</ul>
<h2>  Design </h2>
<p>     My fledgling uml skills making an overview picture <a href="#1-1">Figure 1-1</a></p><p>    <a name="1-1"></a>
<img src="classdiagram1.gif" alt="Virtual SmartObjects UML">
<p><b>Figure 1-1</b> Virtual SmartObjects UML</p>
   </p><ul>
<li>XPath</li>
<li>DataContainer</li>
<li>DataMethods</li>
<li>ModelReader</li>
<li>ModelProcessor</li>
<li>PythonGenerator</li>
<li>DdlGenerator</li>
<li>ModelContainer</li>
<li>ObjectCache</li>
<li>Model - contains the metadata regarding an objects properties as well
        as the generated class definitions.</li>
<li>TraversalAssistant </li>
<li>SmartObjectContainer</li>
<li>SmartObject</li>
</ul>
<h2>  Implementation</h2>
<h3>    General</h3>
<p>      The whole virtual smartobjects framework is based off a metadata
      model which allows for generation of classes, interrogation of 
      attributes, and or mapping.</p><p>      ModelContainers set a default model for traversal which is used 
      for traversal from the application container or from the 
      smartobject container (smartobject container creation option).</p><h3>    Caching</h3>
<p>      ObjectCaches store unwrapped objects. Cached Objects are invalidated
      both on time (configurable option) or based on object changes. object
      caches are per model. caches are also configurable by number of objects.</p><h3>    Nested Objects & Traversal </h3>
<p>      The traversal assistant attaches to pre traversal methods, upon being
      called it checks its immediate container for the requested object. if it 
      doesn't find it, it will ask the model container for the object, 
      if the object is in the default model, than no qualification is needed
      in the url.</p><p>      example url: mysite.com/notes/1112</p><p>      note that notes is a normal zodb based folder.</p><p>      if the traversal stack contains nested object references like</p><p>      example url: mysite.com/projects/12001/task/11121/projects/123</p><p>      The traversal assistant performs an attribute check insuring a valid
      traversal chain through the models and than proceeds to load up the 
      objects from the models. in doing a nested traversal lookup, </p><h3>    Transaction Integration </h3>
<p>      SmartObjects are transaction aware. They implement the full transaction
      interface including subtransactions (for subtrans capable data stores),
      upon object mutation, the smartobject registers itself for the 
      transaction. upon transaction commit, the smart object invalidates its
      cache entry, and is saved to the external data store.</p><h3>    Acquistion </h3>
<p>      Acquistion is used both as implementation aid and to integrate
      with zope's security model. smartobjects are wrapped by their 
      model before being returned.</p><h3>    Management </h3>
<p>      Management takes place both at the model level and at the smartobject
      level. permissions are defined at the model level to integrate with
      legacy applications that define their own permission model. acquisition
      is used to construct the management interface for smartobjects.</p><p>      model level management allows the definition of data source methods,
      and alteration of the models permissions and cache.   </p><h3>    Flexible Permissions</h3>
<p>      I need to research this more, i'd like to have permissions be model
      based with run time lookups, but i need to investigate the declarative
      security model more before i'm sure of the feasability.</p><h3>    Custom Data Methods</h3>
<p>      For reporting or listing situations going through the list framework.
      supports both return of raw data, or writing custom methods to a model</p><h3>    XPath</h3>
<p>      Of all the proposed query interfaces, i think xpath is probably
      the most natural to zope and the easiest to integrate into 
      the framework. xpath fits very nicely with traversal and nested objects.</p><h2>  Proposal Todo</h2>
<ul>
<li>flesh out implementations with individual uml models.</li>
<li>documentation of metamodel dtd</li>
</ul>
<h2>  Futures</h2>
<ul>
<li>global caches and per thread caches, LRU based.</li>
<li>delayed loading of collections.</li>
</ul>
<h2>  Resources</h2>
<ul>
<li>Castor http://castor.exolab.org</li>
<li>MiddleKit http://webware.sourceforge.net</li>
<li>AmbySoft Papers http://www.ambysoft.com</li>
</ul>
<h2>  Author</h2>
<p>    Kapil Thangavelu ([email protected])</p></body>
</html>