lennart regebro what zope did wrong (and what to do instead)

66
What Zope did wrong (and what to do instead) Lennart Regebro EuroPython 2007, Vilnius

Post on 14-Sep-2014

4.297 views

Category:

Technology


0 download

DESCRIPTION

An overview about the problems with Zope2 and Zope3 and how to fix them.

TRANSCRIPT

Page 1: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

What Zope did wrong (and what to do instead)

Lennart RegebroEuroPython 2007, Vilnius

Page 2: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope is zuper!

Page 3: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

First!

Page 4: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Object oriented!

Page 5: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Python!

Page 6: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Open source!

Page 7: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Batteries included!

Page 8: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Secure!

Page 9: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Easy!

Page 10: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

And many other exclamation marks!!!

Page 11: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

What Zope2 did right

Page 12: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Used Python

Page 13: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

ZODB

Page 14: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

DTML/ZPT

Page 15: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Batteries included

Page 16: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Easy entry into development

Page 17: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope2: The dead-ends

Page 18: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

The ZODB pile of scripts

Page 19: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

ZClasses

Page 20: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Disk-based products

Page 21: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Never ends

Starts off easy

Page 22: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)
Page 23: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

It's unpythonic!

Page 24: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Products instead of modules

Page 25: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Way to much magick!

Page 26: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope is the Application (not the library)‏

Page 27: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Maybe more?

Page 28: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope 3: Knight in shining armour!

Page 29: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)
Page 30: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope 3?

Page 31: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope 3!

Page 32: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

To complicated

Page 33: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

<configure xmlns="http://namespaces.zope.org/zope" xmlns:browser="http://namespaces.zope.org/browser" xmlns:hello="http://namespaces.zope.org/hello"> <content class=".hello.Hello"> <require permission="zope.Public" interface=".interfaces.IHello" set_schema=".interfaces.IHello" /> </content> <browser:defaultView for=".interfaces.IHello" name="edit.html" />

<browser:addMenuItem class=".hello.Hello" title="Add Hello" permission="zope.Public" for="*" />

</configure>

Page 34: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Ugh...

Phew...

Page 35: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope3: Death by abstraction

Page 36: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)
Page 37: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

It's unpythonic!

Page 38: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

XML

Page 39: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

(So, not so unpythonic as people think)‏

Page 40: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

� A mail service API

� Implementation neutral

� Req: J2EE

� Not web-only

In J2EE:

The JavaMail API!

Page 41: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

� A mail service API

� Implementation neutral

� Req: components

� Not web-only

In Zope 3:

zope.app.mail

Page 42: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope 3: The long march

Page 43: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Development of Zope 2 slowed down

Page 44: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Documentation no longer updated

Page 45: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

A general waiting for Godot

Page 46: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Backwards compatibility

Page 47: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Didn't happen

Page 48: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Forwards compatibility

Page 49: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Not Yet

Page 50: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Never ends

Starts off easy

Page 51: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Ugh...

Phew...

Page 52: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

2 + 3 = Five

Ugh...

Argh!

Page 53: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Low entry tresholdand

all the power of a big framework

without

dead ends?

Page 54: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)
Page 55: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)
Page 56: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

TTW Layer GUI schema/form editorGUI workflow editor

A CMS, ERP or similarSite Layer

A Web application serverApplication Layer APIApplication Layer

Information ManagerIT department

Site developer

Application developer

Core developerLanguageComponent ArchitectureLoads of components

Core Layer

Page 57: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

� Pythonic− Use existing modules and APIs if possible− The whole application framework is a library

� Highly modular− Pick and choose from the modules

− Modify and replace internal components

Page 58: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Too much freedom?

Page 59: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Start with a finished application!

Page 60: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

How can we accomplish this?

Page 61: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Python

Page 62: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

A setup framework

Page 63: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope Component Architecture

Page 64: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Zope 3 the libraries

Page 65: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

Grok

Page 66: Lennart Regebro   What Zope Did Wrong (And What To Do Instead)

GUI Tools

The CMS/ERP

Grok

Information ManagerIT department

Site developer

Application developer

Core developer ComponentArchitecture