What Zope Did Wrong

Total Page:16

File Type:pdf, Size:1020Kb

What Zope Did Wrong W h a t Z o p e d i d w r o n g ( a n d w h a t t o d o i n s t e a d ) Lennart Regebro EuroPython 2007, Vilnius Z o p e i s z u p e r ! ● First! ● Object oriented! ● Open source! ● Python! ● Batteries included! ● Secure! ● Easy! ● And many other exclamation marks!!! W h a t Z o p e 2 d i d r i g h t ● Used Python ● ZODB ● DTML/ZPT ● TTW development ● Easy entry into development Z o p e 2 : T h e d e a d - e n d s ● The ZODB pile of scripts ● ZClasses ● Disk-based products Z o p e 2 : T h e l e a r n i n g c u r v e Never ends Starts off easy Z o p e 2 : T h e m o n o l i t h i c l o c k - i n I t ' s u n p y t h o n i c ! ● Products instead of modules ● Way to much magick! ● Zope is the Application (not the library) ● Maybe more? Z o p e 3 : K n i g h t i n s h i n i n g a r m o u r ! Z o p e 3 : T h e l o n g m a r c h ● Development of Zope 2 slowed down ● Documentation no longer updated ● A general waiting for Godot B a c k w a r d s , f o r w a r d s o r n o t a t a l l ● Backwards compatibility – Didn't happen ● Forwards compatibility – Didn't happen – (Well, yet, at least. Could still happen) Z o p e 3 : T h e l e a r n i n g c u r v e Phew... Ugh... T o c o m p l i c a t e d <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> I t ' s u n p y t h o n i c ! XML (So, not so unpythonic as people think) Z o p e 3 : A p p e a r a n c e s d e c e i v e Zope 3? Zope 3! T w o a t t i t u d e s In J2EE: In Zope 3: ● A mail service API ● A mail service API ● Implementation ● Implementation neutral neutral ● Req: J2EE ● Req: components ● Not web-only ● Not web-only The JavaMail API! zope.app.mail Z o p e 3 : C o m p o n e n t A r c h i t e c t u r e Everything is extensible and pluggable! S u r p r i s e ! zope.component is not Zope only! S u r p r i s e a g a i n ! zope.component requires no XML! Z o p e 3 : A d a p t e r s e v e r y w h e r e ! A view of an object is really an adapter between the object and the request to the IBrowserView interface. Z o p e 3 : D e a t h b y a b s t r a c t i o n ● Add a field to a schema ● Schemas are interfaces ● You need to write Python-code! ● . T o o l s n e e d t o m a k e s e n s e T h e b l a n k s h e e t ● 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 T h e d e v e l o p e r d i l e m m a Low entry treshold and all the power of a big framework without dead ends? Z o p e 3 : T h e l e a r n i n g c u r v e T h e l a y e r e d c a k e ! T h e l a y e r e d c a k e Information Manager TTW Layer GUI schema/form editor IT department GUI workflow editor Site developer Site Layer A CMS, ERP or similar A Web application server Application developer Application Layer Application Layer API Language Core developer Core Layer Component Architecture Loads of components T o o m u c h f r e e d o m ! How can the unexperienced choose between Genshi, Zpt and Kid T h e y d o n ' t They will start by using a finished application, like a CMS H o w c a n w e a c c o m p l i s h t h i s ? The basic things exists: Python Zope Component Architecture Zope 3 the libraries (well, soon) Grok R e p l a c e t h i s : <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> W i t h t h i s : import grok class HelloWorld(grok.Application, grok.Model): pass class Index(grok.View): pass T h e h i e r a r c h y Information Manager GUI Tools IT department Site developer The CMS/ERP Application developer Grok Component Core developer Architecture.
Recommended publications
  • Next Generation Web Scanning Presentation
    Next generation web scanning New Zealand: A case study First presented at KIWICON III 2009 By Andrew Horton aka urbanadventurer NZ Web Recon Goal: To scan all of New Zealand's web-space to see what's there. Requirements: – Targets – Scanning – Analysis Sounds easy, right? urbanadventurer (Andrew Horton) www.morningstarsecurity.com Targets urbanadventurer (Andrew Horton) www.morningstarsecurity.com Targets What does 'NZ web-space' mean? It could mean: •Geographically within NZ regardless of the TLD •The .nz TLD hosted anywhere •All of the above For this scan it means, IPs geographically within NZ urbanadventurer (Andrew Horton) www.morningstarsecurity.com Finding Targets We need creative methods to find targets urbanadventurer (Andrew Horton) www.morningstarsecurity.com DNS Zone Transfer urbanadventurer (Andrew Horton) www.morningstarsecurity.com Find IP addresses on IRC and by resolving lots of NZ websites 58.*.*.* 60.*.*.* 65.*.*.* 91.*.*.* 110.*.*.* 111.*.*.* 113.*.*.* 114.*.*.* 115.*.*.* 116.*.*.* 117.*.*.* 118.*.*.* 119.*.*.* 120.*.*.* 121.*.*.* 122.*.*.* 123.*.*.* 124.*.*.* 125.*.*.* 130.*.*.* 131.*.*.* 132.*.*.* 138.*.*.* 139.*.*.* 143.*.*.* 144.*.*.* 146.*.*.* 150.*.*.* 153.*.*.* 156.*.*.* 161.*.*.* 162.*.*.* 163.*.*.* 165.*.*.* 166.*.*.* 167.*.*.* 192.*.*.* 198.*.*.* 202.*.*.* 203.*.*.* 210.*.*.* 218.*.*.* 219.*.*.* 222.*.*.* 729,580,500 IPs. More than we want to try. urbanadventurer (Andrew Horton) www.morningstarsecurity.com IP address blocks in the IANA IPv4 Address Space Registry Prefix Designation Date Whois Status [1] -----
    [Show full text]
  • The Zope Developer's Guide (2.4 Edition)
    The Zope Developer's Guide (2.4 Edition) Chris McDonough, Michel Pelletier, Shane Hathaway Zope Developer's Guide (2.4 edition) Introduction 7 Chapter 1: Components and Interfaces 8 Zope Components 8 Python Interfaces 10 Why Use Interfaces? 10 Creating Interfaces 10 The Interface Model 12 Querying an Interface 12 Checking Implementation 13 Conclusion 14 Chapter 2: Object Publishing 15 Introduction 15 HTTP Publishing 15 15 URL Traversal 16 Traversal Interfaces 17 Publishable Object Requirements 17 Traversal Methods 17 Publishing Methods 18 HTTP Responses 19 Controlling Base HREF 19 Response Headers 20 Pre-Traversal Hook 20 Traversal and Acquisition 20 Traversal and Security 22 Basic Publisher Security 22 Zope Security 22 Environment Variables 23 Testing 23 Publishable Module 23 Calling the Published Object 24 Marshalling Arguments from the Request 24 Argument Conversion 24 Method Arguments 25 Record Arguments 26 Exceptions 27 2 Zope Developer's Guide (2.4 edition) Exceptions and Transactions 27 Manual Access to Request and Response 28 Other Network Protocols 29 FTP 29 WebDAV 30 Supporting Write Locking 30 XML-RPC 31 Summary 32 Chapter 3: Zope Products 33 Introduction 33 Development Process 33 Consider Alternatives 33 Starting with Interfaces 33 Implementing Interfaces 34 Building Product Classes 35 Base Classes 35 Acquisition.Implicit 35 Globals.Persistent 36 OFS.SimpleItem.Item 36 AccessControl.Role.RoleManager 37 OFS.ObjectManager 37 OFS.PropertyManager 37 Security Declarations 38 Summary 39 Registering Products 40 Product Initialization
    [Show full text]
  • Zope Documentation Release 5.3
    Zope Documentation Release 5.3 The Zope developer community Jul 31, 2021 Contents 1 What’s new in Zope 3 1.1 What’s new in Zope 5..........................................4 1.2 What’s new in Zope 4..........................................4 2 Installing Zope 11 2.1 Prerequisites............................................... 11 2.2 Installing Zope with zc.buildout .................................. 12 2.3 Installing Zope with pip ........................................ 13 2.4 Building the documentation with Sphinx ............................... 14 3 Configuring and Running Zope 15 3.1 Creating a Zope instance......................................... 16 3.2 Filesystem Permissions......................................... 17 3.3 Configuring Zope............................................. 17 3.4 Running Zope.............................................. 18 3.5 Running Zope (plone.recipe.zope2instance install)........................... 20 3.6 Logging In To Zope........................................... 21 3.7 Special access user accounts....................................... 22 3.8 Troubleshooting............................................. 22 3.9 Using alternative WSGI server software................................. 22 3.10 Debugging Zope applications under WSGI............................... 26 3.11 Zope configuration reference....................................... 27 4 Migrating between Zope versions 37 4.1 From Zope 2 to Zope 4 or 5....................................... 37 4.2 Migration from Zope 4 to Zope 5.0..................................
    [Show full text]
  • Letting a CMS Do the Annoying Work for You. <Librarian.Net/Talks/Nelacms>
    website 2.0! letting a CMS do the annoying work for you. <librarian.net/talks/nelacms> establishing bona fides • "rolled my own" c. 1997 • Movable Type, Blogger & Wordpress since then • Webmaster for VT Library Association (21 contribs!) • can ftp at the command line • friendly. Hi I'm jessamyn and I can't program my way out of a paper bag. Yay it's 2009 so I don't have to! Here's what I do know how to do. Back in the old days, when you wanted a website of your cat and you couldn't code or ftp, it looked like this. Remember GeoCities? In fact, the cat thing was such a tired metaphor that GeoCities used it in their PageBuilder ads. times have changed even by today's standards This worked for like... 5-10 years depending on who you are. Then things changed quickly. Now when you have a website with your cat, other people put words in her mouth. Who knew your cat was such a terrible speller? Now if your cat has a website, your cat has a blog. Or your cat has gone social. You can let other people rate your cat, submit their own cat, look at a random cat There are social networks for cats! This isn't a case of "which is better" exactly, but just that we can get computers to do some of the grunt work of presenting and maintaining content on the web. Neat. Using wordpress to run a website, for example, makes running that website easier *even if you have no dynamic content at all*! Content is king.
    [Show full text]
  • HOWTO Use Python in the Web Release 2.7.9
    HOWTO Use Python in the web Release 2.7.9 Guido van Rossum and the Python development team December 10, 2014 Python Software Foundation Email: [email protected] Contents 1 The Low-Level View 2 1.1 Common Gateway Interface.....................................2 Simple script for testing CGI.....................................2 Setting up CGI on your own server..................................3 Common problems with CGI scripts.................................3 1.2 mod_python..............................................4 1.3 FastCGI and SCGI..........................................4 Setting up FastCGI..........................................5 1.4 mod_wsgi...............................................5 2 Step back: WSGI 5 2.1 WSGI Servers.............................................6 2.2 Case study: MoinMoin........................................6 3 Model-View-Controller 6 4 Ingredients for Websites 7 4.1 Templates...............................................7 4.2 Data persistence............................................8 5 Frameworks 8 5.1 Some notable frameworks......................................9 Django.................................................9 TurboGears..............................................9 Zope.................................................. 10 Other notable frameworks...................................... 10 Index 11 Author Marek Kubica Abstract This document shows how Python fits into the web. It presents some ways to integrate Python with a web server, and general practices useful for developing web
    [Show full text]
  • The Application of Drupal to Website Development in Academic Libraries Cristina Tofan Eastern Kentucky University, [email protected]
    Eastern Kentucky University Encompass Library Faculty and Staff aP pers and Presentations EKU Libraries January 2010 The Application of Drupal to Website Development in Academic Libraries Cristina Tofan Eastern Kentucky University, [email protected] Follow this and additional works at: http://encompass.eku.edu/faculty_staff Part of the Library and Information Science Commons Recommended Citation Tofan, Cristina, "The Application of Drupal to Website Development in Academic Libraries" (2010). Library Faculty and Staff aP pers and Presentations. Paper 2. http://encompass.eku.edu/faculty_staff/2 This is brought to you for free and open access by the EKU Libraries at Encompass. It has been accepted for inclusion in Library Faculty and Staff Papers and Presentations by an authorized administrator of Encompass. For more information, please contact [email protected]. The Application of Drupal to Website Development in Academic Libraries Cristina Tofan Eastern Kentucky University Libraries 1. Introduction Academic libraries think very carefully about how they design their website, because the website is the primary avenue to provide access to resources, do library instruction, promote collections, services and events, and connect with students, faculty and potential donors. Library websites are expected to be able to respond to two major types of needs: to offer high functionality to the patrons, and to allow librarians and library staff to participate in the un‐intermediated creation and publication of content. Web content management systems are software systems that provide tools for both. In the realm of open source content management systems, Drupal has the lead compared to other systems, in its adoption in libraries.
    [Show full text]
  • Repoze Documentation Release 1.0
    Repoze Documentation Release 1.0 Agendaless Consulting, Inc. and Contributors December 12, 2014 Contents 1 Overview of the Repoze Project3 1.1 Problems Addressed...........................................3 1.2 Solutions Provided............................................3 1.3 Software Requirements and Limitations.................................3 1.4 Technology Dependencies........................................3 1.5 Licensing.................................................4 1.6 Resources.................................................4 1.7 Legacy Resources............................................4 1.8 Contributing...............................................4 2 Current Repoze Components5 2.1 WSGI Middleware............................................5 2.2 Libraries.................................................6 3 Obsolete Repoze Components9 3.1 WSGI Applications...........................................9 3.2 WSGI Middleware............................................ 10 3.3 Libraries................................................. 11 3.4 Buildout-related............................................. 11 3.5 Miscellany................................................ 11 3.6 Re-packaged Software.......................................... 12 4 History of the Repoze Project 13 4.1 Early Developments........................................... 13 4.2 Later Developments........................................... 13 5 Hacking on Repoze Components 15 5.1 Coding Standards............................................. 15 5.2 Layout and
    [Show full text]
  • Comparison of Web Server Software from Wikipedia, the Free Encyclopedia
    Create account Log in Article Talk Read Edit ViewM ohrisetory Search Comparison of web server software From Wikipedia, the free encyclopedia Main page This article is a comparison of web server software. Contents Featured content Contents [hide] Current events 1 Overview Random article 2 Features Donate to Wikipedia 3 Operating system support Wikimedia Shop 4 See also Interaction 5 References Help 6 External links About Wikipedia Community portal Recent changes Overview [edit] Contact page Tools Server Developed by Software license Last stable version Latest release date What links here AOLserver NaviSoft Mozilla 4.5.2 2012-09-19 Related changes Apache HTTP Server Apache Software Foundation Apache 2.4.10 2014-07-21 Upload file Special pages Apache Tomcat Apache Software Foundation Apache 7.0.53 2014-03-30 Permanent link Boa Paul Phillips GPL 0.94.13 2002-07-30 Page information Caudium The Caudium Group GPL 1.4.18 2012-02-24 Wikidata item Cite this page Cherokee HTTP Server Álvaro López Ortega GPL 1.2.103 2013-04-21 Hiawatha HTTP Server Hugo Leisink GPLv2 9.6 2014-06-01 Print/export Create a book HFS Rejetto GPL 2.2f 2009-02-17 Download as PDF IBM HTTP Server IBM Non-free proprietary 8.5.5 2013-06-14 Printable version Internet Information Services Microsoft Non-free proprietary 8.5 2013-09-09 Languages Jetty Eclipse Foundation Apache 9.1.4 2014-04-01 Čeština Jexus Bing Liu Non-free proprietary 5.5.2 2014-04-27 Galego Nederlands lighttpd Jan Kneschke (Incremental) BSD variant 1.4.35 2014-03-12 Português LiteSpeed Web Server LiteSpeed Technologies Non-free proprietary 4.2.3 2013-05-22 Русский Mongoose Cesanta Software GPLv2 / commercial 5.5 2014-10-28 中文 Edit links Monkey HTTP Server Monkey Software LGPLv2 1.5.1 2014-06-10 NaviServer Various Mozilla 1.1 4.99.6 2014-06-29 NCSA HTTPd Robert McCool Non-free proprietary 1.5.2a 1996 Nginx NGINX, Inc.
    [Show full text]
  • A Case for Python Scripting in Undergraduate Engineer- Ing Technology
    Paper ID #6601 A CASE FOR PYTHON SCRIPTING IN UNDERGRADUATE ENGINEER- ING TECHNOLOGY Dr. jai p agrawal, Purdue University, Calumet (Tech) Prof. Omer Farook, Purdue University, Calumet (Tech) Page 23.22.1 Page c American Society for Engineering Education, 2013 A CASE FOR PYTHON SCRIPTING IN UNDERGRADUATE ENGINEERING TECHNOLOGY Abstract This paper presents a new course in Python Programming in the undergraduate program of study in Engineering/Technology/Science. Motive behind using Python is that it is a pro- gramming language that lets interactive and quick design and effective integration with mod- ern systems. Python usage leads to immediate gains in productivity and lower maintenance costs. Python is becoming the work-horse in all new computer science activity in the modern industry. It supports multi programming paradigms, including object-oriented and structured programming. Python elegantly combines the number crunching capability like that of MATLAB with the programming ease of C based languages with a difference of better rea- dability and interactivity . The Python Programming is a 400-level, 3-credit course that contains all five components: a) the basic elements like the statements, comments, data types, data manipulation in- put/output and control flow, b) data structures like dictionaries, lists, tuples, and classes c) structured and object oriented programming methods, d) interactive graphic programming and e) the html, xml and http processing. The paper elaborates the pedagogy of classroom delivery and impact on student comprehen- sion, conceptual understanding, learning and mastering of Python philosophy. Both methods of vertical and horizontal learning methods are used in this class. All programs that students write are added to a class repertoire which the current and future students will have access to for enhanced horizontal learning.
    [Show full text]
  • A Presentation Service for Rapidly Building Interactive Collaborative Web Applications
    A Presentation Service for Rapidly Building Interactive Collaborative Web Applications SCIENTIA MANU E T MENTE A thesis submitted to the School of Computer Science University College University of New South Wales Australian Defence Force Academy for the degree of Doctor of Philosophy By Michael Joseph Sweeney 31 March 2008 c Copyright 2008 by Michael Joseph Sweeney i Certi¯cate of Originality I hereby declare that this submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at UNSW or any other educational institution, except where due acknowledgement is made in the thesis. Any contribution made to the research by colleagues, with whom I have worked at UNSW or elsewhere, during my candidature, is fully acknowledged. I also declare that the intellectual content of this thesis is the product of my own work, except to the extent that assistance from others in the project's design and conception or in style, presentation and linguistic expression is acknowledged. Michael Joseph Sweeney ii Abstract Web applications have become a large segment of the software development domain but their rapid rise in popularity has far exceeded the support in software engineer- ing. There are many tools and techniques for web application development, but the developer must still learn and use many complex protocols and languages. Products still closely bind data operations, business logic, and the user interface, limiting integration and interoperability.
    [Show full text]
  • Assessment of Content Management System Joomla and Plone for the Development of Dynamic Web Applications
    SIIPRIN Conference Proceedings Simposio Iberoamericano en Programación Informática (Ibero-American Symposium on Computer Programming) SIIPRIN’2017 Conference Paper Assessment of Content Management System Joomla and Plone for the development of dynamic web applications Valeria Andino1, Vinicio Ramos2, and Blanca Hidalgo2 1Empresa F&R Constructores, Riobamba, Ecuador 2Escuela Superior Politécnica de Chimborazo, Riobamba, Ecuador Resumen One of the tasks of content managers is to automatically perform the technical tasks of publishing on the web, which allows to control the content management for a website. This work is a compilation of the thesis of degree of its same name developed in the ESPOCH in him a performance analysis was implemented; comparing two prototypes one developed in PLONE and another in JOOMLA. The study establishes Corresponding Author: benefits, disadvantages and similarities between them. The method used was the Valeria Andino scientific inductive method that was applied to obtain and measure the results of [email protected] the performance variables. The result obtained in the comparative study, shows Received: 28 July 2017 that the content manager PLONE allows to obtain a yield of 99.92% of fulfillment, in Accepted: 5 September 2017 Published: 30 January 2018 comparison with JOOMLA with a percentage of 89.09%. Therefore, the study points to PLONE as the most efficient technology. Publishing services provided by Knowledge E Keywords: Ploone, Joomla, Dynamic web, Web Application Valeria Andino et al. This article is distributed under the terms of the Creative Commons Attribution License, which 1. Introducción permits unrestricted use and redistribution provided that the Hace algún tiempo la idea de web consistía en simplemente indicar una colección original author and source are credited.
    [Show full text]
  • Report to the National Measurement System Directorate, Department of Trade & Industry
    NPL Report CMSC 21/03 Report to the National Measurement System Directorate, Department of Trade & Industry SURVEY OF INTERNATIONAL ACTIVITIES IN INTERNET-ENABLED METROLOGY Dr D Rayner May 2003 Survey of International Activities NPL Report CMSC 21/03 SURVEY OF INTERNATIONAL ACTIVITIES IN INTERNET-ENABLED METROLOGY Dr D Rayner Centre for Mathematics and Scientific Computing May 2003 Abstract Two international meetings have been held during 2002 on the subject of Internet-enabled Metrology, supported by the NMS Software Support for Metrology programme and the MetroNet thematic network. The first was a MetroNet workshop held at NMi in Delft on 15 May 2002 and the second was held at NPL on 18 September 2002, as the third day of the BIPM/NPL workshop on The Impact of IT in Metrology. This report gives an overview of the international activities in this field, as reported at these two meetings. In particular, it covers the activities reported by NIST (USA), PTB (Germany), NMIJ (Japan) and NMi (Netherlands). It also makes reference to the NPL activities reported at these meetings. Version 1.0 Page i of ii Survey of International Activities NPL Report CMSC 21/03 © Crown Copyright 2003 Reproduced by Permission of the Controller of HMSO ISSN 1471-0005 National Physical Laboratory Queens Road, Teddington, Middlesex, TW11 0LW Extracts from this report may be reproduced provided the source is acknowledged and the extract is not taken out of context. Approved on behalf of the Managing Director, NPL by Dr Dave Rayner Head of Centre for Mathematics and Scientific Computing Version 1.0 Page ii of ii Survey of International Activities NPL Report CMSC 21/03 CONTENTS 1 Introduction ....................................................................................................................
    [Show full text]