Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home News & views Valor and icy drinks at the Faculty/Staff Directory sprint

Posted Dec 22, 2008

Valor and icy drinks at the Faculty/Staff Directory sprint

by Erik Rose

FSD 3.0 will harness viewlets and other Zope 3 technologies.

’Twas a tale of valor and icy drinks at the Faculty/Staff Directory sprint.

Viewlets—we loveses them

We converted our presentation layer to views and viewlets. As foretold by prophecy, this lets extender authors do absolutely anything they want. It also lets site managers hide and move things around on our pages using the @@manage-viewlets UI. This branch is almost done now, and it only took us three sprints to get here! :-) Of course, Plone’s built-in framework didn’t quite have everything we needed; we had to do our own multiview lookups, which involved reading all the way down the bottom of Zope’s component resolution code.

Nesting Classifications (and everything else)

Nestability has come to Classifications, Committees, and Departments. In fact, we decided to go right over the cliff and, for 3.0, completely remove the distinctions between them. You’ll be able to make as many kinds of "grouping" objects as you wish. Every grouping object parked at the root of an FSD will simply become its own heading on a Person page, for example. Though we anticipated fear and panic at this decision, the users we consulted all asked why we hadn’t done it sooner! The nestability, along with tons of upfactoring, is on the trunk as we speak.

Utilities are the new tools

We turned the Faculty/Staff Directory tool into a utility. In doing so, we converted it from an Archetypes object to one based on Zope 3 schemas. This is the first Z3 schemas work I’ve done, and I like what I see. There’s less boilerplate to write, and general knowledge of Python leads you right instead of wrong. For example, I needed a field to contain (and validate) a regular expression. In Archetypes, I would have had to go digging through my old code to remember what to name the magical validate_myRegexField method. With schema fields, explicitness prevails: a TextLine that also has other constraints is no longer a TextLine but a subclass thereof. Make a subclass, call it RegexLine, stick a constraint() method on it, and you have something more reusable and lexically localized than an Archetypes validator.

Just converting the tool to a utility wholesale is a first step; the next is to break it into several smaller ones which can be individually overridden. This will let people replace our email obfuscation with their own—a common request—without having to monkeypatch.

Finally, I see this as a Zope-3-schemas spike for the whole project; if it continues to go well, we might eventually convert the core content types. I’m within a day or three of merging this branch.

Curricula vitae

Representation of publications has been on the drawing board for some time now. Since we’ve taken so long to deliver something “official”, everyone’s gone off and rolled their own as extenders: so far, there are Andreas Jung’s fsd.cmfbibliographyat, a lighter-weight version at Universidad Nacional Autónoma de México, and a nebula of specs coalescing at the University of Washington. Gathering most of the players in the same room, it became clear that some people want lightweight, some people want to go all-out, and no one size fits all. Thus, we made plans for an abstraction layer (maybe a collection of interfaces?) to let site managers plug in whatever representations of publications (with whatever complexities) they wish. This itself might manifest as an extender; we shall see.

Microformats

Rob Porter added microformat support to our Person pages. Now cool Firefox plugins can automatically scrape contact info and throw it in your address book.

An unusual sprint

It was kind of an strange sprint, in that everybody worked on almost everything. I think 3 things contributed to this:

  • One group would get stuck, and somebody would run over to help, often staying after the problem was solved.
  • Most people were interested in more than one thing, which fueled the above.
  • We primarily worked in pairs, but we had an odd number of sprinters, which created some helpful instability.

At any rate, it was tremendously healthy. Since the task groups were so fluid, we had better communication between them than I’ve seen at a sprint, and we’re already reaping the fruits in easier merges: there’s hardly any Conway-style fragmentation.

Credits

These people rock:
  • Gildardo “The open wireless from the restaurant a block away works better” Bautista
  • Federico “It’s snowing outside. Why is there ice in my drink?” Cazarez
  • Cris “Is there a reason you can’t nest these?” Ewing
  • Mike “Go ahead, make my sprint” Halm
  • Vladimir “CV Master” Melendez
  • Craig “That’ll break the table headers” Haynal
  • Rebecca “Don’t you plan on buying the tickets before you fly out?” McCloskey
  • Rob “Eviscerate IE 6 with a spoon” Porter
  • Eric “Is it lunchtime yet?” Steele
  • Christian “Network savior” Vinten-Johansen

Thanks also to our FSD power users for their consultation as well as to everyone else who poked their heads in during the week. If you rock and I forgot you, whack me, and I’ll make it right. Great job, everyone! The 3.0 release is going to be an amazing piece of kit!

Also see
Document Actions

Multiviews

Posted by Eric Steele at Dec 23, 2008 12:02 AM
A bit of clarification... Plone handles multiviews without too much trouble, they just don't get the friendly @@whatever call. The bit you linked to was our way of finding a viewlet manager registered in the current context (BrowserLayer, PersonGrouping type and formatting type) without knowing its name.

GenericSetup prevents us from registering multiple viewlet managers for different contexts that share the same name. Our solution was to create managers of different names and do that crazy lookup to see which one should be included in the template.

on bibliographic stuff

Posted by Anonymous User at Dec 23, 2008 01:04 PM

Hi Erik,

believe it or not I'm finally returning to work on CMFBib and friends. As I take from your remarks above you are looking into the same issues now. Do you have a wish list somewhere of what you would like to see added or changed in CMFbib? (and do you know the cite/bibitem notion CMFBib supports? would you be interested in a specific (AT) reference field to deal with links to publications? have you played with the PubMedClient?) Some time ago I tried to convert the bibtool to a utility but failed miserably. Maybe now that the parsers and renderes are handled differently chances are better? If someone would make the bibtypes pure Zope 3 (getting rid of AT) that might make things faster and more future proof. Would that be something of interest to you guys?

Cheers,

Raphael

Our CV wiki page

Posted by Erik Rose at Jan 02, 2009 06:06 PM
Glad you're back, Raphael! :-) This ball of lint has been accumulating for some time now — https://weblion.psu.edu/[…]/CurriculumVita#FurtherUseCases — so it might be out of date. Cris Ewing is making the most noise about CVs these days; I'll send you his address, and maybe you two can hash out what to do. Andreas and Vladimir might also be interested.

If you want to have another go at converting to a utility (though, after doing it, I don't know that it was worth the effort), I'd be happy to advise. You might be able to glean a step by step from this revision log: https://weblion.psu.edu/[…]/kill-fsd-tool?rev=6352. For instance, any place you need to get an acquisition context (like for tool lookups), you can call getSite().

Good to hear from you!

—Erik Rose

Utility on trunk

Posted by Erik Rose at Jan 02, 2009 05:37 PM
The utility branch is, as of a week or so ago, merged onto the trunk. Now we just await the viewlets!

Cheers,
Erik
Need help now?

Immediate assistance is available during university work hours:

News & views…
Posted Oct 13, 2009 Portlets gone wild with ContentWellPortlets 2.0.1 This new release adds the ability to add portlets to the footer area. It also has 6 portlet managers per area. This means 20 total portlet managers including the 2 on the sides that ship with plone.
Posted Sep 17, 2009 Plone 4 – An interview with Zope News Jan Ulrich Hasecke interviews me for Zope News.
Posted Aug 31, 2009 Web Services API for Plone Alpha 3 Release Details the release of the wsapi4plone.core package and the plans for future releases. The final report of the AtomPub for Plone Google Summer of Code project.
Posted Aug 28, 2009 Content editing and creation in Plone is faster with archetypes.schematuning Some bench marks of content editing and creation in Plone with and without archetypes.schematuning installed.
More news & views…