Book Image

Plone 3 for Education

Book Image

Plone 3 for Education

Overview of this book

Plone enables your faculty and staff to manage their own web sites, but some assembly is still required. How do you represent courses online? What about assignment schedules, lecture podcasts, and collaborative spaces? That's where this book comes in-it takes the burden of routine updates off your web team by harnessing the world's most advanced free content management system. This is the school web team's missing manual. Through step-by-step examples covering 11 common educational use cases, you'll learn how to take the box of parts provided by Plone, combine them with best-of-breed third-party plug-ins, and turn out a dynamic web environment that will be a joy to use for faculty, enhance staff productivity, and engage the student body. Plone is powerful but complex. Its ease of use for end users belies a wealth of under-the-hood features and third-party add-ons that are time-consuming for back-end web teams to sort through. The book guides you on proven paths through the forest of potential that you encounter during design and deployment, starting you with reasonable choices for each of 11 common education-domain use cases. Each one enumerates the value it brings to your site and guides you step-by-step through an implementation suitable for the vast majority of cases, meaning you can spend your time addressing the unique needs of your institutionñnot reinventing the wheel.
Table of Contents (15 chapters)
Plone 3 for Education
Credits
About the Author
About the Reviewers
Preface

Introducing schemaextender


Starting in Plone 3, Archetypes provides an opportunity for third-party code to modify schemas on the fly. It exposes a point of adaptation here, in BaseObject, one of the most foundational subclasses of every content type:

1 class BaseObject(Referenceable):
2 # (some code omitted here)
3
4 def Schema(self):
5 """Return a (wrapped) schema instance
6 for this object instance.
7 """
8 schema = ISchema(self)

9 return ImplicitAcquisitionWrapper(schema, self)

Line 8 is where the magic happens. This line has always determined the schema, but the ISchema adapter lookup—which essentially says "Find me the preferred chunk of code that knows how to compute schemas."—is new. We'll discuss adaptation itself shortly, but the upshot is that third-party code has the opportunity to plug in its own ways of determining schemas—in our case, to say "Insert a few new fields here."

Without further clever tricks, there's only room for one piece of code to plug in a schema-determiner...