Re: [Zope-dev] The structure of lib/python/*

2001-02-17 Thread Erik Enge

[Dieter Maurer]

| Erik Enge writes:
|  > I've been reading a lot of Zope code the last couple of years, but
|  > still I really don't see any overall structure of lib/python.  Is this
|  > documented somewhere?
|
| I find the names quite self explanatory.

Yes, the names are fine in most cases.  It was the structure of what
is where under lib/python I couldn't find any real, well, structure on.

___
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] Using Zope for Groupware/Messaging applications

2001-02-17 Thread R. David Murray

On Sat, 17 Feb 2001, Doug Hellmann wrote:
> I've yet to see any documentation which sufficiently explains what
> ZPatterns is and how to use it for me to consider it in any of my
> projects.  I've read the wiki pages and I just don't get it.
> 
> Where should I be starting for enlightenment?

Well, if you've read the Wiki, there really isn't anything else to
read other than the Coad book for general object design background.

I "figured out" zpatterns by starting to build a store using 
EMarket 0.2.0, which is ZPatterns based.  It didn't take very
long before I started to really appreciate the power of the ZPatterns
approach.

Fundamentally think of it as doing the object design of your system
without worrying about where the data is going to get stored.

If you want a nuts and bolts capsule description, think of it as
providing you the ability to easily make just about anything about
your objects computed.  That is, when any part of your application
goes to access one of your objects, there is code that can get
triggered to do all sorts of Cool Stuff in order to build the object
from arbitrary data sources.  This means you can do things like
have (my example) a Paradox database of books, authors, and a
books-to-authors map, and have Author and Book objects in the system
such that a Book has a list of its Author objects and the Author
has a list of its Book objects, all in about 20 lines of ZSQL and
skinscript.  Plus I have a 'long description' field that comes from
another database table, and thumbnail and full sized images that
are stored in Image objects in the ZODB.  All this stuff is seemlessly
assembled into Author and Book objects by, like I said, about
20 lines of the skinscript and zsql.  The rest of the app has no
idea how those objects come to be or where the data comes from
(or goes to).

You really have to try it to understand, though, I think.  It's not
as hard as the discusions on the mailing list may make it seem.
The learning curve is somewhat steep, but also rather short, at least
for the wow-this-is-powerful stuff (I'm still learning the subtleties).

--RDM


___
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] Extending propertysheets

2001-02-17 Thread Johan Carlsson

Hi,
I have a strong desire to be able to extend propertysheets
with more types possibly adding checking for them.

For instance be able to specify URLs, email addresses, ISBN-number etc.

Is this good idea at all? 
What would be the risks?

Cheers,
Johan Carlsson
¢—ƒzùšŠYb²Öh¥àÞ¿:)zŠà†Ûiÿùb²Û3¢—¨®æj)fjåŠËbú?Ί^uëÍ¡Êè²Êh²Û(¬tÌ-éܡا¥jם–+-²m§ÿåŠËlΊ^¢¸?™¨¥™©ÿ–+-Šwèÿ:)y©ç¢éÜzm§ÿåŠËlΊ^¢¸?™¨¥™©ÿ–+-Šwèÿ:)


Re: [Zope-dev] Using Zope for Groupware/Messaging applications

2001-02-17 Thread Doug Hellmann

"R. David Murray" wrote:
> 
> Let me be a bit less cryptic.  Design your system, and use ZPatterns, and you
> can defer questions about which storage suits the parts of the app until
> later, and can change your mind at need.  For the kind of project you
> are embarking upon, the time needed to learn ZPatterns is well worth it.

I've yet to see any documentation which sufficiently explains what
ZPatterns is and how to use it for me to consider it in any of my
projects.  I've read the wiki pages and I just don't get it.

Where should I be starting for enlightenment?

Doug

___
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] The structure of lib/python/*

2001-02-17 Thread Shane Hathaway

Dieter Maurer wrote:
> 
> Erik Enge writes:
>  > I've been reading a lot of Zope code the last couple of years, but
>  > still I really don't see any overall structure of lib/python.  Is this
>  > documented somewhere?
> I find the names quite self explanatory.
> 
> Yes, I am a person that believes in self explanatory names
> and minimal documentation.
> If the structure were documented, you probably would not find
> it and few people would read it when they accidentally came
> along it.

Nevertheless I think there are some modules and packages that are not
self-explanatory.  Just for fun I came up with a categorization scheme
for the different major Zope components. People have talked about
"componentizing" Zope before, but the list below leads me to believe
that Zope already is componentized.  The majority of the modules and
packages can be pulled right out and put in other projects.  Only the
packages in the "Zope-specific" category can't be pulled out.

Shane


  Zope-specific

AccessControl

App

Globals

HelpSys

OFS

ZClasses

ZLogger / zLOG

Zope

zdaemon

Products.OFSP

Products.SiteAccess

Products.StandardCacheManagers

Products.ZopeTutorial

ZDom

  Utilities

DateTime

LOG

MultiMapping

unittest

  Python language enhancements

ExtensionClass

MethodObject

ComputedAttribute

Acquisition

Interface

cPickle, cStringIO, crc32, zlib, ts_regex

  ZODB-related

Persistence

BTree, IIBTree, IOBTree, OIBTree, intSet

ZODB

ZEO

  Templates

DocumentTemplate

PresentationTemplates

StructuredText

TreeDisplay

Products.MIMETools

  Scripts

Shared.DC.Scripts

Products.PythonScripts

Products.ExternalMethod

  Publisher

Medusa

ZPublisher

ZServer

  Connectivity

webdav

xmlrpclib

Shared.DC.xml

Products.MailHost

  Catalog

SearchIndex

Products.ZCatalog

  Database adapters

Shared.DC.Record

Shared.DC.ZRDB

Products.ZGadflyDA

___
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] The structure of lib/python/*

2001-02-17 Thread Dieter Maurer

Erik Enge writes:
 > I've been reading a lot of Zope code the last couple of years, but
 > still I really don't see any overall structure of lib/python.  Is this
 > documented somewhere?
I find the names quite self explanatory.

Yes, I am a person that believes in self explanatory names
and minimal documentation.
If the structure were documented, you probably would not find
it and few people would read it when they accidentally came
along it.


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 )



Re: [Zope-dev] More Zope 2.3.1b1 stuff.

2001-02-17 Thread Erik Enge

[Erik Enge]

| [Erik Enge]
| 
| | This might be picking on very little things
| 
| And so is this

Yeah, this also - but I promise, this is the last one.  For today
anyways.  Either my eyes aren't quite awake yet, or this line appears
two times in the «Credits»-section of /manage_copyright:

"""
Phillip Eby contributed the DTML let tag and many other useful ideas,
including the inspiration for the DTML call, with and return tags.
"""

Phillip has come up with way cool things, but two lines? ;)

Then again, it might be a kinda funny thing which totally escapes me
and my humor.  :)

It's there in Zope 2.2.1 also.

___
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] More Zope 2.3.1b1 stuff.

2001-02-17 Thread Erik Enge

[Erik Enge]

| This might be picking on very little things

And so is this: why isn't there a grey line above the Users in the
acl_users?

___
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] More Zope 2.3.1b1 stuff.

2001-02-17 Thread Erik Enge

This might be picking on very little things, but hey, someone has to
do that too. :-)

When adding a Version, the «Help»-button is there.  Not a «Help»-link
which seems to be the standard these days. Same goes for Mail Host,
External Method, Z SQL Method and ZCatalog.

Accelerated HTTP Cache Manager is missing its «Help»-link.  So is the
RAM Cache Manager, Script (Python), Set Access Rule, Site Root,
Virtual Host Monster, Vocabulary, Z Gadfly Database Connection and
Zope Tutorial.

Oh, nearly forgot these:

lib/python/ZPublisher/BeforeTraverse.py is missing the ZPL.


lib/python/ZODB/DemoStorage.py, line 103:

"""
  a transaction is simply a 4-tuple:

packed, user, description, extension_data, records
"""

That seems like a 5-tuple to me, or my Python terminology is fubar.


___
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] Zope 2.3.1b1 glitch?

2001-02-17 Thread Erik Enge

[Erik Enge]

[about undo tabs]

Hm.  Just discovered this.  Both

/Control_Panel/manage_undoForm

and

/Control_Panel/manage_UndoForm

work fine.  manage_undoForm redirects to manage_UndoForm after you've
pressed the «Undo»-button though.  Maybe that's where the confusion is?

___
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 2.3.1b1 glitch?

2001-02-17 Thread Erik Enge

Hia.

When entering the ZMI and clicking on «Control_Panel», «Database
management» and then «Cache parameters» I get two new tabs: «Contents»
and «Undo».  It's probably just me, but I don't quite understand these
two.  Couldn't we display the «Undo» tab along with «Database», «Cache
parameters» and «Flush Cache»?

The «Undo» tab (both in «Cache parameters» and «Flush Cache» points to
/Control_Panel/Database/manage_UndoForm.  When I enter manage_UndoForm
I've so far never gotten any Undoable transactions up, and it brings
me back to having the «Database»,  «Cache Parameters» and «Flush
Cache» tabs.  Kinda weird?

If I go to /Control_Panel/Database/manage_undoForm (lowercase «u»),
then I get a number of Undoable transactions.

What's the difference between

/Control_Panel/Database/manage_undoForm

and

/Control_Panel/Database/manage_UndoForm
?

(Apart from the obvious spelling ;)

Another thing.  When I hit «Undo» in manage_undoForm I'm taken to the
manage_UndoForm which displayes: «There are no transactions that can
be undone.»  Although, I know there are, because manage_undoForm says
so.  :-)  The transaction(s) I marked as wanting to Undo are undone.
So that works.


___
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] Import Libraries into Python Script

2001-02-17 Thread Itai Tavor

Brian Lloyd wrote:

>  > What's wrong with:
>>
>>  import imaplib
>>   imaplib.__allow_access_to_unprotected_subobjects__ = 1
>
>Nothing is wrong with it per se - but using the SecurityInfo
>interfaces (even indirectly through the helper stuff I checked
>in to PythonScripts for 2.3.1) is more future-proof, in case
>the actual mechanics of protection change one day.

Thanks for explaining. I read the release notes for 2.3.1 just hours 
after sending my question. Doing this with the new helper functions 
sounds like a good way.


>  > And, if the above is somehow bad or insecure, how would you use your
>>  method to allow access to specific methods in a module, as in:
>>
>>  import re
>>   re.__allow_access_to_unprotected_subobjects__ = {
>>   'sub': 1,
>>   }
>
>You can see a minimal example in the standard.py module in
>the PythonScripts package (though there is no helper shortcut
>for that method yet - there probably should be).

A helper shortcut would be nice :)
--
Itai Tavor  -- "Je sautille, donc je suis."--
[EMAIL PROTECTED]--   - Kermit the Frog --
-- --
-- "Every day, once a day, give yourself a present"  - Dale Cooper --


___
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 )