Hey guys,

Is it horrible to use global variables?  I am currently executing a
query at the beginning of my handler and storing the query result
within class object A.  I subsequently need to access the query result
within multiple different class objects, say B, C, and D.  It has been
recommended to me to cache object A in the request object, but i need
to access the variable from within various class objects, so I'm
finding that I have to pass the object A in to the constructor for
every new object i define, and then sync any changed state of object A
with the handler's version of object A when the various class object
functions are completed.

So it really seems like the simplest way to do things is to just
define a global variable.  Is there a better option?  Can I think I
would ideally want to create something liek a session object to store
the global object.

Thanks!
Bill

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to