Nicholas Wieland wrote:

As usual, my question is rather simple :)
I'd like to know what are the best practices for product organization - for example I have _tons_ of queries to sqlserver, and my main class is becoming less manageble every time I look at it :/ I like the way SQL integrates in Zope, what I don't like is having a giant __init__ and a lot of _sqlSomething at the end of the class. Can I associate queries to something else than a _variable ? Something like a dictionary or a class ? Can I move SQL calls outside the initializer ? I'd prefer to have a class for data access and another one to glue all the parts together, maybe I'm plain wrong but I think that my product would be a lot cleaner. What are the best practices for FS based products ?



If you're writing SQL queries attached to a Product and using them in said Product, you should look at ExtZSQL:

http://www.zope.org/Members/jccooper/extzsql

It was made for precisely this problem.

       --jcc


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

Enfold Systems, LLC
http://www.enfoldsystems.com

_______________________________________________
Zope maillist  -  Zope@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 )

Reply via email to