:


                   Zope - The Object Publishing Environment


:
     <phd@mail.ru> 
      Python  Zope <python@list.glasnet.ru>.



---------

   -,  .     Z Object   .
  The Object -    Tope,   
"".          .
   -,    - ? ?  ? 
        :) 
  Zope   . ,   , !



--------

   Zope (www.zope.org) -  - , 
,     web- 
 .

     "-"   .
-, Zope    Python, -  
 .
   -, Zope    " " - URL, 
  ,     ( ),
  .
   -,   (  )  
-   ZODB.

         
"-"  ,     
,      Zope.
       - . Zope -   
 ,    ,  . "" -
  ,     .

     ,  XML,    .   ,
 Zope    XML -   , -    
   ,    "     ,
    " (C) ,  ).
      ,    : free software, open
source, 64- (  ),  
 (Zope         
   Windows;     ZODB -  Data.fs -
     ),   
(   ZEO,   ).

   ...



------

     WWW (HTTP, CGI  ..)     
     .  
      
web-   .
   Zope  -   
 .       
 -     ,  
 ,  Zope        
  .



------------

C Zope    :

   **   -     
       

   **  -  ,   ,   Python

   ** web -    (   ) 
      ,   web-

   **   -    ,  ,
           ,   ( ) 
          ,     (
      , , ,   ..)

   , ,     -  .   
     .    Zope 
     ,
, .



----------

Zope Core

    "" Zope  ORB (object request broker),  
,   (ZCatalog), , 
   . Zope  web- 
  .

ZServer

    ZServer    , 
 HTTP, FTP, XML-RPC, FastCGI  PersistentCGI. Zope  
  ZServer,    ZServer   
 WWW ;   Zope   - 
WWW    PCGI (  PersistentCGI).

Object Database (ZODB)

   -  Zope   (  
 Python,     );  ZODB
 -,      . 
ZODB     StorageManager - . 
 FileStorage     Data.fs,   
  - SQLStorage  BerkeleyStorage. ZODB 
  (),  undo ( 
 , , FileStorage  InterbaseStorage
   ,    - ), 
,      .  
ZEO (Zope Enterprise Option)    
  . ,  ZEO  
  ServerStorage,      Data.fs, 
  ;   ZEO    .

Document Template Markup Language (DTML)

          ()
.    ,      - 
 DTML (, ,    Zope).

   

   Zope    ZSQL,   
  SQL,   PostgreSQL, Oracle, MySQL  ODBC.

 Zope

    - ,     - 
 Zope   . ,  ( 
 Poll)     .  , 
   , web  
         ; 
    (     
);      !

ZClasses

   Z- -    "",  
. Z-    ,    
      ()  web.
  Z-    .



--------

   :
      --   (DTML)
      --   (ZODB, ZCatalog  )
      -- API    
      -- API    Zope  www-,   HTTP /
         XML-RPC
      --    (Zserver, ZPublisher, ZODB, DTML,
         Catalog)     Zope,   
          

   web-:
      --   (DTML)
      -- www-   

   :
      -- www-   
      -- ,        
          ,    
         



----------------

          
     .

   1.   DTML.    , 
,  web.  DTML     
   ,   ,    
. DTML    ,   
 .

   2. PythonMethods.        web-
Zope.        ,  
DTML.  PythonMethod -     .

   3. ExternalMethods.     ,    
 .       
(  ,        ,   
  Zope,         
   Zope),      
Zope   ,      
Zope  web-.

   4. .       Product API.  -
     .    
(    ExternalMethods ;   
       
 ).       
,  Zope  .     
   (    ,   
        
    ()), 
       .

   4. ZClass. " ".  Z- ,
    ,    DTML   
  .  ""   web-
Zope. Z-    ,    
.    Z-   
 (      ,   
). Z-       
Zope,    Z-,     ,
 ,     Z-.



-------------------

   Zope    ( ).   
Zope   ZPublisher -   .  
( ZServer',          
   ), :

   --     ,    
   --        
      (      GET, ;   
        )
   --    
   --     ,   (
       ,      HTTP)   
      

        ZPublisher, ,  
   ,    , 
     .     , 
,    :

<FORM name="formA" action="myObject" method="POST">
   <input type="text" name="age:int" size="2">

   <input type="checkbox" name="category:int:list">K1
   <input type="checkbox" name="category:int:list">K2

   <input type="submit" name="manage_setAge:method" value="">
   <input type="submit" name="manage_delete:method" value="">
</FORM>

             ZPublisher
  .  age   ,
checkbox' -   ,       myObject 
   .
   , ,    ,  Zope. 
 age    ,  .  
  ,   - Zope   HTML 
  .       
JavaScript.       JS,   
: element = document.forms["formA"].elements["age:int"]
      ,    ()  ( 
       ). , 
myObject -    :

   class AgeManager:
      def view(self, age=None):
         if age is None:
            age = self.age
         return ": <b>%d</b>" % age

      def manage_setAge(self, age):
         self.age = age

      def manage_delete(self, category):
         for c in category: self.delete(c) # self.delete  

     manage_setAge    age,  manage_delete - 
  checkbox'.      
  ,   self.

      GET   :  
http://www.my.server/root/subobject/sub2/myObject/view?age:int=12
   ZPublisher    (   
acquisition,   )   myObject -    
view   .



-----------

   Acquisition -       
.     "" ; 
 .
         .
   - ,     ,
 ,        .
    -    
   .
    -  ,     . , 
  [object, sub2, myObject] (   myObject), 
myObject    color,     
 .         myObject,
    -    sub2,   object.

     -     ZODB (ZODB,  !) 
   .   -   (),
       ZPublisher 
    URL.
   ,    /root/object/subobject/myObject,    
  (,    
[root, object, subobject, myObject]).
       URL.     
http://www.server/root/object/subobject/myObject,    
    .    
http://www.server/root/english/object/subobject/myObject ( english -
   root)    -    
english.  ,     englsih , 
   . ZPublisher   
 acquisition,      
http://www.server/root/english/object/subobject/myObject 
 .
    ( ZServer')  /root/english/object/subobject/myObject,
ZPublisher     ,    .
  ,     root (   
ZODB,  ,        ), 
ZPublisher  english    (  );
   /root    ,   object, 
   english,   /root,    
subobject  myObject.        URL.   
 english   object,     ,    /root. 
    object   subobject,  subobject  
  /root (   ).       ()
[/root, /root/english, /root/english/object, /root/subobject, myObject]. 
  myObject   language,  
/root/subobject,      /root/english/object,   
/root/object!
    ,     URL,  
     ,     
   .      -
      ,    ( 
 acquisition path -    ).

     .    Zope -   DTML
Document  DTML Method,    Zope.  
   . DTML Document  , ; 
 -    . DTML Method 
  ,      .
   Folder - .     .
   , ,  my.html    , 
  .   DTML   
<dtml-var standard_html_header>  <dtml-var standard_html_footer>.
      (   
  ) .    (  ZODB  ), 
  , , Razdel1  Razdel2, 2  - header  footer,
  Razdel2 -  my.html.

/
   standard_html_header
   standard_html_footer
   Razdel1
   Razdel2
      my.html

   ,    http://www.server/Razdel2/my.html. ZPublsiher
  [/, /Razdel2, /Razdel2/my.html]   
my.html.   ,     
<dtml-var standard_html_header>.   . 
my.html   ,  Razdel2 ,     - 
 .   (),    
my.html,  footer - .

       Razdel2  header:

/
   standard_html_header
   standard_html_footer
   Razdel1
   Razdel2
      standard_html_header
      my.html

       http://www.server/Razdel2/my.html.  my.html
  header,    -!

       ,   header/footer:

/
   standard_html_header
   standard_html_footer
   Razdel1
   Razdel2
      standard_html_header
      my.html
   NewLook
      standard_html_header
      standard_html_header

      http://www.server/Razdel2/NewLook/my.html.  
my.html  header  NewLook? ! my.html - DTML Document, 
   .  acquisition path 
[/, /Razdel2, /Razdel2/my.html].

     Razdel1  DTML Method index.html

/
   standard_html_header
   standard_html_footer
   Razdel1
      index.html
   Razdel2
      standard_html_header
      my.html
   NewLook
      standard_html_header
      standard_html_header

      http://www.server/Razdel1/index.html.   ,
    ,      
 .     
http://www.server/Razdel1/NewLook/index.html   
,  index.html    NewLook -   
 !

      .  ,

/
   standard_html_header
   standard_html_footer
   Razdel1
      index.html
   Razdel2
      my.html

     header/footer,      , ,
 .   left-column,        :

/
   standard_html_header
   standard_html_footer
   left-column
   Razdel1
      index.html
      left-column
   Razdel2
      my.html
      left-column

      http://www.server/Razdel1/index.html 
  , http://www.server/Razdel2/my.html - . 
header     !  header ,   ?
  -      acquisition path,  
(      ,   ),
  .
     left-column       
.      DTML Method,   Razdel2 - ZNavigator.
Header'  ,  ,   left-column,   
     ( - ).

     ,      Zope,   .
 :  URL     ,  
 ,     index_html.
     .    DTML Method index_html
 :

   <dtml-var standard_html_header>
   <dtml-var content>
   <dtml-var standard_html_footer>

 DTML Document content,    ,  
/.

/
   standard_html_header
   standard_html_footer
   index_html
   content
   Razdel1
      content
   Razdel2
      content

      : http://www.server/.    
index_html,  ,    
.  .
        : http://www.server/Razdel1/ 
,     index_html...   Razdel1  
index_html.    ! ,    DTML Method,  
     . Header/footer 
 ,  content  Razdel1.

   ,     .   db  dtml-
( dtml-   db/view, db/insert, db/update), 
sql-,   ( ,  ).
   ,     ,  users.   
     ( , 
).
     db/users/view -     
.  view (   insert  update)   db, 
   users.
    db/users/insert (  db)    
db/users  ,  ,   , 
 .       ,  
.    ,  -     
,     " " db (
    - db/search)  
 "" db/users, db/something...



--------

   Zope     ,    
      .  
Zope    ,    - , ,  
.

   ,        .
      "Add" ("
    "),    
   ,  ,    
     . ,  index_html
(     ,     )
    View.    ,   
,      .  
   ,   . , 
ߋ    ( ) " ",
" ", " ", " ",
"// ".     
 (    ) -     .
   ,   ,  
 SecurityManager - "     
 DTML    Razdel?"

         web- Zope.
      ,   ZODB,   
.     - ,   
 acquisition      .
   Zope,   ,  3 ,   
ZODB - Anonymous, Owner  Manager. Manager -   
,  . Owner -   ,  
.   -   ;  
  : Access content, View, Use SQL Methods (  ,
   SQL   DTML )  Search ZCatalog.
          ,   ,
        ,   
 ,      .

    2  -     -  , 
 web-     checkbox' -   
 .
     , ,   Editor  ChiefEditor,
   Editor    DTML Document',  
ChiefEditor -    DTML Method', ,  
 .   SubAdmin     
 ,    .

    (    ) -   (  
),   User.  Zope   
UserFolder,      ZODB,     
username/    Basic Authentication.  
     .   :

   -- etcUserFolder,     ;   
       :)
   -- UserDB -      SQL;     SQL 
      ,      ZSQL,   
         SQL- (   Zope  )
   -- RadiusUser, MysqlDB, NTUserFolder, NISUserFolder - ,   
      
   -- GenericUserFolder -     
      
   -- LoginManager, Membership -  ,   
       GUF;  Zope Portal Toolkit

        Basic Auth,   .  
      ,  
       NT,   -  SQL.
 ,     2  UserFolder .

         ,  
.    (  User),    ,
   ,    / IP,   
 .
   -,   ,  
     ,     
.

      ,  -   
  ,    .
,    (   ) ,  
.      (,  DTML
   ),     Proxy Role  
Manager.    setuid,     setuid,  
 ,      .

   ,  , Local Role,   
   ()   . - 
  ,    ; Local Role
      ,  
 .     
acquisition.



----------

   --     
   --   :    dtml-in
          ,    
      Catalog   Splitter (   JSplitter,
       ,    )
   --     - Zope  ,
           ,      (
      20-30); Z-    ,     
      

    Zope      
.

   -- ,     
   --       CVS
   --   - ;   
       PerlMethods     
   --    ,      .
      ,  lock   .  ,   (
       Zope)     
       

        Zope.

   --         - 
       ;  BTreeFolder    
   --    ;   ,
        ,   ,    
        ,      



----------------------------------

        ,    ,   
      Zope.  
    ,     ( ,  
) subscribe python   majordomo@list.glasnet.ru. 
 -   http://www.glasnet.ru/~jno/;   -
--.

Oleg.         (All opinions are mine and not of my employer)
----
    Oleg Broytmann  National Research Surgery Centre  http://sun.med.ru/~phd/
           Programmers don't die, they just GOSUB without RETURN.

Last-modified: Mon, 03 Jul 2000 11:18:16 GMT
: