Motorcycle Adventures and Free Software

Weblog: Archive

2005-02-01 - 2005-02-28

Jukka back from hiatus, JCR for Midgard

Posted on 2005-02-03 10:13:28 UTC to . 0 comments.

We had a pretty interesting meeting with Jukka Zitting in Ilves last night. Jukka is the original author of the Midgard CMS, and has been on hiatus from the project since 2000. Now he has started his own company, Yukatan with plans of providing JCR-based integration services for Content Management Systems.

JCR, or Java Content Repository is a generalized programming interface for storage back-ends of different Content Management Systems. JCR has been standardized in the JSR 170 specification. The specification is quite new and only implemented in some CMSs so far. Jukka's first contribution to the spec was developing Remote Method Invocation add-on to enable external Java applications to interface with any JCR-compatible CMSs.

While Midgard CMS has been developed in C and PHP, and the JCR specification is quite Java-specific, these two can be connected using JNI, Java Native Interface. This will give Java applications full access into Midgard content and data structures. While PHP will still remain the actual content management interface for Midgard, Java's possibilities for integration and desktop or mobile application development are very promising.

This is what the Midgard architecture will approximately look like with MgdSchema and JCR:

jcr-architecture.png

Jukka has already started examining MgdSchema for JCR development possibilities. The development work will start this month, and we expect first running version in March, depending on the state of the MgdSchema project.

The Java Content Repository implementation for Midgard will be funded jointly by Nemein and Yukatan.

Sponsored links

Microsoft Certification Exams โนเกีย Nokia มือถือ Online Project Management save money using, phone card
Reviews มือถือ Mobile All Apps

Enabling PermaLink autodetection

Posted on 2005-02-04 12:28:03 UTC to . 0 comments.

Lots of Content Management Systems strive to provide meaningful URLs. With CMSs meaningful URLs usually mean mapping the internal content structure of the system to a filesystem-like tree hierarchy, which has the downside tying the URLs into the site structure.

When the site structure is reordered the links can easily be broken. While sensible CMS deployments set up redirectors for most popular URLs, and a user-friendly 404 not found page, it is still an annoyance to people linking to the pages. As cool URIs don't change, these solutions are not enough.

Here the blog world comes to help by having introduced the PermaLink concept. PermaLink is short for Permanent Link, a link that the CMS or blog system being used ensures will remain current. In blog systems these PermaLinks are often displayed as a link on the page, or identified with the pound (#) sign. PermaLinks are also utilized in syndication specifications like RSS 2.0 element.

While this helps with aggregation and blog linking, it doesn't make linking permanently to CMS-powered sites any easier. On most real sites powered by a CMS it is not desirable to display words like "PermaLink" in the page templates. So what is needed instead is a more invicible, and machine-readable solution.

Again, the blog world has already come up with a solution for this. Several blog systems utilize tags for RSS autodetection. For example, the Firefox browser looks for this tag and enables feed subscription if it has been detected.

In similar vein, I would like to propose usage of tags for making PermaLinks machine-readable. Here's what I added to Midgard CMS today:

<link rel="bookmark" href="<PermaLink URL>" />

When embedded into the HTML block this way, it is already recognized by Mozilla and displayed in the "Page Info" window:

mozilla-autodetect.jpg

Preferably different authoring and content management tools would become aware of this tag and start looking for it. When the user would insert a link to a document, the authoring tool could make a HTTP GET request to the URL, and if the PermaLink could be found from there link to it instead. That way permanent linking would be completely transparent to website authors.

Updated 2005-10-06: Switched from rel="PermaLink" to rel="bookmark", as suggested by the Microformats folks.

Multilingual MidCOM sites

Posted on 2005-02-04 15:39:51 UTC to . 0 comments.

Finland is a country with three official languages, and many organizations here want to provide their websites in multilingual format. While Midgard CMS supports storing multilingual content in same content tree, this is still not widely used. A far more common strategy is to use language prefix URLs.

With language prefixes each translation of a site has its own content tree starting from the language name, or 2-letter code. This has the advantage of allowing slightly different content structure to be presented on different translations. For example, a company might want to present products differently to the domestic and international markets. It also makes it easy to tell what language the content behind a link is in.

To make a MidCOM site multilingual there are two steps.

First, set up the website normally. Then log into the AIS interface and create top-level topics for each language you want to have on your site. It doesn't matter what component is used to drive those topics, but very often it is de.linkm.taviewer. The URL name of the topics should be the two letter country code.

The top-level country topics are actually the front pages of different language versions of the site. The site structure can be created freely under them, although it would be recommended to make the site structure quite identical between languages.

Then you have to make MidCOM aware of the language topics. This is done by creating a configuration snippet (/sitegroup-config/midcom-template/config) for the MidCOM Site Template.

Log into Aegir and go to the Snippets tab. There you should create a sitegroup-config top-level directory to the same sitegroup where the site is in. Then create a midcom-template snippet directory under that. In this directory you can place the configuration PHP code in a config snippet.

Configure the languages used on the site:

// Languages enabled on the site, and information about them
// in format "URL prefix" => "Language code"
$GLOBALS["midcom_site"]["site_languages_array"] = array(
"fi" => "fi", // Finnish
"en" => "en", // English
"ge" => "ka" // Georgian
);

// Default language
$midcom_site["default_language"] = "en";
$midcom_site["site_language"] = $GLOBALS["midcom_site"]["site_languages_array"][$midcom_site["default_language"]];

Set MidCOM's language based on the URL prefix:

if ($_MIDGARD["self"] == $GLOBALS["midcom_site"]["uri"]) 
{
// On-site language
if ($_MIDGARD["argc"] > 0
&& array_key_exists($_MIDGARD["argv"][0],$GLOBALS["midcom_site"]["site_languages_array"]))
{
$GLOBALS["midcom_site"]['site_language'] = $GLOBALS["midcom_site"]["site_languages_array"][$_MIDGARD["argv"][0]];
}
}
elseif ($_MIDGARD["self"] == $GLOBALS["midcom_site"]["uri"]."midcom-admin/ais/")
{
// AIS language
if ($_MIDGARD["argc"] > 0)
{

foreach ($GLOBALS["midcom_site"]["site_languages_array"] as $prefix => $code)
{
$language_topic = mgd_get_topic_by_name($GLOBALS["midcom_site"]["root_topic"]->id,$prefix);
if ($language_topic
&& ($language_topic->id == $_MIDGARD["argv"][0]
|| mgd_is_in_topic_tree($language_topic->id, $argv[0])))
{
$GLOBALS["midcom_site"]['site_language'] = $code;
}
}
}
}

This is all needed to make a site multilingual. With this setup the root URL of the site can be used for a splash screen presented to users for selecting language.

As an option, you can also utilize HTTP Language Negotiation for automatically directing the user to correct language version of the site. To do this, add the following to the midcom-template config snippet:

// Language negotiation
if ($_MIDGARD["uri"] == $GLOBALS["midcom_site"]["uri"])
{
if ($_SERVER[HTTP_ACCEPT_LANGUAGE])
{
$langstr = explode(',',$_SERVER[HTTP_ACCEPT_LANGUAGE]);

if (is_array($langstr))
{
foreach ($langstr as $language)
{
$language = substr($language,0,2);

if (array_key_exists($language,$GLOBALS["midcom_site"]["site_languages_array"]))
{
header("Location: ".$GLOBALS["midcom_site"]["uri"].$language."/");
exit;
}
}
}
}
// No language preferences matched, go to default language
header("Location: ".$GLOBALS["midcom_site"]["uri"].$GLOBALS["midcom_site"]['default_language']."/".$suffix);
exit;
}

Date output in MidCOM is tied to the site language, and uses PHP strftime() function for output. For this to work your server must have the locale you need installed on Unix level. On Debian the locales can be installed via the following command:

/usr/sbin/dpkg-reconfigure locales

Select the locales you need from the list and they will be installed by dpkg.

Updated 2005-09-27: This tutorial is now maintained in the Midgard Wiki.

The Viking biathlon

Posted on 2005-02-07 08:50:39 UTC to . 0 comments.

Hiidenhirven hiihto is the annual relay biathlon race between different historical re-enactment clubs in Finland. Kerttu was skiing this year in the Harmaasudet team, and so I went to watch the competition.

Biathlon2005_Startup_line.jpg

The Hiidenhirven hiihto biathlon is arranged annually by Sommelo. The idea in the race is to ski around Sommelo's Pukkisaari village island with Viking-age equipment, and then try to hit a model elk with two arrows. The competition is arranged as a relay of four-person teams, one which has to be female.

Biathlon2005_Viking_photographer.jpg

I've seen previously the 1999 race, which Harmaasudet won. Since then the competition has gotten tougher. This year's race was especially difficult as the there wasn't enough ice and the competition had to be held inside the island.

Biathlon2005_Kerttu_shoots.jpg

This year the race was won by Smolensk, Russia based team Viking-Nevo, with last year's winners, the Indian re-enactment club Torahammas finishing second. Harmaasudet were fourth of nine teams, rising two positions from 2004.

Biathlon2005_Trophy.jpg

It was very nice to see the camaraderie between the different historical associations after the game. All were gathered around a bonfire in the reconstructed village swapping stories over traditional Finnish pea soup.

Biathlon2005_aftergame.jpg

After the event we went to Tamminiementien kahvila for some coffee, pastries and chat. Arwen and Kerttu looked definitely out-of-place sitting in their Viking clothes in the 19th century surroundings.

I was invited to the Harmaasudet team party, and we spent the evening in Pena's sauna singing, having snow fights and toasts.

Unfortunately my camera battery went dead right in the beginning, so all pictures are taken with the relatively crappy phone camera.

OpenPSA as a resource planning tool

Posted on 2005-02-16 16:05:00 UTC to . 0 comments.

Centre for Open Source Software (COSS) has published a very nice case study in Finnish about utilizing OpenPSA for resource and work shift planning.

Here are quick translations of some key quotes:

The Open Source application OpenPSA turned out to be the best solution when Pihlajalinnan lääkärit Oy, a company renting medical doctors was looking for a resource planning tool.

"We were able to immediately choose the modules we needed and leave out all the unnecessary features from OpenPSA. Customization work required much less programming than in closed solutions", said board member Heikki Aatola from Pihlajalinnan lääkärit Oy board.

Nemein, the consultancy that deployed the OpenPSA solution gets praise from the client.

"Cooperation with Nemein went well. Right from the beginning they were able to explain the solution clearly. We understood immediately how OpenPSA works, what customization would be required, and how much the needed operations would cost. This is unfortunately not what can be said about most other service providers", said doctor Ville Ojanen.

OpenPSA is a freely available Professional Services Automation system built on top of the Midgard Framework.

Easier handling of CSS with MidCOM

Posted on 2005-02-21 17:40:17 UTC to . 0 comments.

The Midgard style templating system was designed back when site layouts were still mostly in-line HTML tables. As such this caused some problems with the new standards-based school of web design, as there it is desirable to place the layouts into separate, linked style sheets.

The obvious solution to this was to make Midgard's style elements URL-addressable. I made first commit adding this feature to midcom-template last week.

MidCOM site template now serves elements from the site style under /style subdirectory. For security reasons the elements must have a parameter midcom/allow_serve set to true. If the element names have a .css or .js suffix the system will also set correct mime types for them automatically.

This way it is easy to serve as many linked CSS or JavaScript files as needed from the Midgard style system. Here's how it looks like in Aegir's style manager:

linked-css-aegir.jpg

Next up will be supporting Flash cross domain policy files in /crossdomain.xml if set. These are often needed in web campaign setups where Flash front-end and Midgard back-end reside on different servers.

Oh, and according to the latest blog meme:

Privateers, privately owned vessels licensed by government to attack enemy commerce, seized the mails, held them for ransom and robbed them of any gold or silver they contained.

From Conquerors of Time by Trevor Fishlock.

First look at Digital Business Ecosystem

Posted on 2005-02-24 10:12:34 UTC to . 0 comments.

I've spent the last two days in the Digital Business Ecosystem (DBE) Workshop arranged by Hermia Science Park in Tampere. DBE is an EU-funded Open Source technology for enabling small and medium-sized enterprises to work together in P2P fashion.

DBE basics

The DBE website is quite bogged by acronyms and marketese, but what the project actually boils down to is an application called DBE Servent written in Java. The Servent communicates with other DBE installations using a P2P protocol and some intelligent networking tools. The DBE Servent is used by business applications for communicating with each other using a set a defined Web Services.

DBE itself doesn't define these Web Services, it only provides the "wire protocol" for the Web Services to talk with each other, and ensures that different nodes in the network find each other, and find the services they require. The actual services are provided as SOAP Web Services conforming to a specified WSDL definition. This means that the applications utilizing DBE should be developed following the Service-Oriented Architecture model.

DBE is part of the €16 billion EU Framework Project 6. EU's interest in the DBE project is fostering a heavily localized Open Source business applications market, and support European SMEs in networking. The idea is that "an ecosystem of networked SMEs can evolve and adapt faster and more safely than the huge corporations". Participants in the DBE project include Sun, IBM, T6 and Soluta.net.

The development phase of the DBE project will end in 2006. Prior to that the project will make a first release of the 4Mb Java-based DBE Servent in April 2005. The participants are planning to move the project to SourceForge after this first release.

OpenPSA possibilities

With OpenPSA, the case for using DBE would be quite clear. We've already been thinking of implementing Web Services to make it easier for networked companies to work with each other more easily, and what DBE would add on top of those would include caching and asynchronous RPC support. In practice this would be we would only need to define the APIs used for the different services in OpenPSA, and then pass those to DBE. The Servent would then handle the actual connections between the different installations and dealing with nodes that are offline.

This way OpenPSA would enable organizations to manage all their operations with parners and subcontractors using DBE-compatible applications transparently. DBE-enabled OpenPSA would look approximately the following:

dbe-openpsa-simple.png

Supporting the Service Oriented Architecture would be a major change in OpenPSA code. We would have to encapsulate all data handling parts of the system with classes that would be able to store and fetch information using both local Midgard storage and remote Web Service APIs.

DBE risks

While the DBE concept sounds promising, it is still an unreleased piece of software. Additionally, it has not been tested outside academic circles, so the promises of scalability and automatic networking might not materialize in the real world.

Another problem is standardization of the Web Service interfaces used for different business scenarios or transactions. It has traditionally been a big problem to get an industry to work together on developing standard vocabularies and APIs, and DBE doesn't really address that. As the developers say, it is only the "TCP for business applications".

This might or might not be a problem. We could easily define a set of APIs using the taxonomies familiar in OpenPSA, and the rest of the industry could just follow us. This is what has pretty much happened with the different ad-hoc standards defined by the blogging world. However, it would require that our API would be generic enough, and that the developers of different project applications would find it easily. This all would hinge on the popularity of the DBE platform.

Project possibilities

The risks and non-existing user base of DBE are somewhat alleviated by EU funding for first companies developing services for the platform. We haven't yet made any decisions but we'll definitely think about utilizing DBE. OpenPSA needs some kind of Web Services interface to support networked business, and despite risks this would be a quite appealing solution.

First flying lesson

Posted on 2005-02-27 13:50:04 UTC to . 0 comments.

I had my first flying lesson yesterday. We went to the Helsinki-Malmi airport with Kerttu in the morning to fly with the simulator, and to listen for the MIK flight training briefing. I had booked the first flight for tuesday, but surprisingly there was a cancellation and my instructor agreed to take me for a spin.

I've been attending a Private Pilot's License theory course arranged by MIK and Finnair Flying Club since November, and I was originally planning to fly the required 45 hours with them as well. But when it started to seem like the amount of students would make for some capacity issues with MIK I accepted an offer from BF-lento, a private flight school. This enabled me to start flying already now, instead of waiting until I finish the ground exam.

The first flight was quite simple. We took off from EFHF, and the instructor flew us out of the DEGER reporting point, and gave the control to me. I then flew around for 20 minutes off the shore of Porvoo before taking us back to DEGER. I was surprised how small movements were needed for controlling the plane, and of how easy it was to follow the airspace with the radio. The plane felt easier to keep going in right directions than the simulator.

The snow sparkled in the late February sunshine, and the world looked really nice. While the flight was short it made me very enthusiastic about the training, and about hopefully attaining the pilot's license in the future.

Design new MidCOM UI - Win an iPod Mini

Posted on 2005-02-28 21:54:35 UTC to . 0 comments.

Nemein is sponsoring a contest to design a new user interface to the Midgard Open Source Content Management System. The winning designer will receive an iPod Mini portable music player.

The Authoring Interface System is the main editing and administrative interface seen by users of Midgard CMS. While several accessibility and usability improvements have been made, the current AIS interface looks quite boring and industrial:

ais-small.jpg

To fix this situation we're looking for a new, standards-compliant design of the interface. The design should follow these points:

Go to the contest page to get more information.

Back