Plone 3 Products Development Cookbook

70 simple but incredibly effective recipes for creating your own feature rich, modern Plone add-on products by diving into its development framework

Plone 3 Products Development Cookbook

Cookbook
Juan Pablo Giménez, Marcos F. Romero

70 simple but incredibly effective recipes for creating your own feature rich, modern Plone add-on products by diving into its development framework
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Want this title & more? Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.
+ Collection
Free sample

Book Details

ISBN 139781847196729
Paperback388 pages

About This Book

  • Create custom content types, add utilities, and internationalize your applications using Plone products
  • Manage site installation, configuration, and customization with code instead of manual actions that are likely to be forgotten
  • Guarantee your code operation and performance by including automatic testing and caching techniques
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible.

Who This Book Is For

This book is for programmers who have some knowledge of Python, Plone, and Zope. If you want to develop feature-rich add-on products in Plone, this book is for you. It is aimed at the development of backend features, so you need not have other web-related skills such as HTML, CSS, or JavaScript.

Table of Contents

Chapter 1: Getting Started
Introduction
Installing Python on Linux
Installing Plone on Linux
Installing Plone on Windows
Checking out code from a version controlsystem
Creating a Plone site
Chapter 2: Using Development Tools
Introduction
Accessing an IPython powered shell
Taking advantage of an enhanced interactive Python debugger with ipdb
Discovering Zope/Plone APIs and docstrings with DocFinderTab
Opening an online Python shell on Plone using Clouseau
Debugging Zope exceptions with PDBDebug Mode
Applying code changes on-the-fly using plone.reload
Chapter 3: Creating Content Types with ArchGenXML
Introduction
Installing ArchGenXML
Configuring ArgoUML
Creating a model
Generating code
Customizing generated code
Installing the product
Automatically installing products in your Zope instance
Chapter 4: Prevent Bugs through Testing
Introduction
Working with paster-generated test suites
Creating a test suite with ArchGenXML
Creating doctests with iPython
Zope functional testing
Using Selenium functional tests
Chapter 5: Creating a Custom Content Type with Paster
Introduction
Creating an Archetypes product with paster
Adding a content type into a product
Changing the base class in paster content types
Adding fields to a content type
Adding a custom validator to a content type
Modifying the view of a content type with jQuery
Chapter 6: Creating Lightweight Content Types
Introduction
Creating a product package structure
Creating a folderish content type
Creating the user interface for Zope 3 content types
Creating content types with Dexterity
Chapter 7: Improving Product Performance
Introduction
Installing CacheFu with a policy product
Improving performance by tweaking expensive code
Testing server load and benchmarking our code
Chapter 8: Internationalization
Introduction
Adding i18ndude support to ArchGenXML
Installing i18ndude standalone
Using i18ndude
Using Placeless Translation Services for i18n support
Using zope.i18n approach
Overriding others' translations
Using i18n with ArchGenXML
Using i18n with paster-created products
Adding i18n support to any product
Translating content
Setting language options
Chapter 9: Adding Security to your Products
Introduction
Creating a new permission
Adding a new role
Adding user groups
Testing security customizations
Protecting operations with permissions
Managing security with workflows
Adding configuration options in Plone control panel
Chapter 10: Improving User Interface with KSS
Introduction
Preparing a form to take full advantage of KSS
Changing end user pages with client-side KSS
Submitting data via AJAX
Chapter 11: Creating Portlets
Introduction
Creating a portlet package
Customizing a new portlet according to our requirements
Testing portlets
Assigning portlets automatically
Chapter 12: Extending Third-Party Products
Introduction
Using skin layers
Overriding Zope 3 components
Customizing Zope 3 browser templates and files
Subscribing to others' events
Using the ZCA to extend a third-party product: Collage
Chapter 13: Interacting with other Systems: XML-RPC
Introduction
Creating a configuration form
Registering a local utility
Registering a global utility
Chapter 14: Getting our Products ready for Production
Introduction
Installing and configuring an egg repository
Submitting products to an egg repository
Writing a production buildout

What You Will Learn

  • Set up a news website with many banners hosted in OpenX and get to know about all the tools you must have before starting any project
  • Easily detect and debug existing errors in the code by installing some special tools such as IPython, ipdb, and PDBDebugMode among others
  • Create a new content type (based on an existing one) using ArchGenXML and wrap the final product into a Python egg
  • Create a new content type from scratch automatically using paster
  • Complement your content types by placing related information in new portlets and manage these portlets
  • Improve the performance of your product by creating lightweight content types and taking advantage of other features of Plone
  • Secure some tasks and content types by setting permissions, roles, groups, workflows and configuration options
  • Protect the operation of your code from accidental changes by setting up some automatic tests such as unit tests, functional tests, and integration tests
  • Easily translate your website by using internationalization facilities in Plone
  • Display your final web page as per your requirement by adding new features to existing third-party products
  • Integrate your products with external software like Python packages or other systems via XML-RPC
  • Improve the user interface by creating simple client-side visual changes and server-side manipulation of objects with KSS

In Detail

The Plone Content Management System is one of the best open source CMS, because by using Plone's development framework you can extend its functionality according to the specific requirements of your website. The Plone framework has lots of components that can be used to create add-ons or extensions called Plone Products. You can optimize your site for improved usability, accessibility, and security by creating custom Plone products.
This book covers recipes that will help you create custom Plone Products and implement them on your website. Every topic covered in this book is accompanied by essential fundamentals and step-by-step explanation that will help you understand it better. With the help of this book you will be able to create custom Plone products that are well suited for your website.

You can read the whole book or just pick recipes relevant for you; cross references help you understand the recipes even if you do not read them in order.

If you work through the book in order, you will start by setting up an example project of a news website that will be developed throughout the book. You will learn about all of the necessary tools a Plone developer must have before starting any project. You will develop the website further by detecting problems and debugging them. You will be able to modify code on-the-fly or get help on how to do some tasks by installing and using special tools such as IPython, ipdb, and PDBDebugMode. You will then create a new content type, based on an existing one, and wrap the final product into a Python egg.

You will set up automated testing to prevent errors in code that have evolved in the development stage. You will use paster to automatically create a new custom content type from scratch. You will improve the performance of your application by creating lightweight content types and following other recipes covered in this book. Key features such as usability, internationalization, accessibility and security are covered to make sure that your development and customizations will be at the level of Plone core and its most remarkable add-on products.

You will improve your user interface by creating simple client-side visual changes and server-side manipulation of objects. You will learn to create and manage portlets by using Portlet manager and customize your website by modifying third-party products. Finally you will learn to communicate with an external non-Python-based system and make your products available for future use.

Authors

Table of Contents

Chapter 1: Getting Started
Introduction
Installing Python on Linux
Installing Plone on Linux
Installing Plone on Windows
Checking out code from a version controlsystem
Creating a Plone site
Chapter 2: Using Development Tools
Introduction
Accessing an IPython powered shell
Taking advantage of an enhanced interactive Python debugger with ipdb
Discovering Zope/Plone APIs and docstrings with DocFinderTab
Opening an online Python shell on Plone using Clouseau
Debugging Zope exceptions with PDBDebug Mode
Applying code changes on-the-fly using plone.reload
Chapter 3: Creating Content Types with ArchGenXML
Introduction
Installing ArchGenXML
Configuring ArgoUML
Creating a model
Generating code
Customizing generated code
Installing the product
Automatically installing products in your Zope instance
Chapter 4: Prevent Bugs through Testing
Introduction
Working with paster-generated test suites
Creating a test suite with ArchGenXML
Creating doctests with iPython
Zope functional testing
Using Selenium functional tests
Chapter 5: Creating a Custom Content Type with Paster
Introduction
Creating an Archetypes product with paster
Adding a content type into a product
Changing the base class in paster content types
Adding fields to a content type
Adding a custom validator to a content type
Modifying the view of a content type with jQuery
Chapter 6: Creating Lightweight Content Types
Introduction
Creating a product package structure
Creating a folderish content type
Creating the user interface for Zope 3 content types
Creating content types with Dexterity
Chapter 7: Improving Product Performance
Introduction
Installing CacheFu with a policy product
Improving performance by tweaking expensive code
Testing server load and benchmarking our code
Chapter 8: Internationalization
Introduction
Adding i18ndude support to ArchGenXML
Installing i18ndude standalone
Using i18ndude
Using Placeless Translation Services for i18n support
Using zope.i18n approach
Overriding others' translations
Using i18n with ArchGenXML
Using i18n with paster-created products
Adding i18n support to any product
Translating content
Setting language options
Chapter 9: Adding Security to your Products
Introduction
Creating a new permission
Adding a new role
Adding user groups
Testing security customizations
Protecting operations with permissions
Managing security with workflows
Adding configuration options in Plone control panel
Chapter 10: Improving User Interface with KSS
Introduction
Preparing a form to take full advantage of KSS
Changing end user pages with client-side KSS
Submitting data via AJAX
Chapter 11: Creating Portlets
Introduction
Creating a portlet package
Customizing a new portlet according to our requirements
Testing portlets
Assigning portlets automatically
Chapter 12: Extending Third-Party Products
Introduction
Using skin layers
Overriding Zope 3 components
Customizing Zope 3 browser templates and files
Subscribing to others' events
Using the ZCA to extend a third-party product: Collage
Chapter 13: Interacting with other Systems: XML-RPC
Introduction
Creating a configuration form
Registering a local utility
Registering a global utility
Chapter 14: Getting our Products ready for Production
Introduction
Installing and configuring an egg repository
Submitting products to an egg repository
Writing a production buildout

Book Details

ISBN 139781847196729
Paperback388 pages
Read More

Recommended for You

Professional Plone 4 Development
$ 35.99
Practical Plone 3: A Beginner's Guide to Building Powerful Websites
$ 19.50
Building Websites with Plone
$ 0.00