Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Professional Plone 4 Development
Professional Plone 4 Development

Professional Plone 4 Development: Build robust, content-centric web applications with Plone 4.

eBook
€8.99 €39.99
Paperback
€48.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Professional Plone 4 Development

Chapter 4. Basics of Customization

To a certain extent, all we ever do when we use Plone-the-platform is to customize Plone-the-product. Sometimes, that means building a system that barely resembles "out-of-the-box" Plone; other times, it simply means adding a few bells and removing a few unnecessary whistles.

In this chapter, we will cover the main types of customization that Plone supports, including:

  • Persistent settings in the ZODB
  • GenericSetup configuration
  • CMF Skin layers
  • The Zope Component Architecture

Starting with the next chapter, these techniques will be explained more fully and put into practice in the context of the Optilux Cinemas case study.

Persistent settings and the ZODB

The first type of customization most developers come across is in the form of settings exposed by various Zope Management Interface screens and Plone control panels. Sometimes, they may also build applications that depend on particular content items or site structure. In both cases, part of...

Chapter 5. Developing a Site Strategy

In the previous chapter, we learned about ways in which a developer can customize Plone changing the source code of Plone itself. We will now employ some of these techniques as we begin the process of turning an out of the box Plone installation into the site that will become the Optilux Cinemas website.

In this chapter, we will:

  • Create the initial version of a policy package that will help us customize Plone to meet the requirements from Chapter 2, Introduction to the Case Study
  • Add a GenericSetup extension profile to this package
  • Write our first tests to prove that our customizations are working as expected

Creating a policy package

Our policy package is just a package that can be installed as a Plone add-on. We will use a GenericSetup extension profile in this package to turn a standard Plone installation into one that is configured to our client's needs.

Note

We could have used a full-site GenericSetup base profile instead, but by using a...

Chapter 6. Security and Workflow

Security should never be an afterthought when building web applications. Zope and Plone provide a robust and flexible security model that lets us worry about our application logic instead of thinking too much about how to lock it down, so long as we understand a few basics.

In this chapter, we will:

  • Explain the building blocks of Zope security: users, roles, and permissions
  • Demonstrate the use of workflow, the primary mechanism for managing permissions in Plone
  • Build a custom workflow for the Optilux website and add it to the policy package we created in the previous chapter.
  • Discuss the differences between protected and trusted Python code in Zope

Security primitives

Zope's security is declarative: views, actions, and attributes on content objects are declared to be protected by permissions. Zope takes care of verifying that the current user has the appropriate access rights for a resource. If not, an AccessControl.Unauthorized exception will be...

Chapter 7. Using Add-ons

Throughout this book, we aim to develop reusable components. Of course, it is not very likely that someone else would want to reuse the Optilux site theme or policy, but developing for reusability encourages good practice. Besides, the client could come back next year wanting another site with the same basic look-and-feel.

Plone developers have created add-ons that do everything from making small improvements to core content types, to providing new functionality like forums, blogs, and database integration tools. Sometimes, developers will factor components built for customers into a reusable base package and another with customer-specific integration code. In the spirit of the Plone community, the vast majority of these packages are made available free under open source licenses.

In this chapter, we will:

  • Discuss how to find, evaluate, and test Plone add-ons
  • Demonstrate how to include PloneFormGen, a popular form building tool in the Optilux application
  • Issue...

Chapter 8. Creating a Custom Theme

Plone 4 ships with a default theme called Sunburst. This is designed to be clean, color neutral, and minimalist, and as such can be a good starting point for intranets and websites where branding is a secondary concern. Most projects, however, end up needing to customize the look and feel to meet organizational branding requirements.

In this chapter, we will demonstrate how to:

  • Create a custom theme using the Diazo theming engine and plone.app.theming
  • Customize templates and views
  • Override a few of Plone's layout policies and visual elements

Background

In Plone 3, theming a Plone site involved selectively overriding page templates and resources such as stylesheets and images to modify the markup, styles, and images making up Plone's public face. This approach to theming is still possible in Plone 4, but it suffers from a fundamental problem—the more complex Plone's internals become, the harder it is to find all the templates and...

Left arrow icon Right arrow icon

Key benefits

  • The very first book on the newly released Plone version 4.
  • Learn how - and when - the professionals use Plone
  • Master the latest Plone technologies
  • Put theory into practice with a realistic case study built from chapter to chapter.
  • Written by Martin Aspeli, one of the Plone project’s most prolific core developers and responsible for several R&D efforts relating to Plone 4.0; and with a Foreword by Eric Steele, the Plone Release Manager.

Description

A years of experience in Plone development and project management are combined with an approachable writing style to create an engaging and highly-informative guide to working with Plone. Professional Plone 4 Development stands as an excellent resource for developers of all levels. - Eric Steele, Plone Release Manager Plone is a web content management system that features among the top 2% of open source projects and is used by more than 300 solution providers in 57 countries. Its powerful workflow system, outstanding security track record, friendly user interface, elegant development model and vibrant community makes Plone a popular choice for building content-centric applications. By customising and extending the base platform, integrators can build unique solutions tailored to specific projects quickly and easily.If you want to create your own web applications and advanced websites using Plone 4, Professional Plone 4 Development is the book you need.The https://www.packtpub.com/Professional-Plone-web-applications-CMS/book first edition of this book remains one of the most widely read and recommended Plone books. This second edition is completely revised and up-to-date for Plone 4.1, covering new topics such as Dexterity, Diazo, jQuery and z3c.form, as well as improved ways of working with existing technologies such as Buildout, SQLAlchemy and the Pluggable Authentication Service. It retains the writing style and comprehensive approach that made the first edition so popular. Built around a realistic case study, Professional Plone 4 Development will take you from an understanding of Plone’s central concepts, through basic customization, theming, and custom development, to deployment and optimization. The book is divided into four sections: First, you will be introduced to Plone and the case study, and learn how to set up a development environment. The second section covers basic customization, including theming a Plone site using Diazo. The third section focuses on custom development – building new content types and user interfaces, customizing security and integrating with external databases. The final chapters cover deployment and performance optimization.

Who is this book for?

This book assumes that the reader is familiar with Plone from the point of view of an administrator or power user, has a basic understanding of web application development, and is comfortable with the Python programming language.

What you will learn

  • Setting up a productive development environment
  • Basics of Plone customisation and extension
  • Theming a Plone site using Diazo and plone.app.theming
  • Core concepts that underpin the workings of Zope and Plone
  • Creating custom content types using Dexterity
  • Building views and forms, including the use of z3c.form
  • Integrating with relational databases using SQLAlchemy
  • Customising the management of users and groups with PAS
  • Creating rich user interfaces with jQuery and jQuery Tools
  • Deploying and optimizing a production-ready Plone server
  • Integrating with LDAP and Active Directory

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 26, 2011
Length: 516 pages
Edition : 1st
Language : English
ISBN-13 : 9781849514422
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 26, 2011
Length: 516 pages
Edition : 1st
Language : English
ISBN-13 : 9781849514422
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 130.97
Advanced Penetration Testing for Highly-Secured Environments: The Ultimate Security Guide
€48.99
Responsive Web Design with HTML5 and CSS3
€32.99
Professional Plone 4 Development
€48.99
Total 130.97 Stars icon
Banner background image

Table of Contents

5 Chapters
I. Getting Ready Chevron down icon Chevron up icon
II. Customizing Plone Chevron down icon Chevron up icon
III. Developing New Functionality Chevron down icon Chevron up icon
IV. Real-world Deployments Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(9 Ratings)
5 star 44.4%
4 star 44.4%
3 star 0%
2 star 0%
1 star 11.1%
Filter icon Filter
Top Reviews

Filter reviews by




Vincent Fretin Nov 20, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This second edition is up to date with the latest and best practices of Plone 4.1, as well as other technologies that will land in next Plone versions.For the readers of the first version of the book based on Plone 3, you will recognize the case study used throughout the book: the Optilux Cinema application.The technologies covered by new chapters are (not exhaustive list) :- Dexterity content types- theming with Diazo/plone.app.theming and viewlets templates overrides with plone.app.themingplugins (which uses z3c.jbot underneath)- an enquiry form with the z3c.form library,- relation database development with SQLAlchemy for the "reservations of ticket and reporting" use case.An advanced subject like how to log in with a Facebook account by writing a plugin for the Zope PAS (Pluggable Authentication Service) that uses OAuth API and Beaker with collective.beaker for caching is also covered.Of course, throughout the book, you will write tests with the new plone.app.testing library instead of the old Products.PloneTestCase.New tools are mentioned like mr.developer used to checkout packages, jarn.mkrelease to make the releases, z3c.checkversions to check for new package versions.In the chapter entitled "Nice Core Concepts of Zope Programming", Martin explains among other thing object traversal, all you have to know about acquisition (implicit, explicit, chains), catalog search and how to use catalog brains efficiently. This is a refreshing remainder, even for me.The concepts of the Zope Component Architecture are well explained with understandable examples.It is a must-have in your books collection. I'm sure, you will find this book useful. Always keep it near you, so you can quickly look for a given example when developing your own project.
Amazon Verified review Amazon
Nejc Zupan Dec 08, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Short summaryIf you are doing Plone 4 development, go buy this book. Now.Some backgroundI started working with Plone in 2006. Back then I was really just beggining with development in general and did not know how to do things properly. I only knew how to tweak some templates and to use ArchGenXML to generate some content types. No version control, no tests, no nothing.Then Professional Plone 3 Development came. "Wow, I'm doing things seriously wrong" was my first reaction. That booked steered me in the direction of using Subversion to control my source code, writing tests to prove my code doesn't break in various places, using pdb - the Python debugger, deploying Plone sites myself, etc.Plone 3 vs. Plone 4However, Plone 3 was complicated. There were all these new technologies and concepts that you now had to use. That's not bad in itself, but those technologies only delivered part of the story. You still had to use old ways to do certain tasks. Plone's learning wall was higher than ever.With Plone 4, these technologies are not new anymore. They are polished and widely used. You only need to learn one way to do something, not three. As a consequence of this, Plone is now easier to learn. Plone's development process is cleaner, more defined, with better tools. The new book from Martin is the same: less history overhead, more confidence in newer, better tools and concepts.PP4DHaving in mind how much Martin's previons book improved my development process I was so stoked when I heard him announcing that he started writing an updated version. After waiting for many months, it's finally out. Bigger, better, more up-to-date. Unlike how Plone 4 is leaner than Plone 3, the new book packs a hundred more pages of insights into efficient development and deployment process. It starts with introductory chapters where the author shows you how to prepare basic project specification. Then it goes over preparing your development environment for productive work. I cannot stress enough how important a well prepared environment is. Having tools pointed out in the book at your fingertips when things go wrong is just godsent. What follows is how to write actual code. Several chapters, full with examples of code that you can use in your own projects. I really like how all examples come with tests to really show developers that tests are an important part of your development process. Finally, there's deployment. These chapters show you how to properly deploy and maintain your Plone site and gives you pointers on how to scale your deployment when your projects starts getting more attention.The information Martin gives is in accordance with latest best practices developed in the Plone community. Even if you are a seasoned Plone developer I'm sure you will find at least a few useful tricks and tools that you don't yet use and will grow to love them as soon as you do. I know I did!
Amazon Verified review Amazon
Stephen McMahon Sep 11, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Martin Aspeli's Professional Plone 4 Development is the most-anticipated Plone book since Martin's earlier Professional Plone 3 Development. For Plone developers, it pretty much goes without saying that Martin is an outstanding technical writer, and that his documentation of Plone's development environment is definitive.What got my attention about PP4D was that the contrast between it and PP3D is very much like the contrast between Plone 4 and Plone 3.Plone 4 does more than Plone 3, and Martin's book is bigger and has new chapters and sections to cover the new features. But Plone 4 is also sleeker and faster than 3. Its parts fit together better, and it's more approachable to new users and integrators.Martin shows us that the same is true for Plone 4 development. Both the Plone 4 development environment and the PP4D book make more sense than their Plone 3 counterparts. The parts fit together better. Plone 3 development required that you know, and practice, both new (Zope 3 style) and old (Archetypes) development paradigms. You had to know how to use Python packages and Zope products, skins and browser views. And, I think the Plone development community (and Martin) were not really sure how these fit together and when it was best to use which.PP4D is much more confident. Dexterity (content-type development framework) and Diazo (theming system) are much better ways to develop, and Martin is able to explain them clearly without having to burden the reader with some many layers of history. PP4D, like its predecessor, is still a book for experienced, versatile programmers, but it doesn't need to make as many apologies to its audience.Professional Plone 4 Development is thus a better book than its predecessor in part because Plone 4.x is a better development platform. Martin's community leadership is -- of course -- a large part of the reason for this advance. But, the improvements are also due to the great work of the many folks on the core development and framework teams.So, Martin should take a big bow. But Hanno Schlichting, David Glick, Laurence Rowe, Eric Steele, Denys Mishunov, Rob Gietma, Alex Limi and many others should be proudly joining that curtain call. Bravo.
Amazon Verified review Amazon
adam Nov 21, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a the best book for Plone4 . I very love it. It give me huge help to develop web application using Plone. I many thank Maitin. (author of the book)
Amazon Verified review Amazon
W Boudville Sep 09, 2011
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Yesterday I reviewed a book on vtiger, vtiger CRM Beginner's Guide , which is a beginner's guide to installing and administering that package. The current book by Aspeli is a big contrast, and not because its topic is running a CMS. Aspeli writes for a developer or administrator already well versed in Plone. The text is not about using a nice easy GUI to do straightforward administration or customising tasks. Instead, it focuses on hard core programming issues. There are relatively few screen captures of a cute GUI, as an empirical indicator of this.Informally, the book is a sequel to Aspeli's text on Plone 3 - Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System. , which came out in 2007. The 4 intervening years have meant that Plone 4 has significant enhancements over Plone 3, and if you are still using the latter, consider at least perusing this book to see how you might improve the customising of your website. Likewise, Aspeli co-authored a recent [2009] book on Plone 3, Practical Plone 3: A Beginner's Guide to Building Powerful Websites . If you founds its advice germane and useful, this could be another inducement to read about the latest Plone.The book has several parts, roughly in order of increasing difficulty. The simplest is part 1, the first 3 chapters, which is an overview and explains the installation steps. Let me just say candidly that if you can't get through this part, then barring an error in the downloaded code, you shouldn't be reading this book at all, because not only can't you get to the rest of the book, but even if you could, it will likely be over your head.Part 2, chapters 4 to 8, explains how to use themes in Plone. A lot of Plone administrators will only need this part. There are many ways to alter the look and feel of Plone and of many of its other runtime characteristics. Changing the skins is the quickest way to present a unique look to your website. Separate from user interface visuals, the other main idea in these chapters is understanding the different roles in Plone. Each role is a job, like member, manager and reviewer. The table on page 109 summarises these well. Plone's developers have tried to factor out as many parameters as possible, and have these alterable by you, often via a Plone-provided window for simplicity.Part 3, chapters 9 to 15, is much harder. This is where you go to code new functionality, that is outside the default scope of part 2. The current book might be seen as an extension of Zope, where the latter is a successful web application server that is also open source. There are many references to Zope features in the narrative and in the code snippets. Chapter 9 is devoted to the key concepts of Zope. As a practical matter, it would greatly aid you to be already facile in Zope, so that chapter 9 is merely review. And perhaps consider getting an accompanying text on Zope, like this one - Web Component Development with Zope 3 . It transpires that to write new code, you need to understand the enclosing framework of Zope, because you might [actually probably will] have to step outside the current Plone 4 environment, since that is what you may want to modify.Part 4, which is the rest of the book, chapters 16 to 18, is easier than part 3. Here you tackle server deployment issues. No actual programming is likely needed. This section is mostly for the Plone administrator or the system administrator of your computers and network.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.