Motorcycle Adventures and Free Software

Weblog: Archive

2010-12-01 - 2010-12-31

Why make your projects properly open? Sustainability

Posted on 2010-12-09 18:29:37 UTC in 52° 0.000 N 4° 0.000 E 16km NW of Brielle, NL to . 0 comments.

Snapshot from Bertrand's presentation in the Amsterdam IKS workshop: what does being an Apache project bring to the table?

asf_stanbol_sustainability.jpg

The answer is sustainability. IKS is an EU-funded project which will eventually end. Proper project governance handled together with the Apache Software Foundation can help the software to survive and thrive for long after that.

Sustainability is something that is critical for all libraries and infrastructure software. If you want adoption, you need to ensure potential users and developers that the software will continue to be around. The way to accomplish that is to have a clear, open governance model. It is time to stop throwing code over the wall.

Sponsored links

save money using, phone card

Using RDFa to make a web page editable

Posted on 2010-12-15 14:25:21 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 0 comments.

As part of the IKS project we're working on semantic web editing. One area there is using RDFa to actually make pages editable. RDFa is a way to embed semantic information to regular HTML pages, and is already supported by some search engines, making this also a way of doing SEO.

But in addition to telling search engines what the content on our pages means, we can also use it to communicate between templates and the content management UI. In this example I'm using jQuery, Aloha Editor and a Midgard saving plugin for Aloha to manage content.

What works:

  • Explaining the content shown on a web page via RDFa and making it Aloha-editable
  • Storing edited content back to the CMS
  • Adding new items to containers (for example, adding a new article to a news listing)

The RDFa used is actually pretty simple. Here is how an article looks like:

<article xmlns:sioc="http://rdfs.org/sioc/ns#" 
         xmlns:dcterms="http://purl.org/dc/terms/" 
         typeof="http://rdfs.org/sioc/ns#Post" 
         about="urn:uuid:d1eeb24ae38c11df92307f77dcafaed7aed7"> 
    <h1 property="dcterms:title">
        Application Quality Assurance in Linux distributions
    </h1> 
    <div property="sioc:content">
        <p>We had a session about application QA in last weekend's 
        <a href="http://gsoc-wiki.osuosl.org/index.php/2010">GSoC Mentor Summit</a>. 
        I explained how the <a href="http://maemo.org/downloads/Maemo5/">Maemo Downloads</a> 
        approval process works in a 
        <a href="http://wiki.maemo.org/Extras-testing#How_it_works_in_practice">completely open, crowdsourced way</a>.
        This differs from many distributions where approval of new packages involves obscure decisions 
        and secret handshakes.</p>
        ...
    </div> 
</article>

What is shown above is an article represented using the Semantically-Interlinked Online Communities specification. The article is identified by a UUID (in this case, a Midgard GUID), and has title and a content properties. When the CMS javascripts load, Aloha will be enabled for both properties, making them editable:

aloha-in-rdfa-small.png

When user wants to save things, there is a Save button provided in the toolbar. Saving reads the contents of modified Aloha instances, and sends them together with RDF type and identifier information back to the server:

aloha-in-rdfa-save.png

When receiving the POST Midgard runs a controller that maps the provided RDF information to a object in the content repository, validates the content and saves. The RDF mappings in a Midgard2 MgdSchema look like the following:

<Schema xmlns="http://www.midgard-project.org/repligard/1.4">
    <type name="org_midgardproject_news_article" table="org_midgardproject_news_article">
        <user_values>
            <typeof>http://rdfs.org/sioc/ns#Post</typeof>
            <namespaces>sioc:http://rdfs.org/sioc/ns#,dcterms:http://purl.org/dc/terms/</namespaces>
        </user_values>
        <property name="title" type="string">
            <description>Title of the article</description>
            <required>true</required>
            <property>dcterms:title</property>
        </property>
        ...
    </type>
</Schema>

Stop using SQL, then

Posted on 2010-12-20 13:24:10 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 0 comments.

From yesterday's PHP Advent article:

PHP has been around nearly as long as there has been a Web to develop for, but it evolves constantly and is a modern programming language by almost any definition. Sure, it might not suit hipsters who only enjoy bands when they can say “you probably have not heard of them; they only formed tomorrow,” but it is not your granddad’s programming language.

Sadly, web development often also involves SQL, and that is your granddad’s programming language. SQL, and the stored procedure languages you are most likely to encounter, have deliberately not evolved much since the 70s and 80s. When your programming ancestors were hunting saber-toothed tigers and scratching proposed SQL syntax onto cave walls, they had some fundamentally different ideas to those behind scripting languages.

Yet another reason to stop interfacing directly with a storage back-end and use a content repository.

Get a preview of the next Midgard content repository

Posted on 2010-12-20 21:01:13 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 0 comments.

MidgardCRMidgard 10.12 was released last week as a developer preview of what is coming in the world of content repositories:

MidgardCR 10.12 "Hrungnir" is a technology preview of the third generation of the Midgard Content Repository. It is released to allow developers to gain familiarity with the upcoming Midgard storage APIs and RDF storage.

MidgardCR is available as a GObject-oriented C library with language bindings for multiple languages including Python, JavaScript, Scheme and Java through GObject Introspection.

Content managed in MidgardCR can be stored to multiple relational databases supported by the GNOME Database Abstraction Library. Databases tested with MidgardCR include SQLite, MySQL and Postgres.

While this might not be something for production use, especially on the web as the GObject Introspection bindings for PHP5 aren't done yet, it ought anyway to be interesting to developers. Suddenly you have a full content repository that can not only store regular content, but also RDF triples. And this with pretty much any programming language you would like to use.

The new MidgardCR is also interesting in the sense that it has been written in Vala instead of straight C, making it more accessible for potential contributors. Grab the project from GitHub or install to your favorite distribution. And stay tuned for more Midgard announcements later this winter.

Thanks to Andreas Nilsson for the MidgardCR logo.

Back