[Grok-dev] Re: thoughts while writing a tutorial

J Cameron Cooper jccooper at rice.edu
Mon Aug 20 14:53:58 EDT 2007


Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kevin Teague wrote:
>>> So now I am busy writing a simple first tutorial on navigation to
>>> objects that are not persistent in the ZopeDB, but which are created
>>> on-demand when the user tries to look at them.
>>>
>>> Some questions have come up that I need guidance on.
>>>
>>>  - What should I call this sort of object?  Several names suggest
>>>    themselves, but I want to use just one main one through the
>>>    tutorial:
>>>
>>>     "On-demand objects"?
>>>     "Dynamic objects"?
>>>     "Non-persistent objects"?
>>>     "Non-ZopeDB objects"?
>>>     "Ephemeral objects"?
>>>     "Transient objects"?
>>>
>> They are called Model objects. Any object which provides methods and  
>> attributes to your Views are Model objects, regardless of whether the  
>> objects were persisted through the ZODB,  persisted in a relational  
>> database, or parsed on-demand from a text file you fetched using gopher.
>>
>> In Martijn's Grok Tutorial in the "A view for a model" section he  
>> discusses a non-ZODB Model object which has a single method returning  
>> static data. I would re-read that section of the tutorial for further  
>> guidance :)
> 
> The original question was how to distinguish ZODB-backed models from
> others created on-the-fly during traversal.  "Non-persistent model
> objects" might be most precise here.

EJBs, for what it's worth, make that distinction as "container managed" 
and "bean managed" (really "self managed") persistence. They could, 
after all, be persistent, just not through the agency of the ZODB.

           --jcc

-- 
Connexions
http://cnx.org

"Building Websites with Plone"
http://plonebook.packtpub.com



More information about the Grok-dev mailing list