Re: [Zope] Core Session Tracking kudos & namespaces

2001-01-04 Thread Bob Sidebotham

--- Chris McDonough <[EMAIL PROTECTED]> wrote:
> I sympathize with the need to convert all your scripts over to use
> sessioning from hidden form-field encoding and the like... I'd really
> appreciate some input as to what kinds of problems you're trying to
> solve with sessioning.

I don't have any great number of scripts to convert. I've only been
looking at zope for a few weeks. I DO have a significant application
that handles a customer database, supplier ordering, inventory
management and the like. This is currently written in Perl/cgi, and is
way too slow and cumbersome. I'd like to move it into zope and at the
same time make the database directly available to customers. In the
current implementation of the application I maintain a lot of state at
the server side--the server knows the page history, locally configured
options, and the like. In that application I actually force you to use
server-side navigation, since I load over the existing page every time
you make a request (so there is only one page ever resident in the
browser). I did this to make it impossible for the operator to use an
old browser page (with stale form info). This is ugly and requires two
round-trips for each request.

I'm trying to figure out how to move this into zope, and to do this in
the most natural way possible. So I'd like to give up mostly on the
server-side navigation stuff. But I do want to do things like: if you
go from a main page to a form, then if the form succeeds I'd like to
return you directly to the main page (with no extra page fetch). If the
form fails, it might go back to the main page, or include the error
somewhere in the main page. Since the form is likely to be unrelated to
the main page (just linked to from it), I need at least some server
state to tell me where to return. I can also imagine doing side trips
from forms--but that's harder, because then the side trip can't involve
a link, otherwise you lose the information typed in (I "solved" this in
my current implementation by wrapping *every* page in one big form and
making all the links actually do submits, using a little javascript,
but again that's something I'd rather avoid--I'd rather it was simple
and relatively unsurprising).

I'm unclear as to how I should really implement any of this. It almost
seems like there is some sort of abstraction here that can be turned
into a generic facility, but I haven't groked zope enough to figure out
how that would be plugged in and what it would look like.

So anyway, this was supposed to be an answer to your question, but it's
really a thinly disguised attempt to get some design help on this. Is
there another forum purely for design help with this sort of thing? How
to fit a particular navigational abstraction into the zope framework?

Thanks,
Bob


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Core Session Tracking kudos & namespaces

2001-01-04 Thread Bob Sidebotham

--- Somebody wrote:
> > Of course, the best solution would be for the 'magic' lookup to be
> > optional...

Alright, I've not a zope master, but isn't this already provided
generically with:



All these arguments leave me a little confused: As a newbie, I read the
zope book, and it tells me all these wonderful things about feeding
alligators with ostriches, and the like, and I assume this is meant to
be universal, and just assume that all names are supposed to behave in
this manner. But Chris seems to be saying that *because you've had
flack about this model* maybe a new feature shouldn't use it. Forgive
me if I'm paraphrasing you incorrectly. So the question I have is
this--if there's a basic problem with zope's acquisition semantics (as
some posts on this list would indicate at least some people believe),
then is the right fix for new features to avoid acquisition, or would
it be better to figure out what is good and what is bad and bite the
bullet and get rid of the bad?

Chris keeps saying that it would be hard to explain the semantics. But
if zope is worth learning, shouldn't these semantics be explainable
totally generically? Why should they have to be separately documented
just for session variables? What is really special about session
variables (other than that they can be written to)?

As an aside, how did zope even get this far without session variables?
I'm very confused...

And finally, *even* if the session variables are kept in a private
space, I'd at least like some way to make them public using some
generic pre-processing. But I don't see how to do that, because if I
stick a dtml-with, for instance, into generic header code (included,
for example, by standard-html-header, then this with statement is
required to be *closed* when I edit it). That is, I think the
 has to be paired, in the header, with a . What
Zen am I missing here? How do you guys do this sort of thing?

No doubt most of the above is due to newbie confusion, not due to
design issues in zope...

Bob


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Core Session Tracking kudos & namespaces

2001-01-02 Thread Bob Sidebotham

And as I've just figured out by trying to convert some stuff to
sessions, a not unconsequential result of allowing session variables to
be acquired (if only for read purposes), is that existing code is
easier to adapt. I might now call a script without burying form
variables or parameters in the URL. If I use implicit acquisition
(where the posted form data and URL data is read FIRST), then I can
gracefully upgrade these scripts without changing anything. With the
current scheme I have to go and search out all occurences of variables
like "customer_id" and change them to session syntax.

So I guess I'm arguing that the read case and write cases are
fundamentally different, that you basically want to support the
introduction of session variables into the namespace for read purposes
through acquisition, and it's (marginally) OK if read/write don't share
the same syntax.

Bob

Bob Sidebotham wrote:
> The advantage of the last form (below), is that you can use
> acquisition, and don't need to know whether the variable came from
the
> session or from elsewhere. If you *really* want it to come from the
> session only, you can always add the "only" tag to the dtml-with call.

__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Core Session Tracking kudos & namespaces

2001-01-02 Thread Bob Sidebotham

The advantage of the last form (below), is that you can use
acquisition, and don't need to know whether the variable came from the
session or from elsewhere. If you *really* want it to come from the
session only, you can always add the "only" tag to the dtml-with call.

In conjunction with this, it might be nice to have a special call that
sets the variable, if defined by acquisition, in the session. Something
like  would set "a"
to the acquired value for "a", leave it undefined if not defined, and
not change it if it was not acquirable elsewhere (the acquired value
would take precedence over the session value).

Even better would be if I could just say .

Bob

--- Chris McDonough <[EMAIL PROTECTED]> wrote:

> A potential rhythm, however, might look like:
> 
>   
> 
>   
> 
>   
> 
>and
> 
>   
> 
>   
> 
>   
> 
> I sorta like it the original way now that I've written that down. 
> :-)  It's
> easier to explain, AFAICS.
> 
> 


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Core Session Tracking kudos & namespaces

2001-01-02 Thread Bob Sidebotham

1. The Core Session Tracking looks like it will be really helpful. I AM
BLOWN AWAY BY THE QUALITY OF THE DOCUMENTATION. Congratulations for
making really readable, easy to use installation and use instructions.
Part of the reason I'm so blown away, of course, is that the quality of
this documentation is so very much superior to most of the existing
documentation. The author obviously put himself in the position of
someone who didn't know anything about the topic, and wrote the
documentation to satisfy this person (i.e. me). Thanks!

2. Question. The interface to the session data object, requiring
set/get calls to get key/value pairs seems a little inconsistent with
the very simple existing interfaces for other zope namespaces. As a
newbie, I admit to being very confused about namespaces in zope, and
the GOOD THING about the core session tracking is that it is very clear
that you're accessing a variable from that scope. There's no way you
can accidently acquire something else. On the other hand, the ability
to access the session variables with simple variable references seems
like it would be a win (especially if they were safely qualified by the
session object). I really just want to do something like
"SESSION.varname". Is this something that can be wrapped on top of the
existing interface?

Bob Sidebotham
[EMAIL PROTECTED]


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] browser window as canvas for configurable objects?

2001-01-02 Thread Bob Sidebotham

I'm new to zope, so maybe these questions are naive.

I have several objects that I want to display on my browser screen
simultaneously. Each object lives in its own zope directory, and I can
trivially include them in a bigger canvas using a table and dtml-with
and dtml-var. So far so good.

Each of the sub objects can put up its own links for configuration,
etc. Some of the sub objects might be pageable (e.g. have links to next
10 items, previous 10), or they might be configurable (you could go to
a screen to establish filtering parameters for that object).

What I'm looking for is the simplest possible effective way to manage
these links so that after the customization operation or the next page
oeration, or whatever is handled, the original page is displayed (and
of course any affected objects are updated). In some cases there may be
a side-excursion made before the page is re-displayed (e.g. for "next
10 items", there is no side excursion), for "update filtering
parameters" or update object, a separate form will be brought up).

I should mention that the same objects may appear in the same or
different forms on different pages, i.e. there isn't just one main
page.

Some alternatives I can see are:

1. Use javascript, and do a history.go(-1) or -2, as the case may be to
go back to the original page. Disadvantage: requires an extra
round-trip, probably would have to make sure page wasn't cached, may
break user's model of how navigation works (if he made a mistake in the
configuration, he'd have to go forward, rather than backward, to
retrieve the configuration form, for example).

2. Use a pop-up window. Redraw the original when done. Advantage: by
labelling the main window "main" or whatever, it's easy for unrelated
objects to "return" to the main application by (1) causing "main" to
reload and (2) deleting their own window.

3. Use frames. Seems overly complex. But maybe this is just a general
aversion to hacking to much html.

4. Use existing zope infrastructure to finesse this. I'm not sure how
to do this--my main confusion centers around how much state to I have
to preserve (and where?) to re-create exactly the same request that I
had at a previous level--in a totally generic fashion.

5. Build some sort of Product that represents this model directly. This
seems the most promising, if not the easiest. Can someone point me to
any prior art on this, or offer any suggestions?

It seems to me that since zope is supposed to be about "object
publishing", then this application should (ideally) be dead-easy. But
at the moment I'm scratching my head.

Any help would be greatly appreciated.

Thanks!

P.S. Does anyone else think this facility would be useful?

Bob Sidebotham
[EMAIL PROTECTED]


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] The meaning of Zope

2000-12-23 Thread Bob Sidebotham

>From http://www.kabalarians.com/male/zope.htm

Zope

Your first name of Zope has given you an expressive, diplomatic, and
refined nature. Although you have a good appreciation of material
values, business ability, and skill in organizing and managing others,
your success is restricted by a lack of self-confidence and initiative.
You have very expensive tastes, and your desires could well exceed your
initiative in providing for them through your own efforts. Personal
appearance is important to you. You are always well-groomed yourself,
and you judge others by your own standard. You do not like to rough it
or use much physical energy. Through your diplomatic ways you are able
to call on the assistance of others to avoid such matters. You have
good business judgment but lack the confidence to carry out your own
ideas unless assisted by an associate. From a desire to eat too many
rich foods, your health could suffer through kidney and generative
troubles or any problems affecting the fluid functions of the body.

Bob Sidebotham
[EMAIL PROTECTED]



__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problems with adding tutorial

2000-12-13 Thread Bob Sidebotham

After much playing around I determined that the problem was Python 2.0.
I downgraded zope to 2.2.4 and still had the identical problem with
python 2.0. Then when I downgraded python to 1.5.2 the problem finally
went away.

Bob

--- Aleksander Salwa <[EMAIL PROTECTED]> wrote:

> Keep in mind that the latest STABLE version is Zope 2.2.4.
> Officially supported (by Zope) release of Python is still 1.5.2.


__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Problems with adding tutorial

2000-12-13 Thread Bob Sidebotham

(I submitted this as a bug report, and then I later discovered this
list. So perhaps it's overkill to send this here, too. Normally I would
have sent it here first, then filed a bug report if it was obvious that
it was a new bug. So I apologize for the redundancy).

When I click "ADD" to add a zope tutorial, I get a dialog box from my
browser that says "unable to locate server localhost:8080". If I click
anything else, then the server seems to restart (I'm running with z2.py
-D). I don't get any error messages, other than the server restart
messages. If I do two ADD's in a row (i.e. attempt to add the tutorial
a second time), then the server terminates after restarting once.

I did see the messages regarding creating a non-admin user and
authenticating as that user (by first terminating the zope process). I
did all that.

Any ideas? I'm a complete newbie, so it'd be helpful to be able to run
through the tutorial.

Please note that I'm using the latest zope tarball:

  Linux Mandrake 6.0, zope2.3.0a1, Python 2.0, Communicator 4.6.

Thanks,
Bob Sidebotham

[EMAIL PROTECTED]




__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

___
Zope maillist  -  [EMAIL PROTECTED]
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 )