Re: [Zope-dev] TransWarp preview release (AOP tools only)

2001-03-08 Thread Phillip J. Eby

At 10:52 AM 3/6/01 -0500, Shane Hathaway wrote:
>"Phillip J. Eby" wrote:
>> 
>> There's actually a simpler way.  Aspect objects can be pickled as long as
>> all the objects in them can be pickled.  Which means that as long as all
>> their methods are Zope objects, and all the nested classes are also Aspect
>> objects, you can save an aspect into the ZODB, and load it at a future
>> time.  Further, since adding aspects together makes new aspects, you can
>> save the combined aspects, so you only have to perform one call to
>> transform the aspect into a family of classes.  That still means some
>> load-time complexity, however.
>
>Perhaps... but as I see it, pickling the aspect weaving information into
>each object makes it harder to vary the aspect weaving after objects
>have been created.

That's not what I said.  *Aspect objects* can be pickled.  You're talking
about *instances* of *classes* created by weaving the aspects, and that's a
whole different kettle of fish.  Check out the "AOPTutorial" in the Wiki,
which sorts out the differences between the three.



>I would want to be able to create a portal, add some
>content, then change the aspects that apply to the content after it has
>been created.

Of course, just as you can currently upgrade a class that has instances in
the ZODB.  Regenerating the class from different aspects would have exactly
the same pros and cons as upgrading a .py module containing a class that's
used in the ZODB.


>I'm also planning outside the ZODB.  The goal is to design apps using
>pure and simple ZODB and not be required to do anything special to make
>it work later with other forms of storage.  Other databases will not be
>able to store aspect information.

Again, this is a confusion of instance and class.  Aspect information is
*not* per-instance - heck, even *classes* in TW don't know what Aspects
they were woven from.  The aspects are like flour and eggs that go into
making a cake (class or set of classes).  Once it's baked, the ingredients
are no longer visible.  :)


>That's actually the kind of functionality we have now, but we're using
>subobjects rather than tabs and we achieve many of the things AOP would
>give us through simple delegation.  You should check out the CMF as soon
>as the beta is released.

One of the interesting things I learned at the Python conference this year
(through some of the papers, like the Virtual Worlds and Thin Client
projects) was where the best trade-offs between a delegation approach and
an AOP-style approach are.  The spectrum seems to be that if your instances
need to make lots of different choices, or if they need to be able to add
and remove aspects on an ongoing basis, then some type of delegation is
probably the way to go.  If your choices are more about *configuration*
that applies to *multiple classes*, then aspects are probably more
appropriate.

By the way, I have never tried to promote AOP as even being relevant to the
CMF.  :)  AOP is mostly about *reuse*, so any single run-time environment
(such as CMF or even Zope as a whole) will not see much benefit that you
can't get through delegation.  ZPatterns, for another example, is one
gigantic web of delegation internally.  AOP is of more relevance to the
developer who has a piece of code they would like to use for the CMF, *and*
for a command line tool, *and* a testing tool, *and*  And thus they
need to be able to assemble their code into a variety of useful
configurations.

After Michel's presentation the other day, I understand a lot better how
Zope will address this issue with "adapters", and that will help *a lot*
with a lot of things.  However, people may also have other environments
besides Zope to use their code in, or other configuration choices to be
addressed that are not exposed to Zope (such as the database schema), and
having AOP available will presumably be helpful to them.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] dtml-in: next-batches

2001-03-08 Thread Dieter Maurer

Brett Carter writes:
 > I tried accessing keys off the 'data' object, and I just get an
 > 'unathorized' error.
 > Dieter> The attributes your are looking for are in fact keys
 > Dieter> of the mapping 'data'.
Sorry for the misleading answer.

"data" is not supposed to be used directly.

"next-batches" returns a sequence of
"DocumentTemplate.DT_In_SV.sequence_variables".
Each "sequence_variables" object behaves like a mapping
and exposes the items of its "data" member (and some more
items derived from them), among them
"batch-start-index", 'batch-end-index', and 'batch-size'.


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZSQl Cache

2001-03-08 Thread Bryan Baszczewski

Anyone have an idea of what the optimal cache time is (all things considered
.. "normal" circumstances) for a ZSQL query <= 50 rows?  Does Zope tend to
lag or suck too much memory at some point?


Bryan Baszczewski
Software Engineer/Technology Strategist
2s2i, Inc.
www.2s2i.com
phone: (703)534-9800 x-203
fax: (703)995-4866
"Because word of mouth has gone global, there's e-Intelligence from 2s2i."




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] (Newbie Alert)- How to change multiple properties from aselection list

2001-03-08 Thread stefano . ciccarelli

Hi, 
I am trying to assign more than one property from a form selection list.

I have a ZClass "Course Description" that holds ..a course description 
(title, learning objectives, agenda, prerequisites,link to docs,etc.) 
and another ZClass "Course session" that holds the course time and 
space related data(start date, end date, summary,location, etc.)

Trainers create courses and course managers (CM) decide when and where 
to have these courses. 

Once the CM wants to set up a session, he adds a Course session, 
selects the course title from a selection list and decides when and 
where to have this course.

The selection list is generated by a catalog search. What I would like 
to do, is the following: 

Since the title is not unique, what the CM really chooses is the Course 
id. 
Based on the selected id I would like to :

copy the title property of the Course Description to the title property 
of Course Session.

update the "link to Agenda" property of the Course Session with the 
path to the selected Course Description.

I know how to do this singularly, but not all at hte same time.

Any Idea?

Here follows some code I am using for the selection list

Title of event
 
  
  
  
   

Thank you very much,

Stefano

 
 





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Zope not start as win2000 services

2001-03-08 Thread kent sin

Zope installed from binary can not start as service on
NT after modified been made to pythonpath registry.
Before that, it runs.

The event log says: string object has no attribute
upper. 

Does this means some conflict between the python2 and
the 1.52 from zope? 

Can somebody give me instructions to solve this?

Rgs,

Kent Sin

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )