Friday, July 18

Project Messerschmidt vs. NKOTB

There have been rumors for some time, since Alexander Limi gave a most impressive lightning talk at last years Plone conference, about a templating language that sets out to put an end to our search for the perfect one.

It's major feature: Speed, speed and speed. Compared to any other templating system out there, by an order of magnitude faster.

Some time has passed and careful observers have spotted NKOTB at times. During last years performance sprint organized and sponsored by Headnet a critical mass of people met and tried various approaches to put this ingenious piece of art to some use.

Some time passed again and NKOTB got a proper name and a public presence, now to be known under the name spitfire. But when you put too many intelligent people into one room, you won't always get them to push in one direction. So Project Messerschmidt was born. An attempt to mock the same underlying approach of spitfire but make it vastly simpler.

So where are we today?

Spitfire is under active development, but to the current day is not integrated into any Zope environment except for some initial attempts. Spitfire only has support for Cheetah-like syntax today.

What about Project Messerschmidt?

It is nowadays known as z3c.pt and used by projects like Vudo or repoze.bfg. It has a full implementation of the TAL standard including the i18n namespace. While it does make some conscious choices about different default behavior than zope.pagetemplate it is virtually compatible.

The most notable differences are lacking support for METAL, the provider expression and to the current day no Five or Zope2 integration. The later two should be a matter of one focused day of work to finish.

But what about the main objective, speed? There is one established shoot-out test for templating languages called 'bigtable'. The objective is to render an HTML table of ten columns and 1000 rows. It is somewhat like the 'top speed of your car' number. It certainly isn't the only number you are interested in, when buying a car. But it's an easy to compare number, that has some objective nature to it.

So here are the numbers, judge for yourself:



Update: Thanks to a comment by Alexander, I made the chart a bit more impressive :)

Update 2: Since I've seen Donna experimenting with Mako, I added it to the graph.

Plone reloaded

I've been silently working on a project called plone.reload which has been noticed by some.

After I got positive feedback from Martin Aspeli, Kai Diefenbach and Jon Stahl I felt it might be ready.

Danny Bloemendaal calls it:
The best improvement since the day (automatic) product refreshes died in Zope.
And my Co-Worker Denys Mishunov told me:
We should include it in every project we do.
So what is this project that gets people excited?

Its PyPi page is short and concise without any glamour:
Configuration and code reload without server restarts.
What does this mean for you? It brings back the good old refresh feature, we used to have for Products. Remember the refresh.txt files? Does it work for products alone? No!

This project tries to bring code reloading back into the modern world of Zope 3. Reload code located in browser views? Not a problem. What about that new browser:page you registered? Just reload all your ZCML without having to restart your server. Do you need to mark your packages in any way? No, you don't.

This project is most useful when you do user interface oriented work. You can work on file system based templates just fine in Zope debug mode, but so far modifying underlying browser views, viewlets or portlets always required you to restart. This time is over!

Is this useful as a general reload feature for all code imaginable? No, it's not.

For all application specific logic unit tests are still your best and fastest bet. For content types, register them once, get your GenericSetup profiles up and keep them as stupid as possible. Then plone.reload will help you on getting your user-interface in shape, without spending your time on getting coffee while Plone restarts all day long...

This project is heavily based on the work done by the fine Products.RefreshNG folks and wouldn't been possible without Guido himself contributing to the idea. So if you find it useful, remember the titans on whose shoulders we stand upon.

Hanno

Back to blogging...

Dear readers,

I have kept silent for a while on this blog. That seems to be a natural tendency for anyone who is busy in the Plone community.

After leaving my home country for the Nordic wilderness five month ago, I have been somewhat overwhelmed with all the new impressions and having a new job. But for a couple of weeks, I have silently started to get back into the community. Besides starting to catch up on my bug wrangler duties, I also started to use my 10% time for less visible work.

Two of my recent projects deserve their own posts, so stay tuned to get an update on 'Codename Messerschmidt' and the project that got me the highest amount of personal 'thank you' mails yet in my open source career...

Cheers,
Hanno