Nothing to see here

November 17, 2007

This blog is closed - my new home is at http://martinaspeli.net.

Thunderbird upgraded itself the other day. Ever since, I’ve been rather pleased with it.

I went from Opera (too clunky and non-OSX-like) to Mail.app (too slow and no newsgroup support) to Thunderbird ages ago, and whilst it was pretty decent, it was always a little bit out of place. Now, with 2.0.0.6, it’s more harmoneously styled, snappier and has a few nice features like filtering “recent” and “favourite” folders and really useful “Back” and “Forward” buttons (otherwise known as the “oops, didn’t mean to mark that message as read and move on to the next one, where was it again?” button).

Thunderbird also has decent keyboard shortcuts and works very well as a general mail and news reader. Well done Mozilla. :)

In an age of YouTube, it seems that every website needs to have a little embedded video player, showing screencasts and interviews and recorded presentations. How neat. However: I just don’t have twenty minutes to watch a video just to get some piece of information I’m looking for. Ever.

Videos can’t be searched for key words. Skipping back and forth is an imprecise means of finding the information you want. I never do just one thing at a time, and videos by their nature demand full sensory attention: watch, listen, sit still.

I can see how screencasts can be useful for people who are new to a technology, say, and don’t have the means to get direct hands-on experience. A good presentation can be good on video too. But please, if there’s actual information to be presented, make it text and images first, and video  as a supplementary extra for those who can be bothered.

RIP FOPP

August 11, 2007

It’s not often that I mourn the closure of a chain of shops, but the last decent chain of record stores in the UK just went the way of the dodo. http://fopp.co.uk carries this note:

It is with great regret that we announce the closure of Fopp.

Our store chain is profitable, well regarded and loved by our loyal customers and staff. However we have failed to gain the necessary support from major stakeholders, suppliers and their credit insurers to generate sufficient working capital to run our expanding business.

We would like to thank staff and customers for their support over the past 25 years.

Any outstanding website orders have now been cancelled and will not be fulfilled or charged.

Sob… The Fopp stores had a decent amount of CDs covering a variety of styles, wasn’t outrageously overpriced, had friendly and knowledgeable staff and sold good films, books and other media. I was never able to reist going into a branch when I passed by one, and normally left with five or six CDs. I hope someone comes in to fill the void, but given how many ridiculously over-sized, over-priced Virgin Megastores and HMVs that are popping up, I won’t get my hopes up. :-(

Book pre-orders

July 16, 2007

Just a quick note - a few people were asking about pre-ordering my book. Packt just gave me the URL for this:

Pre-order Professional Plone Development here.

And on a different note, I’m on holiday for real as of now and probably offline for two weeks. :-)

It feels weird writing this post, having spent so long keeping it a secret (not terribly well, mind), but the time is right now, I feel, with Plone 3 RC1 just around the corner.

For the past six months or so, I’ve been writing a book which will (most likely) be entitled Professional Plone Development, published by Packt Publishing, the people behind Building Websites with Plone. It will take another month or two (or thereabouts) for it to hit the shelves, but I am scheduled to deliver the final drafts to the publisher at the end of July.

About the book

As the title suggests, this is a book for developers who want to build robust content-centric web applications on top of Plone. The ideal reader knows Python and web programming concepts in general, and has used Plone before, perhaps as a power user or site administrator. Some prior experience with Plone customisation and programming may be helpful, but shouldn’t be necessary. If you’re brand new to Plone, you should be able to pick up what you need, but spending some time playing with a standard Plone site may help you get familiar with the terminology and concepts.

This is not a book for site administrators or end users who want to use “vanilla” Plone.

It is a book about best practice. I wanted to convey the way I feel development should be done with Plone 3, without being burdened with too many legacy techniques. To my knowledge, this is the first book to actively encourage Zope 3-style patterns in Plone development and downgrade legacy concepts such as ZSQL methods and developing new persistent CMF tools.

Among other things, the book covers:

  • Setting up a development environment with zc.buildout.
  • Creating packages as Python eggs.
  • Encapsulting site policy into a “policy product”, using GenericSetup and Python code to enable repeatable and testable deployments.
  • Customising security and workflow.
  • Safely incorporating third-party products into a site policy.
  • Creating a new theme for Plone, customising the appearance of viewlets, portlets, Zope 3 views and page templates.
  • A reference chapter outlining “Zope development concepts in a nutshell”, with runnable doctests to explain key concepts. Here’s where you’ll learn about adapters and utilities and acquisition. :-)
  • Building content types with Archetypes, demonstrating modern techniques such as using GenericSetup for configuration and keeping presentation logic in separate view classes.
  • Creating standalone pages and forms with zope.formlib and Zope 3 views.
  • Creating Zope 3 viewlets and Plone 3 portlets.
  • Connecting to relational databases using SQLAlchemy.
  • Dealing with members and member properties through PAS.
  • Using KSS, Plone 3’s new AJAX framework to build dynamic pages.
  • Setting up a production server with ZEO.
  • Configuring caching for robust site performance.
  • Connecting to an LDAP repository for authentication and member data.

There is an emphasis on proper testing, documentation, and other good practices. As far as possible, I try to explain underlying concepts and rationale - the “why” in addition to the “how”. I don’t believe in frivolous or abstract examples that skip one concept to demonstrate another. I want readers to have something they can build upon, examine and learn from, not something they have to piece together themselves. Throughout the book, a semi-realistic case study is used to build a robust application demonstrating each concept being introduced.

On writing the book

This is my first book, and it’s been a very interesting experience. First of all: it’s a lot of work. Philipp von Weitershausen, author of Web Component Development with Zope 3, warned me. I didn’t listen. In particular, developing the examples took a long time. Still, it’s pretty rewarding work, and has given me the chance to write a lot of “fun” code.

Writing a book against a pre-release version of Plone provided some particular challenges. More than once (and at least once more to come) I’ve had to make major changes to my code as something in Plone (or more often it seems, CMF) changed. I’m very grateful to the various people I’ve nagged about completing parts of Plone 3 (in particular David Convent and Wichert Akkerman) that I needed to write a particular chapter.

I’m quite convinced that Plone 3 is a lot better off because I wrote this book. For a while, I was probably the only person developing for it in anger. I’ve fixed a lot of bugs and introduced numerous small features and improvements over the past few months, as I found things that were too difficult or plain impossible to do. I found (and fixed or harassed others into fixing) a few issues with Zope and CMF as well. :)

Having to explain (or justify) the way something works to a reader really made me think about how good our story was in each particular area. Sometimes, it was less work to improve Plone and have a compelling story to tell, than to write about the way it worked previously. :-)

Thank you!

I owe several people a debt of gratitude for being able to do this at all. Wichert Akerman (wiggy), the Plone 3 release manager, has been an amazing help: as a technical reviewer, in being forthcoming with the Plone release schedule, in discussing issues I felt important to address, and most recently, in teaching me about LDAP and deployment strategies, and developing tools for Plone that made these chapters much easier to write.

Jon Stahl and Andrew Burkhalter have been great reviewers as well, mercilessly coming down on my rambling style and overlong sentences. They have also been great encouragement and fed back points that they felt their clients and users may want to know more about.

Marco DeVitis has been a sharp critic (in the constructive sense) and the perfect “guinea pig” for my chapters. Chapter 3 had about 10 revisions thanks to Marco not giving up on me.

Philipp von Weitershausen provided some invaluable advice at the beginning of the project, as did Paul Everitt and Alexander Limi.

And finally, thank you to all the Plone developers who helped make Plone 3 such an incredible release. I want to work with nothing else these days.

Given that it’s the year 2007, you’d think companies would’ve cottoned on to a few cliched, cheesy, unbelievable and outright silly things that they shouldn’t try to market themselves with. I guess not. I don’t think I’m the only one who feels turned off by a company which uses one or more of these techniques:

  • Taglines like Your main supplier of … or Your experts in …. Seriously, I’ve not heard about you before. You’re not my anything.
  • Anything involving an explamation mark.
  • Anything involving more than one explamation mark.
  • Anything involving an exclamation mark and a question mark next to each other.
  • Other grammatical atrocities, such as using numbers as phonetic replacements for words, or trying to spell things phonetically. JooToobe anyone?
  • Pictures of attractive women with headsets waiting to take your call. Call centre operators are, by and large, not very attractive, and in any event I wouldn’t be able to see them. This argument counts doubly for the kind of companies that advertise exclusively in London telephone booths.
  • Other images which were obviously purchased as stock photos.
  • Pseudo-diversity. I used to work for someone who had a stock photo of a black hand shaking a white one. They also had one black employee. It wasn’t his hand.
  • Anyone who insists on getting an email address (or worse, a contact number) before possibly divulging the price of something.
  • Gyms.
  • Over-use of superlatives or claims to being a silver bullet for whatever problem. I would come up with an example, but the most superb example I know of comes from Tom Wait’s Step Right Up.
  • Websites which look like this. Bonus for the dancing robot though.
  • Websites which don’t work in Firefox and/or Safari. “But most of the world uses Internet Explorer” is just a pathetic excuse these days.
  • Companies or products which attempt to speak to customers in the first person. “Hi, I’m your friendly supplier of …” or “let me give you a hand with that”. The UK tax return is like that, and it’s damned irritating. Of course, I wouldn’t trust the taxman anyway.

Oh well. Enough procrastination for a while, back to work.

Dear Plonewars.com

May 14, 2007

Your website is pointless. It has a stupid name. It looks lame. It contains no useful information whatsoever. Your trackback spam is annoying. Please, just cease to exist. Or at least cease to latch yourself onto every last blog entry I post.

5…4…3…2…1…

Plone 3 Rocks Hard

May 13, 2007

Okay, so I’m a bit biased (I wrote a bunch of it), but I had the chance to actually use Plone 3 in anger today. And it rocks. It rocks hard. It’s just more fun to use, it feels slick, it feels fancy. Y’all don’t know what you’re missing.

Go try the beta and see what I mean. :-)

Yesterday and today, I did something I’ve been wanting to do for a long time - refactor the more generic bits of b-org out into more generic components. I have the luxury of targeting Plone 3.0 only, so I could use a lot of new APIs and components only available there. The results are:

  • borg.localrole - a standalone release of the PAS plug-in which allows you to define local roles in an adapter. This will probably work on Plone 2.5, but on its own it does nothing.
  • borg.project - an easy-to-use implementation of the “project workspace” metaphor.

The latter is possibly more interesting. When you install it, a manager can add a new Project, and configure a list of managers (who get the Manager role); a list of members (who get the TeamMember role); and a list of content types which project members will be able to add inside the workspace. There is also a local workflow policy (using CMFPlacefulWorkflow - watch out, you need to install this manually now in Plone 3).

This is no different to what the same part of b-org did, except:

  • It’s completely standalone
  • It works on any kind of user, not just Membrane ones
  • It has few dependencies - it doesn’t need Membrane; in fact, it doesn’t even use Archetypes.
  • It shows off a number of cool Plone 3-like features, such as add forms, formlib-based edit forms, factories, browser views, events and doctests

I know the Teamspace guys have been working on similar things (such as team spaces working with plain members). From what I know, Teamspace is more powerful and ambitious, possibly also a bit more complex. I must admit that the ability to work against plain Plone 3, starting from a clean slate was a strong driving force. I got to exercise a lot of things that we want people to be able to do - I even fixed a few Plone 3 bugs in the process, which I probably wouldn’t have found before the release otherwise.

Both projects are in the Cheesehop. Both have README.txt files with doctests and background info. If you want to see how you may code against Plone 3, or you need a simple, lightweight project workspace, give it a go!

If you just want to have a browse of the code, look in the Collective.