Professional Plone Development

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

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.

Author(s): Martin Aspeli
Publisher: Packt Publishing
Year: 2007

Language: English
Pages: 420

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