Friday, August 19, 2011

Beautiful Riga

This year Perl YAPC::EU::2011 conference brought us to Riga : what a nice discovery!

I barely knew about the existence of this city (apart some vague remembrances of having seen this name when reading Jules Verne's Un drame en Livonie, long long time ago). Now I will recommend it to friends.

Riga has a lot of beautiful buildings, mostly from end of 19th-beginning of 20th century. The Art Nouveau museum has an interesting film explaining various architectural substyles during that period; then you can easily recognize them when walking in the city. By the way, walking is a pleasure because there are large pedestrian areas through the old town, and several beautiful parks just around that center. There are various churches of different eras and styles, and a tremendous romantic organ in the Dom Cathedral, with a concert every day at noon !

I discovered interesting composers at the Sacred Music Festival (with high-quality choir, orchestra and soloists); and discovered many interesting painters at the Latvian National Museum of Arts.

So Riga has many advantages of a capital with rich cultural life, but seemingly without too many of its inconveniences : most buildings look fresh and unaffected by pollution, I didn't see any traffic jams, prices are reasonable, etc. Maybe that's the positive aspect of Soviet occupation, that the city was preserved so many years from wild capitalism...

In short, not only was YAPC a very nice conference, it was also the totally unexpected pleasure of a very interesting touristical exploration (albeit too short).

Thanks to the YAPC organizers for having brought us there!

Tuesday, August 16, 2011

about MsOffice::Word::HTML::Writer

Yesterday I gave a lightning talk on MsOffice::Word::HTML::Writer, a module to produce documents for MsWord from HTML content. To anybody interested, here is some more info :


  • the module only needs Perl, and therefore can run on a server; it doesn't need MsWord to be installed (actually, that's the whole purpose of that module).

  • it was written for the needs of Geneva courts of law, where we needed to generate thousands of documents every day, from hundreds of models, with libraries of reusable content parts, with fusion of complex datastructures ... but the resulting docs must be editable in MsWord.

Other technologies considered, but rejected, were :



  • remote control of an MsWord instance, through a OLE connection. That's what most other courts do, but it only works on a local workstation : you could hardly do the same on a server, first because you would need to install MsOffice, and second because this architecture is not reliable enough : the MsWord instance is a bottleneck, it might break, or it might suddenly put a popup to ask the user for something ... except there is nobody to answer if running on a server. So this approach can be considered if you have a heavy application, deployed on everybody's PC; but not for a Web application.

  • generating RTF, using some templating tool : this works on a server, but authoring models can be tricky (esp. it is not obvious to factorize reusable parts).

  • generating XML, either in ODF (open format used by OpenOffice), or in OOXML (Microsoft proprietary format) : here the main problem is authoring, because both XML specs are huge, so you really need specialists to produce your models

  • generating ODF from http://search.cpan.org/dist/OpenOffice-OODoc/ : well, ODF can be read by MsWord, but many features are missing. Besides, OODoc uses a programming approach, not a templating approach, so it's harder to delegate authoring of models to people who are not familiar with Perl.

MsOffice::Word::HTML::Writer works by assembling HTML content (the main document, the headers/footers, other resources like images or CSS stylesheets), and then packaging the whole thing as a single MIME/multipart file. Model authors just need to know HTML, so it's easy to build an authoring team; and if you have a good templating framework, it's also easy to build a library of reusable content parts.

Sunday, August 14, 2011

Bad luck with Riga trip

I really seem to have bad luck with the trip to Riga for Perl conference YAPC::EU::2011.

I had booked my flight and hotel several months in advance. A couple of days ago, I received a mail telling that the hotel was overbooked, they had made a mistake, and sent me to another place.

Now today, my flight from Geneva got delayed by 90 minutes, and I missed the last flight to Riga, so I'm sleeping in Brussels.

There is a flight to Riga tomorrow morning, so if nothing worse happens, I should still be in time for my talk http://yapceurope.lv/ye2011/talk/3410.





Monday, August 8, 2011

DBIx::DataModel 2.0 is on the way

DBIx::DataModel version 2.0 is on the way.

It will be a major refactoring, introducing a metaobject layer, choice between single-schema or multi-schema mode, support for table inheritance, for arbitrary join clauses, for bulk updates and deletes; the API has been made more "perlish" (replacing camelCaseMethods by methods_with_underscores). A dev version is already on CPAN; the code seems to be quite stable now, but the distribution is still lacking in documentation and tests, so I'm not sure it will be fully ready before YAPC::EU::2011 ... but at least the slides are ready (see http://www.slideshare.net/ldami/dbix-datamodel-endetail if your are interested).

The last major refactoring was version 1.0 in 2008, and the first published version was 0.10 in 2005, so I seem to be following a 3-year schedule !

I really hope that DBIx-DataModel will get some more visibility, because it has some features that are quite original in the (big) world of Perl ORMs, and could probably be useful to other people. For those of you who will be in Riga : come at the talk !
http://yapceurope.lv/ye2011/talk/3411

Friday, August 5, 2011

a municipality called Perl

I just discovered accidentally that there is a German location called "Perl", close to the Luxemburg border.

Maybe a place to consider for the next YAPC ?

http://en.wikipedia.org/wiki/Perl,_Saarland