Motorcycle Adventures and Free Software
Henri Bergius
Biker, free software consultant, neogeographer
  • Nemein
  • Bergie, in 60° 10.566 N 24° 55.212 E Helsinki, FI Brussels airport does it every time. This time rerouted through Copenhagen, but maybe still home for the night
  • +358 40 525 1334

Upcoming trips

  • Feb 11 - Feb 15
  • Feb 15 - Feb 16
  • Mar 01 - Mar 11
  • Jul 01 - Jul 09

Bergie's Home Page and Weblog

This site is the personal blog of Henri Bergius. Subjects discussed include content management, social web integration, neogeography, information society and motorcycle adventures. Henri's profile and consulting services are also available.

While I'm on the road you can follow more frequent updates via my Qaiku profile (feed).

Latest weblog entries

iPad and information appliances, a free software angle

Posted on 2010-01-28 09:51:43 UTC in 60° 10.572 N 24° 55.212 E Helsinki, FI to .

Apple iPad is certainly interesting. It seeks to challenge the concept of PCs by providing something that is at the same time more personal, and a lot easier to use. The personal computer of the future.

Gone is difficult file organization - instead, applications use their own purpose-build content repositories. Instead of seeking software from many places, all of it is easily available in an App Store, all quality-controlled by Apple. And same thing with content - forget about bookshelves and stacks of CDs, instead simply dowloading all you need from iTunes.

This sort of user experience obviously comes with a cost. Important computing concepts like multitasking are not supported. The iTunes/App Store experience means that Apple is in the position to ensure no software or content competing with its or its business partners' business model gets on the device. And most of the content you buy for the device is DRM'd, meaning that you're only renting it for the time allowed by content owners, never buying.

Even with the limitations concerned I can see myself buying an iPad. It would serve as a very nice device for web surfing from the couch and as an e-reader on business trips. I can also see myself running demos and presentations from it instead of a laptop.

Even with the limitations concerned, it is likely that the iPad will happen, and will blaze the trail towards a new way of personal computing. Stephen Fry says it well:

Like the first iPhone, iPad 1.0 is a John the Baptist preparing the way of what is to come, but also like iPhone 1.0 (and Jokanaan himself too come to that) iPad 1.0 is still fantastic enough in its own right to be classed as a stunningly exciting object, one that you will want NOW and one that will not be matched this year by any company. In the future, when it has two cameras for fully featured video conferencing, GPS and who knows what else built in (1080 HD TV reception and recording and nano projection, for example) and when the iBook store has recorded its 100 millionth download and the thousands of accessories and peripherals that have invented uses for iPad that we simply can’t now imagine – when that has happened it will all have seemed so natural and inevitable that today’s nay-sayers and sceptics will have forgotten that they ever doubted its potential.

The success of iPad will mean more than just a completely new level of App Store economy. Other companies will certainly seek to emulate the model, coming up with their own post-WIMP devices and their own content and software ecosystems. This all will be a challenge for the free software movement.

The world of free software is still very much stuck in what computing was in the 90s. We think of desktop computers, we do not integrate with the web. And we do not get the transformation that is happening with personal computers. Taught by smartphones and cloud applications, users are moving from desktops through simple netbooks towards information appliances.

With information appliances you need a seamless user interface. You need an ecosystem where content comes alongside the software to utilize it. You need to move past the old WIMP metaphors and the idea of separation between data stored in a a file system and the software manipulating it.

So far the first convincing attempt towards this direction I've seen in the free software world is KDE's Social Desktop initiative. It allows users to connect with each other straight through the desktop, and it allows discovery of new applications and content to download and use straight in the applications. We also use it with Maemo's new App Downloader.

Threatened by the cloud from one end, and closed-ecosystem appliances from the other, it will be interesting to see how we react. Will we rise to the challenge and start providing new user experiences? Will we build a free cloud? Will we integrate with initiatives like Project Gutenberg and Creative Commons to provide the content integration? Will the open web be our safe haven?

Definitely interesting times to be a software developer.

Sponsored links

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

Direct manipulation interfaces

Posted on 2010-01-21 13:26:44 UTC in 60° 9.810 N 24° 55.680 E Helsinki, FI to .

There certainly is a lot of buzz about Apple's rumored Tablet product. Daring Fireball writes:

If you’re thinking The Tablet is just a big iPhone, or just Apple’s take on the e-reader, or just a media player, or just anything, I say you’re thinking too small — the equivalent of thinking that the iPhone was going to be just a click wheel iPod that made phone calls. I think The Tablet is nothing short of Apple’s reconception of personal computing.

What I find most interesting are the view that the Tablet may bring new computer interaction paradigms. Again from Daring Fireball:

Our “desktop” computers’ human interfaces haven’t fundamentally changed since 1984 — keyboard and mouse/trackpad for input, overlapping draggable resizable windows on-screen, and a hierarchical file system where you create and manage “document files”. Have you ever sat back, scratched your chin, and wondered when the computer industry will break free of these current interfaces — which can be a hassle even for experts, and downright confusing (e.g. click vs. double-click) for the non-experts? Surely no one expects the computer interfaces of, say, 50 years hence to be based on these same metaphors and input methods. What’s the next step?

A touchscreen tablet isn't really suited for the WIMP paradigm as for example text entry is quite difficult, and you probably want larger, thumb-friendly user interface elements. This is where Microsoft's Tablet PC initiative failed, trying to bring the regular WIMP user interface to the tablet.

Instead what seems to be happening is that all the Wiis, iPhones, and N900s are now heading us towards a post-WIMP world. Instead of indirect manipulation by mouse and keyboard we can now interact with our applications using the more natural ways of touching things on screen or moving the device around.

This innovation will not be limited only to mobile APIs, web applications can already now know whether user is accessing them via a WIMP system or a touchscreen device thanks to CSS media queries and Javascript orientation events in latest Firefox.

The user interface innovation that is arriving thanks to these new interaction possibilities is quite promising, though it will probably take a while before we know what things actually work, and what are just fun demos.

If you're thinking about new kinds of user interfaces, it might be a good time to read papers like Noncommand User Interfaces (Jakob Nielsen, 1993) and Magic Ink (Bret Victor, 2006).

I certainly am as we are in the process of defining a new kind of CMS UI for Midgard 2.

Update: Gizmodo has a very nice article on Jef Raskin's information appliance concept and the evolution of GUIs.

Google's Near Me Now: not quite there

Posted on 2010-01-08 11:50:11 UTC in 60° 10.290 N 24° 56.796 E Helsinki, FI to .

Google launched a new mobile web service called Near Me Now that can recommend things like restaurants, bars and ATMs near you. This uses browser geolocation to provide only results relevant to where you are.

googlenearme.jpg

The idea is quite good: to replace business directories like Yelp or eat.fi with something that is easily accessible from Google's homepage and uses Google's great relevancy algorithms.

However, the implementation is not quite there yet. My main gripe is that they implemented this using browser sniffing so that the feature can be accessed only with iPhones and Android devices. Even though I'm using N900, a mobile device that has GPS and provides geolocation through the browser I cannot access that site. That reeks of the bad old times of IE-only websites.

Lesson: if you need browser sniffing to provide some feature, implement it based on browser capabilities, not the user agent (which can anyway be spoofed easily).

Midgard in 2009

Posted on 2009-12-31 11:23:35 UTC in 60° 10.572 N 24° 55.206 E Helsinki, FI to .

Vali raising a toast2009 was a pretty active year for the Midgard content repository project, and so it is good to take a look at some of the highlights:

Happy new year to everybody in the Midgard world!

Free Software Foundation Europe in Finland

Posted on 2009-12-11 09:11:13 UTC in 60° 9.798 N 24° 55.674 E Helsinki, FI to .

Free Software Foundation Europe, has recently expanded by the addition of a Finnish country team. FSFE is a non-profit organization dedicated to ensuring software freedom, which is an important building block in an open information society.

The current Finnish team includes Otto Kekäläinen of VALO-CD, the distribution of free software applications for Windows as the country coordinator, and Henri Bergius of Midgard as the deputy coordinator. Timo Jyrinki from Ubuntu Finland is the translation coordinator. Here you can see the team in a recent info event organized together with the Finnish Linux User Group and TKO-äly:

fsfe-finnish-team-2009.png

While COSS is already doing important work for free software in Finland, FSFE amends that agenda by providing focus on the freedom of software and citizen-level participation.

If you're interested in contributing to software freedom, start by joining the Fellowship of the FSFE. You can also contact us at finland@fsfeurope.org and find out more about what is happening in Finland in the field of free software by following the vapaasuomi.fi website.

Posting to Qaiku via ping.fm

Posted on 2009-12-07 10:47:02 UTC in 60° 9.798 N 24° 55.674 E Helsinki, FI to .

Ping.fm is a useful tool if you have friends on many social networks as it allows you to write updates to all of them via a single interface. In addition to the web interface there are many tools that allow posting to ping.fm, including SMS and applications for Android handsets and the iPhone.

So far a problem with ping.fm has been that it doesn't support Qaiku, the conversational microblogging tool that we're using to handle workstreaming in Maemo.org Sprints. But now it is possible thanks to the Custom URL functionality on ping.fm.

If you already have a Qaiku account you can start posting to it via ping.fm in the following way:

  1. Enable Qaiku API in your settings and copy the API key
  2. Register to ping.fm
  3. Add a Custom URL to send statuses to
    pingfm-customurl1.png
  4. Enter the URL http://www.qaiku.com/api/statuses/update.json?apikey=xx where xx is your API key as the Custom URL
    pingfm-customurl2.png
  5. Testing posting via the ping.fm web interface:
    pingfm-post.png
  6. See your new post on Qaiku:
    pingfm-qaiku-shown.png
  7. If you want to post to a channel, just begin your message with #channelname

If ping.fm is not your thing, there are also other non-web ways to use Qaiku. For example Mauku for N900 and Gwibber for the Linux desktop work nicely with the service. Qaiku also has an XMPP bot that you can use by simply adding qaiku@jabber.org as your instant messaging contact.

Easy user location with Midgard

Posted on 2009-12-02 14:08:41 UTC in 60° 9.798 N 24° 55.674 E Helsinki, FI to .

Location is an important context that web services can utilize for fun or smarter user interaction. In past getting location used to be difficult, but now thanks to good IP locationing databases and browser geolocation capabilities it is becoming a lot easier.

But to be really easy, the framework you're using should provide user's location built-in, without you as an application developer having to think about it. This is the reason for Midgard's geolocation features to exist, after all. With Midgard, getting user's location is quite easy:

Midgard MVC (Midgard 9.09)

// Read location from session or user's location log
$user_location = midgardmvc_helper_location_user::get_location();
if (is_null($user_location))
{
    // No location found, try to geocode based on user IP via the GeoPlugin service
    $geocoder = new new midgardmvc_helper_location_geocoder_geoplugin()
    $location_parameters = array('ip' => $_SERVER['REMOTE_ADDR']);
    try
    {
        $user_location = $geocoder->geocode($location_parameters);
        midgardmvc_helper_location_user::set_location($user_location);
    }
    catch (Exception $e)
    {
        // Couldn't get location from IP
    }
}

if (!is_null($user_location))
{
    echo sprintf('You\'re in %s, %s', $user_location->latitude, $user_location->longitude);
    // Will print "You're in 60.1633, 24.9279"
}

MidCOM (Midgard 8.09)

<?php
// Read location from session or user's location log
$user_location = org_routamc_positioning_user::get_location();
if (is_null($user_location))
{
    // No location found, try to geocode based on user IP
    $geocoder = org_routamc_positioning_geocoder::create('geoplugin');
    $location_parameters = array('ip' => $_SERVER['REMOTE_ADDR']);
    $user_location = $geocoder->geocode($location_parameters);
    if (!is_null($user_location))
    {
        // Store geocoded location to session or user's location log
        org_routamc_positioning_user::set_location($user_location);
    }
}

if (!is_null($user_location))
{
    echo sprintf('You\'re in %s, %s', $user_location['latitude'], $user_location['longitude']);
    // Will print "You're in 60.1633, 24.9279"
}
?>

The examples above will work with both anonymous site visitors (using sessions) and registered users (using Midgard's position log). In this example we check if location is already available via browser geolocation or some importer like Qaiku or Fire Eagle, and if not we fall back to IP-based positioning using the GeoPlugin service. The resulting user location array or object (depending on Midgard used) contains a textual description of the place and accuracy information in addition to WGS-84 coordinates.

Using MidCOM3 with FirePHP

Posted on 2009-11-23 16:52:54 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Firebug is a Firefox extension all web developers are familiar with. Now when developing with the MidCOM3 MVC framework it is possible to get your debug information straight from Midgard to Firebug:

midgard-firephp-small.png

This is built on top of the excellent FirePHP extension, which helps you get data not only from regular web pages but also from AJAX requests.

Currently we send all logged information plus details about current route and templates being used. To use this, install FirePHP in your Firefox, FirePHPCore from PEAR packages, and enable development_mode in MidCOM3 configuration.

I'm considering to port this also to Ragnaroek.

What is a content repository

Posted on 2009-11-19 10:02:03 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Joint post of Henri Bergius and Michael Marth cross-posted here and here.

Web Content Repositories are more than just plain old relational databases. In fact, the requirements that arise when managing web content have led to a class of content repository implementations that are comparable on a conceptual level. During the IKS community workshop in Rome we got together to compare JCR (the Jackrabbit implementation) and Midgard's content repository. While in some cases the terminology might be different, many of the underlying ideas are identical. So we came up with a list of common traits and features of our content repositories. For comparison, there is also Apache CouchDB.

So, why use a Content Repository for your application instead of the old familiar RDBMS? Repositories provide several advantages:

  • Common rules for data access mean that multiple applications can work with same content without breaking consistency of the data

  • Signals about changes let applications know when another application using the repository modifies something, enabling collaborative data management between apps

  • Objects instead of SQL mean that developers can deal with data using APIs more compatible with the rest of their desktop programming environment, and without having to fear issues like SQL injection

  • Data model is scriptable when you use a content repository, meaning that users can easily write Python or PHP scripts to perform batch operations on their data without having to learn your storage format

  • Synchronization and sharing features can be implemented on the content repository level meaning that you gain these features without having to worry about them

feature JCR / Jackrabbit Midgard CouchDB
content type system In JCR structured or unstructured nodes are supported and can be mixed at will in a content tree. Content types are defined in MgdSchema types. All content must be stored to an MgdSchema type, but types can be extended on content instance level using the "parameter" triplets Type-free
type hierarchy Structured node types support inheritence of types, additional cross-cutting aspects can be added with "mixins". Node types can define allowed node types for child nodes in the content hierarchy. MgdSchemas allow inheritance, and an extended type can be instantiated either using the extended type or the base type Type-free
IDs Nodes with mixin "referenceable" have GUID. In practice the node path is often used to reference nodes. Every object has a GUID used for referencing. Objects located in trees that have a "name" property can also be referred to using the path All objects can be accessed via a UUID
References Nodes can reference each other with hard link (special property type) or soft link (by referring to the node path) MgdSchema types can have properties linking to other objects of same or different type. A link of "parentfield" type places an MgdSchema type in a tree. No reference support built-in
content hierarchy All content is hierarchical / in a tree Content can exist in tree, or independently of it depending on the MgdSchema type definition flat structure
interesting property types Multi-valued (like an array), binary properties (e.g. for files), nodes have an implicit sort-order Binary properties stored using the Midgard Attachment system Support for binary properties
transactions Multiple content modifications are written in transactions. Transactions can be used optionally.
events JCR Observers can register for content changes on different paths and/or for different node types and/or CRUD, receive notification of changes as serialized node All transactions cause both process-internal GObject signals, and interprocess DBus signals Support for one external event notification shell script
workspaces Workspaces provide separate root trees. No workspaces support in Midgard 9.03, coming in next version Multiple databases within one CouchDB instance
import and export nodes or parts of the repository (or the whole repo) can be imported or exported in XML. 2 formats: docview for human-frindly representation, sysview including all technical aspects Objects can be exported and imported in XML format. There are tools supporting replication via HTTP, tarballs, XMPP, and the CouchDB replication protocol JSON serialization is the standard way of accessing the repository. CouchDB replication protocol supports full synchronization between instances
versioning Checkin/checkout model to create new versions of nodes, optionally versions complete sub-trees, supports branching of versions. No versioning All versions of content are stored and accessible separately, no branching
locking Nodes can be locked and unlocked Objects can be locked and unlocked
object mapping Not in standard, but implemented in Jackrabbit. Rarely used in practice. Object mapping is the standard way of accessing the repository All content is accessed via JSON objects
queries In JCR1 Sql or XPath, in JCR2 also QueryBuilder. Query Builder Javascript map/reduce
access control Done on repository level, i.e. all access control is independent of application. In Jackrabbit: pluggable authentication/authorization handlers. No access control in Midgard repository, usually implemented on application level. Midgard proves a user authentication API No access control
persistence In Jackrabbit different Persistence Managers can be plugged in (RDBMS, tar file, ...) libgda allows storage to different RDBMS like MySQL, SQLite and Postgres CouchDB has its own storage
architecture Jackrabbit: library (jar), JEE resource, OSGi bundle or standalone server Library Erlang-based daemon
APIs Standard: Java-based, PHP coming up. In Jackrabbit: also WebDAV and HTTP-based API C, Objective-C, PHP, Python HTTP+JSON
full-text search Included in repository. In Jackrabbit: Lucene bundled No (SOLR used on application level) Plugin for using Lucene, not installed by default
standard metadata All nodes have access rights, jcr:primaryType and jcr:mixinTypes properties. JCR 2.0 standardizes a set of optional metadata properties. All objects have a set of standard metadata including creator, revisor, timestamps etc No standard properties

Raise the hammer! Midgard2 Mjolnir goes live

Posted on 2009-11-18 13:21:07 UTC in 60° 10.272 N 24° 55.956 E Helsinki, FI to .

Mjolnir, the new major release of Midgard2 Content Repository is now out. Named after the hammer of Thor, this release finally provides a real content repository that can be used by both desktop and web application developers.

mjolnir-narrow.png

In addition to being a GObject-powered content repository for PHP, Python and Objective-C, the Mjolnir release provides several significant goodies on top of the older Midgard2 series:

We've been testing running the Qaiku microblogging service with Mjolnir. The exactly same PHP code that we used with Midgard 8.09 LTS performs 20-60% better when running on Mjolnir.

Get Midgard2 9.09 Mjolnir while it is hot! Builds for various Linux distributions are already starting to hit OBS repositories...