[Zope] product organization

Nicholas Wieland nicholas_wieland at yahoo.it
Wed Jul 27 07:54:51 EDT 2005


Well, not exactly - just a way to separate access to data from everything else in the product.
Maybe a separate class that needs the connection as argument and that just returns the data I need in appropriate data structures by calling class methods.
 
class DataModel (object):
 
  def __init__ (self, conn):
    self.conn = conn
    self.sqlFetchSomething = SQL (.....)
 
  def fetchSomething (self):
    return self.sqlFetchSomething
 
This is really simple, but I think it gives the idea.
Obviously I'd like to perform various operation at the data level, for example return a list of lists for reportlab tables and so on.
 
TIA,
  ngw


		
---------------------------------
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20050727/f54ed6fe/attachment.htm


More information about the Zope mailing list