Zope - Eionet Forum

obtainablerabbiΔιαχείριση Δεδομένων

31 Ιαν 2013 (πριν από 4 χρόνια και 4 μήνες)

192 εμφανίσεις

EIONET Technologies
-

Zope

Valentin Baciu

Finsiel Romania

Tirana, 7 June 2005

Overview


The “Zope” acronym stands for
“Z” object publishing environment



Zope is a framework that allows developers of varying skill levels to build

web
applications



Zope is an
open source

application server


Contains all components to build secure, speedy and reliable Web
-
based
applications


Most of it coded in

Python
, critical performance parts written in
C


Overview (continued)


Zope is platform independent, can run on almost all OS (Windows
95/98/NT/2000/XP, Linux/Unix, Solaris, NetBSD/OpenBSD/FreeBSD, HP
-
UX,
MacOSX, BeOS)


A community of developers is responsible for maintaining and extending Zope.


Zope Corporation (
formerly

Digital Creations
) controls the distribution of the
canonical versions and selects the people involved in modifying these versions’
source code


Zope is an OO environment, the applications are modeled into objects


Advantages of Zope


Fast development/deployment time


Easy to
remotely administrate

and maintain using a Web browser



Intuitive
Zope Management Interface

(
ZMI
) with the looks of a file system browser


Conceived to allow team work


Delegation of authority


Versioning


Large, active and growing community of users and developers


extendibility: developers are encouraged to build stand
-
alone
packed components
ready for reuse


huge collection of open source
Python modules and libraries
and is oriented to rapid development

Zope features


Zope translates the WEB into object structures and stores them into it’s own
object
oriented DB


easy to backup, fault resistant


support for indexing and searching


undo support


Built
-
in WEB server (
Medusa
)


easy to replace with another front
-
end WEB server
(Apache, IIS etc)


has an FTP component allowing access to the database using a folder
-
like model


Scalability



distributing the hits on various machines that handle the workload using
built
-
in component
ZEO
(Zope Enterprise Objects)

Zope Features (2)


Database adapters (Oracle, PostgreSQL, MySQL, Access, LDAP, IMAP)


Multiple protocol support

(HTTP, FTP, WebDAV, SQL, ODBC)
and standards

(XML, DOM, XML/RPC, SOAP)


Built in extensible and granular

security model



Web
-
based management: configuration and basic maintenance can be done
using a Web browser


Accessible with almost any WEB browser

Object Oriented


Everything in Zope is an object


Objects can be identified and accessed via a unique, human readable URL,

and can be accessed via HTTP, FTP, XML
-
RPC, or WebDAV like this:

http://myzopesite.com/book/cover/large


Changes to objects are persistent, and are stored in the ZODB


Objects can acquire attributes from their containers, even if they don’t have

those attributes themselves


Zope Architecture

Z
ope
M
anagement
I
nterface

Zope on the file system, from 2.7.x


INSTANCE_HOME

bin/


Scripts used to control the Zope instance

etc/


Configuration files

Extensions/

Python sources for External Methods

import/


Zexp files to import in ZODB

log/


Log files

Products/

Installed products specific to the instance

var/


Run
-
time data files, including the object database


SOFTWARE_HOME

bin/


Scripts used by the Zope core, including scripts





to create a new instance

doc/


Documentation files

import/


Zexp files to import in ZODB

lib/


Python core libraries

skel/


Empty instance skeleton

Environment variables


SOFTWARE_HOME
: the base Zope software package


INSTANCE_HOME
: instance with custom configuration and additional
components


CLIENT_HOME
: directory in which a running Zope's process identifier
files are placed

Users and security

The four key components of Zope security:



users



people (groups of people)



roles



kinds of responsibility (ie. Manager, Author, etc.); provide linkage between
authentication and authorization



permissions



are specific to objects. Similar to permissions from the file systems
(read, write, execute)



security policies



where roles meet permissions

Default roles in Zope


Anonymous

-

all users, including users that do not supply authentication credentials


Authenticated

-

users that are authenticated in the portal, even without rights


Manager

-

users with responsibility for managing a Zope website or portions of a website


Owner

-

when an object is created, the user who created it is given a local role of Owner



Local roles

allow users to be bound to roles at the level of an individual object


Zope concepts


Acquisition



Zope objects are not merely contained, they also acquire their attributes


based on containment


"
in a
" relationship


used to enforce consistency, standardize layout, share logic, etc.



An
acquired

attribute operates within the
context

of the acquiring object



Inheritance
-

OO concept = "
is a
" relationship


Users and acquisition

Users defined at various levels (or defined in the Root folder and having local roles
at that levels) can only use their extra
-
permissions below in the hierarchy


Persistence


storing objects for later use without losing their identity, type etc
.


serialization



process that turns (saves) arbitrarily complex objects into
textual or binary representations of those objects


the ability to restore the serialized form of an object back into an object that is
the same as the original


e.g. in Python the serialization process is called

pickling



ZODB (I)


is a OO database system capable of storing and managing arbitrarily complex
Python objects with transaction support and concurrency support.


relies upon Python’s native serialization capability


spreads object storage over multiple records



each stored persistent object has it’s own database record



each object has an unique id

that identifies it and is used to lookup object
data in the database


ZODB (II)




has a

single

designated

root object
,
which provides access to application root
objects by name



all other objects, besides root object, are accessed through

object traversal

from the root


Zope


everything is object

-

Root Folder
,
Control_Panel
,
acl_users

are objects



Select type to add…

allows you to create new objects



can be extended by creating

Products

that defines their own types of objects

Extending Zope


Scripting


DTML


ZPT


Python Scripts


External Methods


Extending with products


ZClasses (available from ZMI)


Python Products (python modules on the file system)


Zope scripting (I)


Zope manages presentation, logic and data with objects


data


Files, Images …


presentation


DTML and Page Templates


logic


DMTL and scripts (Python and Perl)


Scripts



objects that encapsulate chunk of code


Zope comes with
Python
-
based Scripts
,
External Methods



Perl Scripts separated

Zope links


Official Zope Website

http://www.zope.org


Support: Zope mailing lists

http://www.zope.org/Resources/MailingLists


Zope exits

http://www.zopelabs.com

http://www.zopezen.org

http://www.zopenewbies.net


And many many more


Python

http://www.python.org