[Zope] Question about application design

Ausum Studio ausum_studio at hotmail.com
Wed Apr 21 02:03:22 EDT 2004


Let's say you want to have access to the whole list of cities of the world
and its corresponding coordinates. If I would want that information in RAM,
I just would put in inside a Python script, inside a RAM cache manager, as a
dictionary:

# script name: 'cities_of_the_world'
cities =
{'city1':'coordinates1','city2':'coordinates2','city3':'coordinates3', ...}
return cities

If you need to call the coordinates of city1, whithin another script in the
same container:

cities = context.cities_of_the_world()
city1_coordinates = cities['city1']


Ausum




----- Original Message ----- 
From: "Robb Shecter" <robb at acm.org>
To: "Robb Shecter" <robb at acm.org>
Cc: <zope at zope.org>
Sent: Tuesday, April 20, 2004 1:39 PM
Subject: Re: [Zope] Question about application design


> >> ...The better option may be a simple
> >> python product implementing some sort of persistent object
>
> I just discovered the TransientObject.  How about I add a Transient
> Object Container to the temp_folder, which will store my application
> data?  That looks like it'll work...
>
> My data set is read-only, by the way.
>
> I also just discovered how easy it is to get access to the SESSION
> transient object from a python script, and how you can easily use that.
> Very nice.
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>



More information about the Zope mailing list