Look at my profile

by toutpt

13 04 2008

First of all I would like to thank guys who wrote GenericSetup. I m writing this post cause i think profiles are not well used. They are used like Extensions/Install.py scripts. So what is a profile, and how to use it ?

Profile is about configuration of portals (portal_xxx inside the zmi). In that way I have started by asking myself “what means install/uninstall in Plone” ? Some answers:

  • “its about the Extensions/install.py scripts.”
  • “Like on your computer, you install a software or a lib”

Well, there is no sens for the word “install” in the world of plone. We are speaking about configuration of tools. So the CMFPlone/profiles/defaults, contains a plone default configuration. Right ?

In that way extending default plone configuration means, change it a bit, adding some directory views in portal_skins for example.

What happens if you are “installing” 20 products to you configuration ? Here it is ! You have lost the configuration of your Plone project and will not be able to understand why this new product you are trying to install break your website.

Seeing this, I have proposed to add one single profile by project. In that way you controle your entire Plone, and if you have a problem, you just have to apply this profile. But that also means you have to write it. Here is how i proceed:

  • Install every product you need
  • Export all steps
  • Adding a new product/egg specially for your project
  • Put the results of the exports in it
  • Read it,
  • Add all constraints in it. For example the order of layers inside skins.xml

This is done, you get it ! There is no duplication of files, but integration of products inside Plone configuration (my work). Writing XML is boring ? Writing them faster by using my eclipse templates ;)

The next point is about setup handlers. I hate product that add setup handler just to say “hey i know how to add a step”. I always ask for “what is a step for you ?” So steps are not the way to call a python script. If you are tented to add a step, just use Extension/install.py to put your script. Adding a step make sens only if you are adding a tools, and you want that tools to be configurable. So you don’t add setuphandler.py but you write import/export.py for your tool, and then you adding the step with import_step.xml.
An other problem is the configuration of your Plone project can be different for a production server and developpement local server. For example the mailhost.xml file can be different. In that way you can extend your profile with just a smaller profile that reconfigure what you need.

This is why i m laughing when i heard “uninstall profile”.

Finally, i don’t understand why the portal_quickinstaller is now “aware” of extensions profile. That doesn t help to understand profiles. People will continue to write install/uninstall profiles. If any one know why i m ready to discuss about it.



Localisation française de la glibc

by Stéphane

8 04 2008

Il me semble très important de disposer d’outils de développement puissants pour développer des applications traduites (p. ex. « File » devient « Fichier ») et localisées (monnaie, date, poids et mesures, nombre, etc) [1].
La traduction est appellée i18n (contraction du mot anglais internationalization) et la localisation, L10n (localization), sur cette dernière partie, il y a du nouveau dans la glibc 2.8 :

http://sourceware.org/bugzilla/show_bug.cgi?id=6040

Pour résumé, les changements sont les suivants :

  1. nouvelles abréviations des mois (vous ne devriez plus confondre juin et juillet) ;
  2. utilisation d’un point final dans les abréviations ;
  3. strftime et l’argument “%x”, affichent dorénavant 08/04/2008 et non 08.04.2008 ;
  4. printf(”%’d”, 20000) affiche « 20 000 ».

Merci à l’équipe de traduc.org pour leur aide précieuse et plus particulièrement au travail formidable de Jean-Philippe Guérard.

[1] Par contre, je préfère utiliser les versions non traduites de gcc, du bash ou de la glibc.



Apache Virtualhost generator

by alf

2 04 2008

Currently I’ve not much time to work on Wisss :-( However, I will make a tiny dsl and generator to have a virtualhost file generated (independent from Wisss, which already generate a vhost). I’ve already done this with a shell script but it will be more powerful and easy to maintain for a few hours of work.

The initial need is for my own server but it will also be useful for my company. The goal is to provide our best practice for vhost in a tool.