[Zope3-Users] beginning orientation

Martin Blais martin.blais at gmail.com
Thu Dec 16 16:27:13 EST 2004


thanks to all of those who answered my queries.

i think that thru my recent exploration of z3 i had a breakthrough in
understanding web applications in general.  i had too much of a "cgi"
view on this.    i took some notes and wrote a little document with
some synthesized ideas:

http://furius.ca/webdev/doc/webapps.html

comments greatly appreciated.  these notes will probably appear a bit
generic and simple.  while now that i read my notes it seems trivial,
i know of many colleagues (strong people at that) who are having the
same mental difficulty piercing thru an understanding of web app
frameworks like zope, because we're not familiar with the usual
browser-server interactions.

i really think that zope documentation would benefit a great deal in
drawing analogies with common desktop applications and the zope
framework.  a lot more people with a desktop app programming
background might be interested in using it  if they could cut thru
some of the ways that web app frameworks are doing things, bridge the
gap.  specifically, a chapter that addresses the following items would
have helped *a lot*:

- explaining the differences in the interaction that occurs between
the client and the server (possibly including the mechanisms of
GET/POST even though it is a bit basic);

- explaining how exactly the display of forms is tied to calling of
methods on the server, what sequence it occurs in;

- making more of a separation between the views (html forms), its
input data, the handling code, and the data that is stored in the
database.


additionally there are items that i still do not understand clearly:

- if there is a separation between handling code and rendering code,
how does handling code pass information specific to that handling to
the rendering code that gets returned after handling a request?

- how can i implement an input form (a view, i guess) without tying it
to a data type in the database?  say, just some input form, calling a
method and then i do whatever with the input data (maybe even dropping
some of it)

thanks,
cheers,





On Tue, 14 Dec 2004 15:29:38 +0100, Lennart Regebro <regebro at nuxeo.com> wrote:
> Martin Blais wrote:
> > 3. normally i'd use an SQL database or files to store data, but I
> > understand that zope includes an object database.  i suppose a trivial
> > way to think about this would be to create classes and then each
> > "database row" would correspond to an object instance stored in a
> > folder (itself corresponding to an SQL table).
> 
> No, not at all. A close analogy is a "document" database, like Lotus
> Notes, where there are no tables at all, just a database with rows,
> where each row can have completely different datastructure from the
> other rows.
> 
> So, there is no hierarchy in the database istelf, just a bunch of
> objects. HOWEVER, some of this objects contain other objects, and that
> way you get a hierarchy of objects.
> 
> So, it can be viewed as a hierarchical document database, before you get
> come to grips with object orientation of it.
> 
> > will this allow me to run offline processes accessing the data as I
> > would an SQL database, say iterating over the object instances and
> > then modifying some data in these objects?
> 
> Yes.
> 
> > is this efficient comparing to a typical MySQL setup?
> 
> Typically, no.
> 
> > where can i find out more about how to go about this?
> 
> Well, you do
>    for item in the_list_of_items:
>         item.dosomething()
> 
> Very easy, really. No complex queries or anything. You just do it in
> python! Tada! :) Getting the_list_of_items can be more complex, but that
> is no generic way of doing that, because it depends on what you want.
> The most generic way is to index everything in a "catalog" and make
> queries on that.
> 
> --
> Lennart Regebro, Nuxeo     http://www.nuxeo.com/
> CPS Content Management     http://www.cps-project.org/
>


More information about the Zope3-users mailing list