Keeping track of the state in python objects
Hello everyone! Being new to Zope and Python I have a few worries, unfounded or not only you can tell! Given a resultset from a db-query I would like to make python objects of the resultset, then through -Zope manipulate the objects and send them back to the database. My worry is that the objects lose themselves going through the layers Python -> Tal -> Html, then having to reconstruct the objects before putting them back in the database. What I want to do is make stable classes with given class methods as done when programming in c++ or Java. I realize that part of my ignorance is due to the fact that I know next to nothing about Python and how it interacts with Zope and HTML. So I am hoping that you can answer my questions before I invest serious time in the project. \Peter --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.370 / Virus Database: 205 - Release Date: 05-06-2002
altho I too am new, what I did was use ZSQl methods and ZClasses. Look in the ZSQL Method docs for exact info as to how to do this. As to how to write a ZClass there are lots of howtos on the zope site. http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.html although I think the Zope book has more recent guide. hth AM Oliver Marx wrote:
Hello everyone!
Being new to Zope and Python I have a few worries, unfounded or not only you can tell! Given a resultset from a db-query I would like to make python objects of the resultset, then through -Zope manipulate the objects and send them back to the database. My worry is that the objects lose themselves going through the layers Python -> Tal -> Html, then having to reconstruct the objects before putting them back in the database. What I want to do is make stable classes with given class methods as done when programming in c++ or Java. I realize that part of my ignorance is due to the fact that I know next to nothing about Python and how it interacts with Zope and HTML. So I am hoping that you can answer my questions before I invest serious time in the project.
\Peter --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.370 / Virus Database: 205 - Release Date: 05-06-2002
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
Oliver Marx writes:
Given a resultset from a db-query I would like to make python objects of the resultset, There are already...
then through -Zope manipulate the objects and send them back to the database. My worry is that the objects lose themselves going through the layers Python -> Tal -> Html, then having to reconstruct the objects before putting them back in the database. Usually, there are only passed as references until they reach HTLM.
What I want to do is make stable classes with given class methods as done when programming in c++ or Java. I realize that part of my ignorance is due to the fact that I know next to nothing about Python and how it interacts with Zope and HTML. So I am hoping that you can answer my questions before I invest serious time in the project. There are no class methods in Python 2.1.x (which is required for the current Zope).
I suggest, you look at either the Zope Book or/and <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (3)
-
Aseem Mohanty -
Dieter Maurer -
Oliver Marx