Pyramid, 2style4you and python - Wichert Akkerman

Tags: pun, python, django, plone took up most of his time the last years: it provides automatic fashion recommendations for women. They use lots of technologies, for instance redmine, jenkins, transifex, bitbucket (git), zabbix.

They had a lot of fashion portals that needed building. What did they need for them? There wasn’t a lot of standard functionality that they needed, like form generation for database models. So there was a lot in the big web frameworks at the time (django, plone, zope) that they did not need.

What they did need was customizability, all sites do things differently. And it needed to be fast. And internationalization was needed (he later showed a Taiwanese site, for instance). And he needed it to be in Python because Wichert knows that well.

He started out with pylons, a mini framework. But after a while it wasn’t really maintained anymore. Then they migrated to repoze.bfg (by Chris McDonough), another mini framework. They took about two months to migrate the whole thing (with the help of the repoze.bfg author). The fun thing is that repoze.bfg got merged into the pylons project later on; it is now called pyramid.

They make a core website that provides the main functionality. Then all the individual fashion portals copy that and customize it in various ways. Not really in the way that zope3 people like to do it, but in a more simple way, for instance by replacing bits of CSS or loading a different set of templates.

The recommendations are fully automated: as a customer you get to input your measurements and body characteristics and you get to name the body parts you’re not happy with (“I want to look like I have longer legs”).

There was one problem with their styling engine: it was in readable python source code. And they didn’t want their actual clients to look at it (their first client was in China). So in the end they rewrote their styling engine in C++ with boost.python wrappers…

Internationalization and localization was more painful than he imagined. There are a lot of extra parts where it is needed: displaying times, data, amounts; translating URLs; design. And if your customer (chinese) sends you replacement texts that you cannot read and that look similar to the text you’re replacing… Problems. That’s why they started hiring local chinese developers, which worked out quite well. One problem, though, was a total lack of testing culture… So they did a lot with errormator to catch errors quickly so that they could correct them.

Some things they learned:

  • There is no perfect form library. And probably it is impossible. They tried a lot of ‘em and none of them was perfect. There are too many things that can be different. They current one they use is only in use for form validation; the entire form display is custom.

  • i18n/l10n is hard, especially if you totally cannot read the language.

  • It is important to keep on top of your platform. Keep up with development. Keep up with versions.

  • Pyramid is unbelievably flexible. Great. logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):