You are previewing Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System.
O'Reilly logo
Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System

Book Description

This book teaches Plone development best practices, focusing on Plone 3.0. It covers setting up a development environment, customizing Plone's look and feel, creating new content types and forms, connecting to external databases, managing users and groups intelligently, configuring a production-ready server, LDAP authentication, and caching. Aimed at developers wanting to leverage the proven user interface and flexible infrastructure of this open-source Content Management System, it takes a pragmatic approach, building a realistic example application whose code is included with the book. Built on the Zope application server and written in Python, Plone makes it easy for content authors to create and edit web content, and is also used by developers as a framework to build content-centric web applications like dynamic websites and intranets. Readers need familiarity with Python and basic web technologies such as HTML and CSS, and would also benefit from prior Zope/ Plone experience.

Table of Contents

  1. Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System
    1. Table of Contents
    2. Copyright
    3. Credits
    4. Foreword
    5. About the Author
    6. About the Reviewers
    7. Preface
      1. What This Book Covers
      2. Who This Book is For
      3. Conventions
      4. Reader Feedback
      5. Customer Support
        1. Downloading the Example Code for the Book
        2. Errata
        3. Questions
    8. 1. Getting Ready
      1. 1. Plone in Context
        1. A Brief History
        2. Competition
        3. Plone-the-Application and Plone-the-Framework
        4. Additional Considerations when Deciding on Plone
        5. Licensing
        6. The Plone Community, and Why You Belong There
        7. Summary
      2. 2. The Case Study
        1. High-Level Requirements
        2. Modeling and Mock-Ups
        3. Running the Project
        4. Summary
      3. 3. The Development Environment
        1. Prerequisites
        2. Quick Start
        3. Glossary
        4. Creating a Zope Instance Manually
        5. Understanding Eggs and Setuptools
          1. Installing Eggs
        6. Automating the Build Process with zc.buildout
          1. Installing Paste Script and ZopeSkel
          2. Creating and Customizing the Buildout
            1. The Buildout Configuration File
            2. The Buildout Directory
          3. Avoiding Duplication between Buildouts
        7. Additional Development Tools
        8. Learning to Help Yourself
          1. Use the Source, Luke!
          2. Become Familiar with the Debugger
          3. Write Tests for Everything
        9. Summary
    9. 2. Customizing Plone
      1. 4. Customization Basics
        1. Persistent Settings and the ZODB
        2. Configuration Using GenericSetup
          1. GenericSetup and the Add/Remove Products Control Panel
        3. Acquisition and Skin Layers
        4. Overriding Zope 3 Components
        5. Customization Best Practices
          1. Using Source Control
          2. Writing Tests
          3. Migration of Persistent State
        6. Summary
      2. 5. Developing a Site Strategy
        1. Creating a “Policy Product”
          1. Creating an Extension Profile
          2. Writing Tests for Customizations
          3. Making a Change with the Extension Profile
          4. Installation through the Web
        2. Information Architecture
        3. Summary
      3. 6. Security and Workflow
        1. Security Primitives
          1. Users and Groups
          2. Permissions
          3. Roles
          4. Manipulating Permissions and Roles Programmatically
        2. Keeping Control with Workflow
          1. Using Workflow from Python
        3. Custom Workflow Installation
          1. Designing a New Workflow
          2. Amending the Policy Product
          3. Writing the Tests
        4. Protected and Trusted Code
          1. Restricted Python
        5. Summary
      4. 7. Using Add-on Products
        1. Finding and Evaluating Products
        2. Playing it Safe
        3. Installing a Product
          1. Adding RichDocument
        4. Summary
      5. 8. Creating a Custom Theme
        1. Background
        2. The Theme Package
          1. Adding a Test to the Policy Product
          2. Theme Product Contents
        3. Tools and Techniques
          1. Building the Theme
        4. Custom CSS Style Sheets
          1. Using “base_properties” and DTML Variables in Style Sheets
        5. Image Resources
        6. Managing Viewlets
          1. Defining Viewlet Managers
          2. Reassigning Viewlets
          3. Creating New Viewlets
        7. Overriding Visual Elements
          1. Templates and Other Resources in Skin Layers
          2. Zope 3-Style Browser Views
          3. Viewlets
          4. Portlets
        8. Summary
    10. 3. Developing New Functionality
      1. 9. Nine Core Concepts of Zope Programming
        1. 1. 1. Object Publishing and Traversal
          1. Containment
          2. Acquisition Chains
          3. Path Traversal
        2. 2. 2. ZODB Persistence
          1. Transactions
          2. Object Persistence
        3. 3. 3. Searching Objects Using the Catalog
        4. 4. 4. Describing Functionality with Interfaces
          1. Using Interfaces in Catalog Searches
        5. 5. 5. Component Configuration with ZCML
        6. 6. 6. Component Registries Using Utilities
          1. Global Utilities
          2. Named Utilities
          3. Local Utilities
          4. Tools
        7. 7. 7. Aspect-oriented Programming with Adapters
          1. Multi-adapters
          2. Named Adapters
          3. Adapter Factories
        8. 8. 8. Views and Other Presentation Components
          1. Content Providers and Viewlets
        9. 9. 9. Synchronous Events
          1. Object Events
        10. Summary
      2. 10. Custom Content Types
        1. Content-Centric Design
        2. Package Layout
        3. Modeling with Interfaces
        4. Using the Archetypes Framework
          1. Content Base Classes
          2. Schemata, Fields, and Widgets
            1. Vocabularies
            2. Reference Fields
            3. Field and Object Validation
          3. The Class Generator
          4. Field Properties
          5. Content Security
          6. Views and Browser Resources
            1. Icons and Style Sheets
            2. Main Content Views
            3. Inline Editing
            4. Edit Forms, Add Forms, and Events
          7. Installing and Registering Types
            1. Factories and Add Permissions
            2. Registering Content Types with the Factory Tool
            3. Adding Catalog Indexes and Metadata Columns
        5. Installation and Configuration in the Policy Product
          1. Adjusting the Security Policy
          2. Adjusting Navigation Tree Properties
          3. Enabling Content Object Versioning
          4. Site Policy Tests
        6. Functional Tests
        7. Creating a New Portlet
          1. Configuring and Registering New Portlet Types
          2. Assigning Portlets Automatically
        8. Zope 3, Formlib, and the Role of Archetypes
        9. Summary
      3. 11. Standalone Views and Forms
        1. Pages Without a Specific Context
          1. Templates in Skin Layers
          2. Views Available on All Objects
          3. Views on the Portal Root
          4. Invoking Standalone Pages
        2. Writing Custom Forms
          1. Checking Form Submit Buttons
          2. Form Input Converters
          3. Performing Redirects
        3. Automatically Generating Forms
        4. The Form Controller Tool
        5. Forms in Viewlets
        6. Global Template Variables and Helper Views
        7. Summary
      4. 12. Relational Databases
        1. Relational Databases vs. the ZODB
        2. Modeling Screenings and Reservations
          1. Screening Query and Reservation Services
        3. Setting Up the Database
        4. SQLAlchemy—Turning SQL Lead into Python Gold
        5. Managing Database Connections
          1. Making a New Plone Control Panel
        6. Writing the Database Utilities
          1. Database Tests
          2. Querying the Database
          3. Updating and Inserting Records
        7. Adding the User Interface
          1. Updating the Film and Cinema Views
          2. Screenings and Bookings
        8. Summary
      5. 13. Users and Their Permissions
        1. Defining a Membership Policy
          1. Updating the Site Policy Product
          2. Managing Member Metadata
        2. Collaborative Workspaces
        3. Advanced Member Management Options
          1. The Pluggable Authentication Service
          2. Membrane and Remember
        4. Summary
      6. 14. Rich User Interfaces with KSS
        1. Understanding KSS
        2. KSS-Enabling Film Ratings
          1. The Kinetic Style Sheet
          2. Page Template Markup
          3. Server-Side Logic
          4. Debugging KSS
          5. Tests for KSS Commands
        3. A Brief KSS Reference
          1. Kinetic Style Sheet Syntax
            1. Standard Events
            2. Client-Side Actions
            3. Parameter Functions
          2. Server-Side Commands
          3. The ‘core’ Command Set
          4. The ‘zope’ Command Set
          5. The ‘plone’ Command Set
        4. KSS-Enabling the “my cinema” Functionality
        5. Summary
      7. 15. Next Steps
        1. Our Achievements So Far
        2. Additional Functionality
          1. Discussion and Participation
          2. Additional Reporting
          3. More Advanced Ticketing
          4. New Content Types
          5. Internationalization
            1. Translating Content
            2. Translating User Interface Strings
        3. Summary
    11. 4. Real-world Deployments
      1. 16. Server Management
        1. Deployment Checklist
        2. Zope Enterprise Objects
        3. A Deployment Buildout
        4. Moving the Code and Database to a Live Server
        5. Zope as a Service
        6. Backups and Database Maintenance
        7. Summary
      2. 17. Setting Up a Production Server
        1. Virtual Hosting
          1. Using Zope Only
          2. Zope behind Apache
            1. Configuring Virtual Hosting and RewriteRules in Apache
        2. Caching
          1. Setting Up CacheFu
            1. Caching the Optilux Content Types and Views
          2. Using Varnish as a Caching Reverse Proxy
            1. Adjusting the Apache Configuration
            2. Varnish via Buildout
          3. Benchmarking
        3. Summary
      3. 18. Authenticating with LDAP
        1. LDAP and Active Directory
          1. Setting up a Test Environment
        2. Connecting Plone to an LDAP Repository
          1. Configuring PAS Plug-ins Manually
        3. Summary
      4. 19. Looking to the Future
        1. Making Future Releases
          1. Managing Migrations
          2. Migration Profiles
        2. Our Achievements
        3. Where to Go Next
        4. Summary
    12. Index