<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeroens blog &#187; Programming</title>
	<atom:link href="http://blog.bn2vs.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bn2vs.com</link>
	<description>Blog of Jeroen De Dauw. The latest news on my open source work and interests.</description>
	<lastBuildDate>Fri, 23 Dec 2011 14:44:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Wikipedia Education Program</title>
		<link>http://blog.bn2vs.com/2011/12/23/wikipedia-education-program/</link>
		<comments>http://blog.bn2vs.com/2011/12/23/wikipedia-education-program/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 14:44:44 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[MediaWiki extensions]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Education Program]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Online education]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[WEP]]></category>
		<category><![CDATA[Wikimedia]]></category>
		<category><![CDATA[Wikimedia Foundation]]></category>
		<category><![CDATA[Wikipedia]]></category>
		<category><![CDATA[Wikipedia Education Program]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1226</guid>
		<description><![CDATA[It&#8217;s been a while since I last wrote a blog post, and this is in part due to the last extension I wrote sadly enough not being available under an open license due to client demands :/ This blog post is about what I&#8217;m currently working on, new infrastructure for a project that I hope [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I last wrote a blog post, and this is in part due to the last extension I wrote sadly enough not being available under an open license due to client demands :/ This blog post is about what I&#8217;m currently working on, new infrastructure for a project that I hope you&#8217;ll agree upon is totally <strong>awesome</strong>.</p>
<p>Open knowledge and open learning tools go hand in hand, thus Wikipedia can be an amazing resource for education further then simply looking up things. The Wikipedia Education Program strives to involve university students with the Wikipedia community, by creating and editing articles as part of their coursework. This is a real win-win for everyone involved. The students get to do something which is actually useful, as their work won&#8217;t disappear into some dusty archive of their university, and they learn working collaboratively with other people in the Wikipedia community. The gains for Wikipedia, and it&#8217;s community, are probably pretty obvious; more contributors, more content, more people to help increase the quality of the encyclopaedia as a whole.</p>
<p>If you are interested in bringing this program to your university, definitely check out the <a href="https://outreach.wikimedia.org/wiki/Global_Education_Program">Wikipedia Education Program</a> (WEP). Also, you can find more comprehensive posts about the program itself, as well as many success stories, on the <a href="https://blog.wikimedia.org/c/global/global-education-program/">Wikimedia blog</a>.</p>
<p>The WEP started several years ago with a handful of universities participating. Such participation and enrolment was kept track of manually on wiki pages. Obviously, this does not scale well, and now that the program has two or three orders of magnitude more students, new tools are urgently needed. The main goal is having a way for students to enrol themselves, and then be tracked by their mentors and people of the community wanting to provide assistance where needed. Further a lot of nice things can be done, such as keeping track of contributions, drop-out rates, ect, so that problems can be spotted, and measures can be taken to avoid these in the future. You can find an initial draft of the requirements <a href="https://www.mediawiki.org/wiki/Wikipedia_Education_Program">here</a>.</p>
<p>I&#8217;m implementing this as a new MediaWiki extension, which will when completed, be placed onto Wikipedia. The extension is, probably unsurprisingly, called <a href="https://www.mediawiki.org/wiki/Extension:Education_Program">Education Program</a>. It&#8217;s currently in early alpha stage, so not much to see there yet. However, a draft of it&#8217;s functionality can be found <a href="https://www.mediawiki.org/wiki/Wikipedia_Education_Program/design">here</a>. Management wise it&#8217;ll be somewhat similar to Contest, but more extensive (since there is more stuff to manage), and hopefully improved along multiple dimensions. I still need to put more thoughts into the exact flow for students though, and discuss this with the other people involved.</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2011/12/specialcourses.png"><img class="size-large wp-image-1232 alignnone" style="border: 1px solid black;" title="Special:Courses, part of the Education Program extension" src="http://blog.bn2vs.com/wp-content/uploads/2011/12/specialcourses-1024x341.png" alt="Special:Courses, part of the Education Program extension" width="1024" height="341" /></a></p>
<p>This is a screenshot of one of the many special pages making up the  management interface. It lists all courses, allows you to browse through  them (paged) and filter on criteria. Program administrators and mentors  also get to see a control to add new courses, which then takes them to a  new page with a form. Very similar pages exist for other types of objects, such as Institutions, Terms, Mentors and Students (although the later two are somewhat different, since they cannot be modified by people other then the students or mentors themselves).</p>
<p>I will likely be working on this for another 2 months, after which I will start work on an even more <strong>awesome</strong> project (don&#8217;t get me wrong, the WEP is definitely awesome), on which I&#8217;ll post more later on.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/12/23/wikipedia-education-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contest extension for MediaWiki</title>
		<link>http://blog.bn2vs.com/2011/11/08/contest-extension-for-mediawiki/</link>
		<comments>http://blog.bn2vs.com/2011/11/08/contest-extension-for-mediawiki/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 13:36:17 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Coding challenge]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[MediaWiki extensions]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[Wikimedia]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1212</guid>
		<description><![CDATA[As it&#8217;s been 2 months since my last blog post, I figured it was time for another one. Quite a few things I could write about (SMWCon, my new awesome laptop, Stanfords AI and ML classes, me moving to Berlin, &#8230;), but I decided to give some introduction to my most recent MediaWiki extension: Contest. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="../wp-content/uploads/2011/11/CodeChallengeLogo-301x301.png"><img class="alignright" title="Logo of the October coding challenge" src="../wp-content/uploads/2011/11/CodeChallengeLogo-301x301.png" alt="Logo of the October coding challenge" width="152" height="152" /></a>As it&#8217;s been 2 months since my last blog post, I figured it was time for another one. Quite a few things I could write about (SMWCon, my new <strong>awesome</strong> laptop, Stanfords AI and ML classes, me moving to Berlin, &#8230;), but I decided to give some introduction to <a href="https://www.mediawiki.org/wiki/Extension:Contest">my most recent MediaWiki extension: Contest</a>.</p>
<p>Contest extension that allows users to participate in admin defined  contest challenges. Via a judging interface, judges can discuss and vote  on submissions. I created it for the <a href="https://blog.wikimedia.org/2011/10/20/announcing-the-october-2011-coding-challenge/">Wikimedia October coding challenge</a>, so it got a nice amount of review, uncovering some minor misconceptions I had about some core MW code, and it got deployed on MediaWiki.org. The coding challenge is quite <strong>awesome</strong>, but I won&#8217;t discuss it any further here, so check out the linked blog post if you&#8217;re curious/interested.</p>
<p><strong>Feature overview:</strong></p>
<ul>
<li>Admin interface for managing contests and their challenges.</li>
<li>Landing and signup pages for each contest.</li>
<li>Personal contest list and submission interface for each user.</li>
<li>Summary pages per contest listing contestants, which can be filtered and sorted.</li>
<li>Judging interface that allows for rating and commenting on each participant.</li>
<li>All contests, challenges, contestants, comments and votes can be queried and exported via the API.</li>
<li>Signup and reminder emails.</li>
</ul>
<p><strong>Requirements</strong></p>
<ul>
<li><a title="MediaWiki" href="https://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a> 1.18 or above &#8211; yeah! my first <strong>awesome</strong> MediaWiki 1.18 or later extension <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>PHP 5.2 or above</li>
<li>MySQL</li>
</ul>
<p><strong>Some screenshots</strong></p>
<div id="attachment_1215" class="wp-caption alignnone" style="width: 810px"><a href="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-welcome-click.png"><img class="size-full wp-image-1215" title="Contest welcome interface" src="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-welcome-click.png" alt="Contest welcome interface" width="800" height="508" /></a><p class="wp-caption-text">Contest welcome interface</p></div>
<div id="attachment_1216" class="wp-caption alignnone" style="width: 810px"><a href="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-mycontest.png"><img class="size-full wp-image-1216" title="Contest submission and management interface for a single user" src="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-mycontest.png" alt="Contest submission and management interface for a single user" width="800" height="566" /></a><p class="wp-caption-text">Contest submission and management interface for a single user</p></div>
<div id="attachment_1217" class="wp-caption alignnone" style="width: 810px"><a href="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-contests.png"><img class="size-full wp-image-1217" title="Contest administration and judging interface listing all contests" src="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-contests.png" alt="Contest administration and judging interface listing all contests" width="800" height="271" /></a><p class="wp-caption-text">Contest administration and judging interface listing all contests</p></div>
<div id="attachment_1218" class="wp-caption alignnone" style="width: 810px"><a href="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-contestitem.png"><img class="size-full wp-image-1218" title="Contest administration and judging interface for a single contest" src="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-contestitem.png" alt="Contest administration and judging interface for a single contest" width="800" height="311" /></a><p class="wp-caption-text">Contest administration and judging interface for a single contest</p></div>
<div id="attachment_1219" class="wp-caption alignnone" style="width: 774px"><a href="http://blog.bn2vs.com/wp-content/uploads/2011/11/764px-Contest-editcontest.png"><img class="size-full wp-image-1219" title="Contest editing interface" src="http://blog.bn2vs.com/wp-content/uploads/2011/11/764px-Contest-editcontest.png" alt="Contest editing interface" width="764" height="600" /></a><p class="wp-caption-text">Contest editing interface</p></div>
<div id="attachment_1220" class="wp-caption alignnone" style="width: 810px"><a href="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-contestant-judging.png"><img class="size-full wp-image-1220" title="Judging interface for a single submission" src="http://blog.bn2vs.com/wp-content/uploads/2011/11/800px-Contest-contestant-judging.png" alt="Judging interface for a single submission" width="800" height="554" /></a><p class="wp-caption-text">Judging interface for a single submission</p></div>
<p><strong>Some background</strong></p>
<p>When starting with this extension, it was clear pretty quickly that it could really use the <strong>awesome</strong> DBObject class I&#8217;ve been incrementally creating over my last few extensions and mostly finished in <a href="https://www.mediawiki.org/wiki/Extension:Survey">Survey</a>. This class is a wrapper for objects of a certain type, which is equivalent to a row in some db table. Even though it&#8217;s in essence very simple &#8211; it just has a field that is an associative array with field =&gt; value &#8211; it&#8217;s also very powerful and flexible. When I started with this, I had no idea it would turn out to be so neat. The bad news was that I could not use PHP 5.3 or later for Contest, while the DBObject class uses late static binding, which was introduces in PHP 5.3. I came up with a simple hack: all static methods in the base class have been made-non static, but are marked as &#8220;should be static&#8221;. Then, every deriving class has a public static function s(), which returns a (cached) instance of the class. So then for every &#8220;static&#8221; method you need to call, instead of ClassName::methodName(), you do ClassName::s()-&gt;methodName(). If you know this, and do not misuse the non-static-but-should-be-static methods in the base class, it retains all it&#8217;s niceness, at the cost of something that&#8217;s pretty much a tiny bit of syntactic sugar. And it&#8217;s quite obvious how easy it will be to replace this with actual LSB usage once this becomes possible <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li><a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Survey/includes/SurveyDBClass.php?view=markup">Survey DBObject class</a> &#8211; <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Survey/includes/Survey.class.php?view=markup">deriving class</a></li>
<li><a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Contest/includes/ContestDBObject.php?view=markup">Contest DBObject class</a> &#8211; <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Contest/includes/Contest.class.php?view=markup">deriving class</a></li>
</ul>
<p><strong>Download</strong></p>
<ul>
<li><a href="https://code.google.com/p/mwcontest/downloads/list">Release tarballs</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Contest/">SVN tags</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Contest/">SVN trunk</a></li>
</ul>
<p><strong>What&#8217;s next?</strong></p>
<p>There are various small additions that could be made, but one things really stands out: contest configuration with version history. Right now, you can create contests and challenges, modify them and delete them. But once you make a change, the previous version is lost. You cannot revert. You cannot compare. You can&#8217;t even see who made the change or when. Implementing such a thing is not trivial, especially if you want to have a generic system that can be used by any extension that wants to store data and have version history for it. And if you think about it, quite a few extensions could use this. Let&#8217;s have a look at my extensions, latest first, and see if they can use it:</p>
<ul>
<li><a href="https://www.mediawiki.org/wiki/Extension:Contest">Contest</a> &#8211; well yeah, obviously</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Survey">Survey</a> &#8211; yes, for the surveys, their configuration, and their questions</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Semantic_Watchlist">Semantic Watchlist</a> &#8211; yeah, for the watchlist groups</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Include_WP">IncludeWP</a> &#8211; no</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:SubPageList">SubPageList</a> &#8211; no</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Live_Translate">Live Translate</a> &#8211; yeah, for the translation memory admin</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Push">Push</a> &#8211; no, although it could, if it had an admin interface for the push targets</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Validator">Validator</a> &#8211; no</li>
<li><a href="https://www.mediawiki.org/wiki/Extension:Maps">Maps</a> and <a href="https://www.mediawiki.org/wiki/Extension:Semantic_Maps">SM</a> &#8211; yeah, for the map layer definitions currently done as key=value pairs, one per line, in the Layer namespace</li>
</ul>
<p>That&#8217;s 6 out of 10 just for the extensions I wrote. What it comes down to is that pretty much any extension that has some sort of settings interface that is not user-specific, could use this. And maybe even the user specific ones, which would obviously include the user preferences in MediaWiki core. So why not store this data in wiki pages, such as done by Maps for layers? You could even store it as JSON or serialized PHP objects if you need more complexity&#8230; The things with this is that it only works for simple use cases (such as the layers in Maps), and even then is limited. You cannot query over the data as you do not have it in relational form. And you cannot have fine grained access and write rights control over the data, which in a lot of cases is quite important. So a generic solution here would be an <strong>awesome</strong> addition to MediaWiki if you ask me.</p>
<p>More info on Contest can be found on <a href="https://www.mediawiki.org/wiki/Extension:Contest">it&#8217;s documentation page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/11/08/contest-extension-for-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Survey extension for MediaWiki</title>
		<link>http://blog.bn2vs.com/2011/09/14/survey-extension-for-mediawiki/</link>
		<comments>http://blog.bn2vs.com/2011/09/14/survey-extension-for-mediawiki/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 16:08:14 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MediaWiki extensions]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[Survey]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1205</guid>
		<description><![CDATA[Over the past 3 weeks I&#8217;ve been working on a new MediaWiki extension that allows creation of on-wiki surveys by admins. It comes with a whole bunch of neat features, and is the most awesome (code wise) extensions I&#8217;ve created so far.It&#8217;s aptly titled Survey. Feature overview Surveys get displayed to wiki users using a [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past 3 weeks I&#8217;ve been working on a new <a href="http://www.mediawiki.org/wiki/">MediaWiki</a> extension that allows creation of on-wiki surveys by admins. It comes with a whole bunch of neat features, and is the most awesome (code wise) extensions I&#8217;ve created so far.It&#8217;s aptly titled <a href="http://www.mediawiki.org/wiki/Extension:Survey">Survey</a>.</p>
<p><strong>Feature overview</strong></p>
<ul>
<li>Surveys get displayed to wiki users using a nice pop-up form.</li>
<li>Surveys can be created and modified via an admin panel (Special:Surveys).</li>
<li>Surveys can be shown to specific types of users (logged in, anonymous, editor, confirmed, &#8230;)</li>
<li>Surveys can be shown for a specified percentage of users, and only after a certain amount of page views.</li>
<li>Survey questions can have different types of inputs, of which some allow restricting answers.</li>
<li>Surveys can be tested by admins via Special:TakeSurvey without them being live on the wiki.</li>
<li>Summaries of survey submissions can be found on Special:SurveyStats.</li>
<li>The survey submission data (ie user answers) can be exported via an API.</li>
</ul>
<p><strong>Requirements</strong></p>
<p>Survey makes use of many new features introduced in MediaWiki 1.17, and therefore requires this version or later. It even makes use of MW 1.18 features, with fallback code for MW 1.17 <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It also makes use of 5.3 features, these being late static binding and anonymous functions, so it won&#8217;t work with PHP 5.2.x and earlier.</p>
<p><strong>Some screenshots</strong></p>
<div id="attachment_1206" class="wp-caption alignnone" style="width: 720px"><a href="http://www.mediawiki.org/wiki/Extension:Survey"><img class="size-full wp-image-1206" title="Special:Surveys: the main administration interface for Surveys" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/Survey-surveys.png" alt="Special:Surveys: the main administration interface for Surveys" width="710" height="271" /></a><p class="wp-caption-text">Special:Surveys: the main administration interface for Surveys</p></div>
<div id="attachment_1207" class="wp-caption alignnone" style="width: 810px"><a href="http://www.mediawiki.org/wiki/Extension:Survey"><img class="size-full wp-image-1207" title="Special:EditSurvey: administration interface to create and edit surveys" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/800px-Survey-survey.png" alt="Special:EditSurvey: administration interface to create and edit surveys" width="800" height="550" /></a><p class="wp-caption-text">Special:EditSurvey: administration interface to create and edit surveys</p></div>
<div id="attachment_1209" class="wp-caption alignnone" style="width: 604px"><a href="http://www.mediawiki.org/wiki/Extension:Survey"><img class="size-full wp-image-1209" title="Example of a survey as it appears to users" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/594px-Survey-dialog.png" alt="Example of a survey as it appears to users" width="594" height="600" /></a><p class="wp-caption-text">Example of a survey as it appears to users</p></div>
<div id="attachment_1208" class="wp-caption alignnone" style="width: 810px"><a href="http://www.mediawiki.org/wiki/Extension:Survey"><img class="size-full wp-image-1208" title="Special:SurveyStats: summarizes the submissions for a single survey" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/800px-Survey-stats.png" alt="Special:SurveyStats: summarizes the submissions for a single survey" width="800" height="396" /></a><p class="wp-caption-text">Special:SurveyStats: summarizes the submissions for a single survey</p></div>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="https://code.google.com/p/mwsurvey/downloads/list">Survey release downloads</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Survey/">Survey SVN tags</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Survey">Survey SVN trunk</a></li>
</ul>
<p><strong>Some background</strong></p>
<p>I developed the <a href="http://www.mediawiki.org/wiki/Extension:Survey">Survey</a> extension as <a href="http://wikiworks.com/">WikiWorks</a> consultant for <a href="http://www.ieee.org/">the IEEE</a>, with some help from <a href="http://www.yaronkoren.com/">Yaron Koren</a>.</p>
<p><a href="http://wikiworks.com"><img class="alignnone size-full wp-image-1210" title="WikiWorks" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/wikiworks-header-logo.png" alt="WikiWorks" width="429" height="91" /></a></p>
<p><strong>What&#8217;s next?</strong></p>
<p>There are many many features that can be added to this extension to make it even more awesome. I&#8217;d like to get some initial feedback on version 0.1, so the usability issues and bugs that might be there can be ironed out. Please place any feedback you might have on <a href="http://www.mediawiki.org/wiki/Extension_talk:Survey">the discussion page</a>. This initial release contains all the features my client needed, so if you want to have new capabilities added and can fund the work, definitely contact me <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">http://www.mediawiki.org/wiki/Extension:SurveySurvey</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/09/14/survey-extension-for-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Earth and KML support in (Semantic) Maps 1.0.3</title>
		<link>http://blog.bn2vs.com/2011/09/14/earth-and-kml-support-in-semantic-maps-1-0-3/</link>
		<comments>http://blog.bn2vs.com/2011/09/14/earth-and-kml-support-in-semantic-maps-1-0-3/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 14:37:54 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[Google Earth]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[KML]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[Semantic Maps]]></category>
		<category><![CDATA[Semantic MediaWiki]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[SMW]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1194</guid>
		<description><![CDATA[Yesterday I released version 1.0.3 of the Maps and Semantic Maps MediaWiki extensions. This release re-introduces Google Earth support, this time for Google Maps v3, and enhances the KML/KMZ support for this mapping service as well. Many thanks go to Jon Povey for funding the implementation of these features! Since I didn&#8217;t make any release [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I released version 1.0.3 of the <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a> and <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Maps">Semantic Maps</a> MediaWiki extensions. This release re-introduces Google Earth support, this time for Google Maps v3, and enhances the KML/KMZ support for this mapping service as well. Many thanks go to Jon Povey for funding the implementation of these features! Since I didn&#8217;t make any release announcements for 1.0.1 or 1.0.2, I&#8217;ll just include changes made in these versions as well, effectively treating this as the release after 1.0.</p>
<p><strong>KML/KMZ support</strong></p>
<p>The Google Maps v3 service now supports 2 new KML related parameters: kml and gkml. Both accept a url pointing to a KML (or KMLZ) file. The first one uses a KML parsing library (<a href="https://code.google.com/p/geoxml3/">geoxml3</a>) included in the extension to translate the features described in the KML file into elements to place onto the map. This is very nice for people that do not want to be dependent on third party services, but sadly enough, the library is somewhat limited. It lacks support for more advanced KML features such as polygons and paths. The gkml parameter uses Googles KML service, which pulls the KML file to some Google server, and then decides if it should be send to the client (for simple and small files), or if it should be rendered server side and send as tiles to the client (for big files or files containing advanced features such as polygons).</p>
<p>You can now also choose if you want the map to rezoom after the KML layers have been loaded or not using the kmlrezoom parameter. KML layers will load a bit after the map, since they require extra resources to be loaded, and there is no need to let the user wait to see the normal map until those are done loading.</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2011/09/kmlpath.png"><img class="alignnone size-full wp-image-1195" title="A path with waypoints on a Google Maps map" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/kmlpath.png" alt="A path with waypoints on a Google Maps map" width="407" height="191" /></a></p>
<p><strong>Google Earth support</strong></p>
<p>Maps already has support for Google Earth since on of it&#8217;s earliest versions. This was quite easy to achieve as Google Maps v2 natively supported it. Now with the switch to Google Maps v3 in Maps 1.0, people asked for Google Maps support in that as well. Unfortunately Google Earth is not natively supported here. Maps now provides support for GE using the <a href="https://code.google.com/p/google-maps-utility-library-v3/">Google Maps utility library v3</a>. The earth type can be enabled by adding &#8220;earth&#8221; to the types parameter, or setting it as the default type using &#8220;type&#8221;. Do however note that due to this not being officially supported by Google, it has some deficiencies. For one, when switching to GE, the map controls won&#8217;t be displayed any more, preventing you from switching back. Also, the GE plugin is only supported on Windows and Mac, so won&#8217;t be usable for mobile or Linux users.</p>
<p>A completely new thing added in 1.0.3 is the tilt parameter, which, as you can probably guess, allows you to set the initial tilt of the GE layer.</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2011/09/gearth.png"><img class="alignnone size-full wp-image-1196" title="Google Earth in the browser" src="http://blog.bn2vs.com/wp-content/uploads/2011/09/gearth.png" alt="Google Earth in the browser" width="427" height="191" /></a></p>
<p><strong>Full list of changes since 1.0:</strong></p>
<ul>
<li> Added support for Google Earth in Google Maps v3.</li>
<li> Added tilt parameter for Google Earth in Google Maps v3.</li>
<li> Added kmlrezoom parameter for Google Maps v3 and general $egMapsRezoomForKML setting.</li>
<li> Added API module for geocoding.</li>
<li> Added &#8216;geocoding&#8217; right.</li>
<li> Added language parameter to the mapsdoc hook.</li>
<li> Use of Validator 0.4.10s setMessage method instead of setDescription for better i18n.</li>
<li> Minor improvement to script loading.</li>
<li> Fixed Google Maps v3 JavaScript issue occurring on MediaWiki 1.17.</li>
<li> Fixed internationalization of distances (bug 30467).</li>
<li> Fixed zoom and types parameters for Google Maps v3.</li>
</ul>
<ul>
<li> Added geocodecontrol parameter for the form inputs.</li>
<li> Fixed handling of the semantic link caption in the geographical coordinate datavalue class.</li>
</ul>
<p><strong>What&#8217;s next?</strong></p>
<p>For now, I have no specific plans for changes or addition to either of the  mapping extensions, further then some minor script loading improvements,  as I &#8216;m working on several other projects. However it&#8217;s likely that  people will have suggestions for new features at <a rel="nofollow" href="http://semantic-mediawiki.org/wiki/SMWCon_Fall_2011">SMWCon Fall 2011</a>, which is next week.</p>
<p><strong>Download</strong></p>
<ul>
<li><a href="https://code.google.com/p/mwmaps/downloads/list">Maps downloads</a></li>
<li><a href="https://code.google.com/p/semanticmaps/downloads/list">Maps and Semantic Maps downloads</a></li>
<li>Maps SVN: <a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Maps">tags</a>, <a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Maps/">trunk</a></li>
<li>Semantic Maps SVN: <a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Semantic_Maps">tags</a>, <a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticMaps/">trunk</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/09/14/earth-and-kml-support-in-semantic-maps-1-0-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WikiLovesMonuments and the Upload Wizard</title>
		<link>http://blog.bn2vs.com/2011/08/24/wikilovesmunuments-and-the-upload-wizard/</link>
		<comments>http://blog.bn2vs.com/2011/08/24/wikilovesmunuments-and-the-upload-wizard/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 12:19:40 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[UploadWizard]]></category>
		<category><![CDATA[WikiLovesMonuments]]></category>
		<category><![CDATA[Wikimedia]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1188</guid>
		<description><![CDATA[As this particular project is coming to and end, I figured I&#8217;d do a quick blog post on it. Wiki Loves Monuments (WLM) is a photo contest for European monuments, organized by Wikimedia this September. Last year some JavaScrip hacks on the regular Wikimedia Commons (the media repository for Wikipedia and other Wikimedia Foundation projects) [...]]]></description>
			<content:encoded><![CDATA[<p>As this particular project is coming to and end, I figured I&#8217;d do a quick blog post on it.</p>
<p><a href="http://www.wikilovesmonuments.eu/">Wiki Loves Monuments</a> (WLM) is a photo contest for European monuments, organized by Wikimedia this September. Last year some JavaScrip hacks on the regular <a href="https://secure.wikimedia.org/wikipedia/commons/wiki/">Wikimedia Commons</a> (the media repository for Wikipedia and other <a href="http://wikimediafoundation.org/">Wikimedia Foundation</a> projects) upload interface where used for this contest. This year the new and completely awesome <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:UploadWizard">Upload Wizard</a> (UW) will be used, with configuration optimized for WLM. I created a campaign-based configuration system from the UW and also added a bunch of new settings.</p>
<p>2 new special pages where added. One listing all campaigns, their status, and edit and delete links. This is at Special:UploadCampaigns.</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2011/08/uploadCampaigns.png"><img class="size-full wp-image-1189 alignnone" title="Upload campaign management interface" src="http://blog.bn2vs.com/wp-content/uploads/2011/08/uploadCampaigns.png" alt="Upload campaign management interface" width="634" height="242" /></a></p>
<p>The other special page handles the edit action and displays a list of all available settings that can be modified for the campaign. This is at Special:UploadCampaign/name.</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2011/08/uploadCampaign.png"><img class="size-large wp-image-1190 alignnone" title="Upload campaign admin" src="http://blog.bn2vs.com/wp-content/uploads/2011/08/uploadCampaign-1024x376.png" alt="Upload campaign admin" width="1024" height="376" /></a></p>
<p>A campaign can be applied to the UW by adding the &#8220;campaign&#8221; url parameter with as value the campaign name, ie ?campaign=wlm-be.</p>
<p>One fun thing about the architecture of the campaign system is that the setting support is very generic. I created a <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/UploadWizard/includes/UploadWizardConfig.php?view=markup">new settings class</a> that pulls in the default settings, overrides these with the wikis config (ie PHP vars in LocalSettings.php), passed URL arguments and finally the upload campaign settings if a campaign is specified. I like this kind of setup, as it&#8217;s a lot nicer then dealing with over 9000 global variables, and in the meanwhile already applied some variation of it <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticSignup/SemanticSignup.settings.php?view=markup">in Semantic Signup</a> and <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Survey/Survey.settings.php?view=markup">in my new Surveys extension</a>. And I wrote up a <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Maps/includes/Maps_Settings.php?revision=94439&amp;view=markup">more general and powerful version</a> of such setting handling in the Maps extension. Unfortunately this code uses late static bindings and thus requires PHP 5.3, making it not usable in actual code for quite a while <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Another neat thing is that the <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php?view=markup">upload campaign class</a> only specifies a lift of settings that should be configurable for upload campaigns, together with what kind of HTML form input they should be displayed. That info is then merged with the settings obtained from the settings class and put into a FormSpecialPage, which uses HTMLForm to display anything without any further hassle <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Not used the Upload Wizard before and curious how it works? Go <a href="https://secure.wikimedia.org/wikipedia/commons/wiki/Special:UploadWizard">upload some nice stuff to commons</a> then <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/08/24/wikilovesmunuments-and-the-upload-wizard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Live Translate 1.2</title>
		<link>http://blog.bn2vs.com/2011/08/17/live-translate-1-2/</link>
		<comments>http://blog.bn2vs.com/2011/08/17/live-translate-1-2/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 15:58:15 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Live Translate]]></category>
		<category><![CDATA[localStorage]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Refactoring]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1182</guid>
		<description><![CDATA[A few days ago I released version 1.2 of the Live Translate MediaWiki extension, which is a major update bringing mainly under-the-hood improvements. I&#8217;ve worked on this for about 3 days in my free time, mainly to try out some JavaScript techniques I had not utilized yet. These are the changes for 1.2: Rewrote translation [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I released version 1.2 of the <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Live_Translate">Live Translate</a> MediaWiki extension, which is a major update bringing mainly under-the-hood improvements. I&#8217;ve worked on this for about 3 days in my free time, mainly to try out some JavaScript techniques I had not utilized yet.</p>
<p>These are the changes for 1.2:</p>
<ul>
<li>Rewrote translation control JavaScript to a <a href="http://www.jquery.com/">jQuery</a> plugin.</li>
<li>Added caching layer utilizing memory and <a href="https://secure.wikimedia.org/wikipedia/en/wiki/LocalStorage">LocalStorage</a> when available to speed up local translations.</li>
<li>Added API module to query translation memories.</li>
<li>Added i18n alias file.</li>
<li>Added TMX admin user rights group.</li>
</ul>
<p>This post is about the first two.</p>
<p><strong>Some background</strong></p>
<p>The Live Translate (LT) extension allows live translation of content in wiki pages. For this it uses translation services such as Google Translate or Microsoft Translator. It also allows specifying your own translations for certain words within the wiki, which will then be left alone by the (remote) translation services. Such specifications of translations are called translation memories (TM), and are typically done in a special XML-based format called Translation Memory eXchange (TMX). LT also supports a more wiki-friendly format, custom written, which is DSV-based. Translation memories in both these formats can be embedded in wiki pages designated as TM or you can point to files hosted somewhere else. What it comes down to is that there are a set of local translations, which require special handling: local translation and be ignored by the remote translation service.</p>
<p>On every translation, the JavaScript needs to know which are the special  words that have a local translation, so translations for these can be  requested, and measures can be taken to not send them to the remote  translation services. This means doing a call to the wikis API to obtain  these words. In case of big translation memories, this requires several  calls to obtain all words, often resulting in a few seconds wait before  local translations are even requested.  If there are words that  have local translations on the page, a single request I send to another part of the API to obtain these translations for the language currently translated to. This usually bring the total time to complete local translation to somewhere between 2 and 5 seconds, after which, in version 1.1 and earlier, remote translation is kicked of.</p>
<p><strong>The idea</strong></p>
<p>Translation memories do not tend to change all the time, so it&#8217;s very inefficient to request all special words for every translation, and in somewhat lesser degree to always request the translations. The obvious answer to this is local caching, and since I wanted to play around with HTML5 localStorage a bit, this is exactly what I did. I also wanted to make use of JavaScript capabilities I was not really aware of back in last December, when writing Live Translate, so took this as an opportunity to also do some JavaScript refactoring. These being primarily prototypes, closure scopes and callbacks.</p>
<p><strong>The realization</strong></p>
<p>I made a whole bunch of client side changes (and some server side changes to the API), but the most significant ones are the creation of a translation memory object which takes care of all caching, and the rewrite of the translation control to a jQuery plugin.</p>
<p><span style="text-decoration: underline;">Translation memory object</span></p>
<p>In file <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/includes/ext.lt.tm.js?revision=94102&amp;view=markup">includes/ext.lt.tm.js</a>.</p>
<p>The translation memory object class is named simply &#8220;memory&#8221; and resides in the &#8220;lt&#8221; namespace. It acts as abstraction layer via which special words and translations of those special words can be accessed. It takes care of all API interaction and caching and exposes 2 simple functions, getSpecialWords and getTranslations, which are called by the translation control.</p>
<p>When the cache is empty, the memory will request a new hash via the API, which indicates the &#8220;version&#8221; of the translation memories on the server, and is later used for cache invalidation. It the proceeds fetching the requested special words or translations of special words and returns these via a callback passed to either getSpecialWords or getTranslations. Before this last step is done, the obtained data is cached in memory (the words and translations fields, one lines 26 and 30, respectively), and, when available, also in HTML5 localStorage. The in memory caching only yields advantages when doing multiple translations on a single page, which is rather rare, so is not that much of a win. The data stored in localStorage on the other hand, persists when navigating to other pages, even when closing the browser and re-opening it. localStorage really isn&#8217;t a cache on it&#8217;s own, but the lt.memory class uses it as one.</p>
<p>When the cache is not empty, a single request to the API is made to compare the earlier obtained hash and see if any changes to the TMs have been made, and thus if the cache should be invalidated. If changes have been made, the stored data is discarded and pretty much the same as when the cache was empty happens. If no changes have been made, locally stored data is used where possible. In case of the list of special words, no requests will have to be made at all, since all such words are already known. For the translations of these words it&#8217;s a little trickier, since the needed data here varies from page to page, and also depends on both the source and destination language. The lt.memory class checks which of the needed data if available, and in case there is a remainder of non-known translations, requests these. The newly obtained translations are then of course also added to the cache.</p>
<p><span style="text-decoration: underline;">jQuery plugin</span></p>
<p>In file <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/includes/jquery.liveTranslate.js?revision=94440&amp;view=markup">jquery.liveTranslate.js</a>.</p>
<p>This plugin contains a lot of already existing code from Live Translate 1.1, but is structured a lot better. It takes care of creating all the HTML needed for the control (while in 1.1, the HTML was provided, and only events where bound to it) in it&#8217;s setup function (line 147). The click event handler for the translation button calls the obatinAndInsetSpecialWords which uses the getSpecialWords function of the lt.memory class to obtain the words with local translations, and then inserts them, meaning that occurrences of these words are wrapped into notranslate spans, which then enables finding all words which should be translated locally, and makes them be ignored by the remote translation services. The click handler function passed doTranslations as completion callback to obatinAndInsetSpecialWords, which starts both local and remote translation in parallel. Local translation is done, as you can uncountably guess, by calling getTranslations function.</p>
<p><strong>The results</strong></p>
<p>Once the cache is warm (the user made a translation before) and valid (the TMs have not changed), local translation is practically instant (~0.4 seconds in my tests). Since remote translation now starts as soon as the special words are known, this can take as little as ~0.2 seconds, a huge difference compares to the earlier up to 5 seconds and possibly longer. All assuming you are using a modern browser of course <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Not to forget, the code is a lot better structures now. It should be a lot easier to track the order of execution, and it&#8217;s now possible (JavaScript wise) to place multiple translation controls onto a single page (which has little practical value, but indicates a better design).</p>
<p>And, maybe most importantly for me, I now have a much better grasp of the earlier mentioned prototypes, callbacks and closure scopes. Perhaps most of the time I spend on this version was figuring out how to properly use these and debugging out misconceptions I had about how they worked <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Live Translate</strong></p>
<ul>
<li><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Live_Translate">Documentation</a></li>
<li><a href="https://code.google.com/p/livetranslate/downloads/list">Downloads</a></li>
<li>SVN trunk (<a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/">viewvc</a>, <a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/LiveTranslate/">svnroot</a>)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/08/17/live-translate-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semantic MediaWiki 1.6 released!</title>
		<link>http://blog.bn2vs.com/2011/07/30/semantic-mediawiki-1-6-released/</link>
		<comments>http://blog.bn2vs.com/2011/07/30/semantic-mediawiki-1-6-released/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 17:29:42 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Semantic Bundle]]></category>
		<category><![CDATA[Semantic MediaWiki]]></category>
		<category><![CDATA[Semantic Web]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[SMW]]></category>
		<category><![CDATA[Validator]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1103</guid>
		<description><![CDATA[That&#8217;s right, the next big release of Semantic MediaWiki is finally here! A little over a year and six minor releases after SMW 1.5. And a big release it is, packing my improvements and several new features. It has been in the making over the past four months and contains contributions by many people. So [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://semantic-mediawiki.org/"><img class="alignright size-full wp-image-1178" title="Semantic MediaWiki" src="http://blog.bn2vs.com/wp-content/uploads/2011/07/SMW_logo_180px.png" alt="Semantic MediaWiki" width="130" height="130" /></a>That&#8217;s right, the next big release of <a href="http://semantic-mediawiki.org">Semantic MediaWiki</a> is finally here! <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  A little over a year and six minor releases after  SMW 1.5. And a big release it is, packing my improvements and several  new features. It has been in the making over the past four months and contains contributions by many people. So let&#8217;s have a look at all the new awesomeness <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Support for RDF triplestores</strong></p>
<p>Full support added for storing SMW data directly within an RDF triplestore, and for answering  #ask queries based on this data. The communication happens via SPARQL  (1.1), and all SPARQL-capable stores should be supported. The following  settings are needed in LocalSettings.php:</p>
<blockquote><p>$smwgDefaultStore = &#8216;SMWSparqlStore&#8217;;<br />
$smwgSparqlDatabase = &#8216;SMWSparqlDatabase&#8217;;<br />
// The following should be set to the URLs to reach the store:<br />
$smwgSparqlQueryEndpoint = &#8216;http://localhost:8080/sparql/&#8217;;<br />
$smwgSparqlUpdateEndpoint = &#8216;http://localhost:8080/update/&#8217;;<br />
$smwgSparqlDataEndpoint = &#8216;http://localhost:8080/data/&#8217;; // can be empty</p></blockquote>
<p>The specific support that SMW used to have for the RAP RDF store has been discontinued.</p>
<p><strong>The Type namespace has been abolished</strong></p>
<p>Builtin types now are displayed by the special page Special:Types,  and there are no &#8220;custom types&#8221; any longer. By default, the Type  namespace is gone and existing pages in this namespace can no longer be  accessed. This can be changed by setting $smwgHistoricTypeNamespace =  true in LocalSettings.php before including SMW.</p>
<p><strong>Changes to units of measurement</strong></p>
<p>Changed the way in which units of measurement work. Type:Number now  does not accept any units, and a new type &#8220;Quantity&#8221; is used for numbers  with units. Units must be declared on the property page (not on the  Type page as before), and only units that have a declared conversion  factor are accepted.</p>
<p><strong>Type:Record changes</strong></p>
<p>The declaration of Type:Record properties has changed. Instead of a  list of datatypes, the declaration now requires a list of properties  that are to be used for the fields of the record. The declaration is  still done with the property &#8220;has fields&#8221; as before. Properties must not  be used more than once in has_fields, or the order of values will be  random.</p>
<p><strong>Reworked internal data model</strong></p>
<p>Reworked  internal data model, cleaning up and re-implementing SMWDataValue and  all of its subclasses, and introducing new data item classes to handle  data. The class SMWCompatibilityHelpers provides temporary help for  extensions that still depend on the old format and APIs.</p>
<p>This  change is very important compatibility wise, as it removes support for  some older behavior and deprecates a bunch more. Older versions of a lot  of SMW extensions will not work with SMW 1.6. However, since 1.6 has  been in the making for quite some time, most, if not all, of these  extensions have released one or more versions that work just fine with  1.6. So if you stick with the latest releases, you should be good.</p>
<p>There are already 2 SMW extensions that now require SMW version 1.6 or later: <a href="http://mapping.referata.com/wiki/Semantic_Maps">Semantic Maps</a> 1.0 and the new kid in town: <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist">Semantic Watchlist</a> (<a href="http://blog.bn2vs.com/2011/07/30/new-mediawiki-extension-semantic-watchlist/">see Semantic Watchlist release post</a>).</p>
<p><strong>Result formats make use of Validator</strong></p>
<p>Semantic MediaWiki now makes use of the <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Validator">Validator extension</a> to handle parameters passed to result printers. This opens the door to  numerous awesome new functionality. For one, it allows for better  parameter error feedback to the user. In SMW &lt; 1.6 when you enter a  text value for a numeric parameter, it&#8217;ll simple be ignored (without  giving any warning). With this new approach the user will get a warning  along the lines of &#8220;The value &#8216;foobar&#8217; is not valid for parameter limit,  it must be an integer.&#8221;. Another advantage of using Validator here is  that the query argument GUI on Special:Ask can show more fitting  controls and display default values. A third win, is that writing new  query printers has now become easier, as you just have to specify the  parameters they should accept, and then don&#8217;t have to bother with  cleaning, validating and formatting them. Further things that can be  done with this in the future are automatic generation of documentation  per result format, which would be a huge improvement over the current  documentation and smarter behavior (such as autocompletion and live  validation) in interfaces where the values for these parameters can be  specified.</p>
<p><strong>New DSV format</strong></p>
<p>I added a new result format to SMW that outputs data as UNIX-style  Delimiter Separated Values. For those not familiar with the differences  between DSV and CSV (which was already supported), it comes down to sane  escaping of the delimiter characters. Instead of the weird and hard to  parse approach taken in CSV, the familiar backlashing technique is used  in DSV. You can use this format by adding &#8220;format=dsv&#8221; to any ask query.</p>
<p><strong>New API module for version info</strong></p>
<p>This is a very small feature I added geared towards developers and  the SMW registry tool in particular; it has not relevance to regular end  users. Up until now the SMW registry tool obtained info about SMW  installs by scraping Special:Version, which is a HTML page intended for  humans to look at, and by scraping Special:SemanticStatistics, which is  also a HTML page. Now the info provided by these pages and used by the  SMW registry, ie the version of SMW and the number of properties, users  and pages, can be obtained via the MediaWiki API using action=smwinfo.</p>
<p><strong>New smwdoc parser hook</strong></p>
<p>Similar to the new API module, this new parser hook is not geared to  most end users, but rather to documenters and site admins. This hook  utilizes Validators auto documentation capabilities to display tables  with parameter info, such as name, type, default value and description,  for a specified result format. It&#8217;s in essence a result format oriented  version of Validators more general purpose describe parser  hook. As soon as the SMW documentation wiki updates to 1.6, it&#8217;ll be  possible to use this hook to fill part of the documentation gap there  unfortunately is.</p>
<p><strong>Some noteworthy fixes</strong></p>
<ul>
<li>PostgreSQL support</li>
<li>Output issues in the JSON result format</li>
</ul>
<p>I&#8217;m probably forgetting others here <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="http://sourceforge.net/projects/semediawiki/files/semediawiki/Semantic%20MediaWiki%201.6/SemanticMediaWiki1.6.zip/download">Semantic MediaWiki 1.6 release, zip archive</a></li>
<li><a href="http://sourceforge.net/projects/semediawiki/files/semediawiki/Semantic%20MediaWiki%201.6/SemanticMediaWiki1.6.7z/download">Semantic MediaWiki 1.6 release, 7z archive</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_5_6/">Semantic MediaWiki 1.6 release, svn tag</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticMediaWiki/">Semantic MediaWiki, svn trunk</a></li>
</ul>
<p>Do note that as of this release, SMW requires Validator, which is included in the release packages, but obviously needs to be obtained separately when checking out with SVN.</p>
<p><strong>What&#8217;s next?</strong></p>
<p><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/User:Devayon">Devayon Das</a>, a <a href="https://code.google.com/soc/">Google Summer of Code</a> student, mentored by <a class="mw-redirect" title="Markus Krötzsch" href="http://semantic-mediawiki.org/wiki/Markus_Kr%C3%B6tzsch">Markus Krötzsch</a>, is working on improving the search and browse interfaces of SMW (<a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/User:Devayon/GSoC2011">read all about it here</a>). This work will probably end up in one of the upcoming 1.6.x releases. I&#8217;d also like to make some improvements to the automatic documentation generation via the smwdoc parser hook by the next release, mainly focusing on internationalization. I&#8217;m not aware of any other concrete plans to make changes to SMW itself for now. There are many things that can be done, and several projects that are being looked at, but only time will tell which of these get any traction.</p>
<p>In any case, if you are interested in the future of SMW, I definitely recommend attending <a href="http://semantic-mediawiki.org/wiki/SMWCon_Fall_2011">SMWCon</a>, the SMW event that&#8217;s held once a year in both the US and the EU. The next one will take place from September 21st to September the 23rd, in Berlin, Germany.</p>
<p><strong>More frequent updates</strong></p>
<p>In an effort to provide the community with more frequent updates on the status of SMW development and other news, a <a href="https://twitter.com/#!/SemanticMW">Twitter</a> and an <a href="http://identi.ca/smw">Identi.ca</a> account have been set up. You can follow these to stay up to date on the latest SMW developments <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Further info</strong></p>
<ul>
<li><a href="http://semantic-mediawiki.org/wiki/Semantic_MediaWiki_1.6">Semantic MediaWiki 1.6 page on the SMW wiki</a></li>
<li><a href="http://semantic-mediawiki.org/wiki/Help:Installation_1.6">Installation and upgrade instructions</a></li>
<li><a href="http://svn.wikimedia.org/viewvc/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_6/RELEASE-NOTES?view=co">Raw release notes</a></li>
</ul>
<p>&nbsp;</p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 1252px; width: 1px; height: 1px; overflow: hidden;">
<p>Semantic MediaWiki 1.6 release, zip archive</p>
<p>&nbsp;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/07/30/semantic-mediawiki-1-6-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New MediaWiki extension: Semantic Watchlist</title>
		<link>http://blog.bn2vs.com/2011/07/30/new-mediawiki-extension-semantic-watchlist/</link>
		<comments>http://blog.bn2vs.com/2011/07/30/new-mediawiki-extension-semantic-watchlist/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 15:33:08 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[Semantic MediaWiki]]></category>
		<category><![CDATA[Semantic Watchlist]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[SMW]]></category>
		<category><![CDATA[Wikimedia]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1106</guid>
		<description><![CDATA[Today I released the first version of a brand new MediaWiki extension titled Semantic Watchlist. It extends Semantic MediaWiki by adding the capability to watch/follow sets of properties for groups of pages (that can be specified with categories and namespaces). You can view changes to these properties via Special:SemanticWatchlist, which works similar to the regular [...]]]></description>
			<content:encoded><![CDATA[<p>Today I released the first version of a brand new MediaWiki extension titled <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist">Semantic Watchlist</a>. It extends <a href="http://semantic-mediawiki.org/">Semantic MediaWiki</a> by adding the capability to watch/follow sets of properties for groups of pages (that can be specified with categories and namespaces). You can view changes to these properties via Special:SemanticWatchlist, which works similar to the regular MediaWiki watchlist. And you can even request to be notified via email when a change is made!</p>
<p><strong>Feature overview:</strong></p>
<ul>
<li><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#The_watchlist">A watchlist page</a> listing changes to properties watched by the user.</li>
<li>Per-user <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Watchlist_preferences">optional email notification</a> per edit that changes properties.</li>
<li>Integration with <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Watchlist_preferences">user preferences</a> to allow users to specify which watchlist groups they want to follow, and if they want to receive emails on changes.</li>
<li><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Watchlist_groups">Special:WatchListConditions</a> as administration interface for watchlist groups.</li>
<li><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Extending_Semantic_Watchlist">API module</a> to query property changes grouped by edit for a single user.</li>
<li><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Extending_Semantic_Watchlist">API modules</a> to add, modify and delete the watchlist groups.</li>
</ul>
<p>Let&#8217;s have a look at the different parts of the interface:</p>
<p><strong>The watchlist</strong></p>
<p>Each user can view changes to properties they watch on <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist#The_watchlist"> Special:SemanticWatchlist</a>, which looks and works similar to the regular  watchlist. Items that have not been viewed yet on the watchlist will be  indicated as &#8216;NEW&#8217;.</p>
<p><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#The_watchlist"><img class="alignnone size-full wp-image-1158" title="Semantic Watchlist page showing changes to watched properties" src="http://blog.bn2vs.com/wp-content/uploads/2011/07/swl-watchlist.png" alt="Semantic Watchlist page showing changes to watched properties" width="528" height="368" /></a></p>
<p><strong>Watchlist preferences</strong></p>
<p>Each user can manage which watchlist groups they follow via their user  preferences. They can also choose if they want to receive email  notifications or not. These preferences can be found on <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist#Watchlist_preferences"> Special:Preferences</a>, which is linked at the right top of the page in  most skins for logged in users.</p>
<p><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Watchlist_preferences"><img class="alignnone size-full wp-image-1160" title="Semantic Watchlist user preferences" src="http://blog.bn2vs.com/wp-content/uploads/2011/07/swl-prefs-2.png" alt="Semantic Watchlist user preferences" width="804" height="338" /></a></p>
<p><strong>Watchlist groups</strong></p>
<p>The watchlist groups can be managed via the <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist#Watchlist_groups">Special:WatchlistConditions</a> page by people that have the &#8216;semanticwatchgroups&#8217; right, by default  only administrators. Each group has a name, which allows users to easily  recognize the groups in their preferences, and a single category,  namespace or concept it covers. Only changes to properties on pages in  this category, namespace or concept will be shown to users watching this  group. Each group also has a list of properties, which further  restricts what property changes should be shown to the user.</p>
<p><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist#Watchlist_groups"><img class="alignnone size-full wp-image-1159" title="Administrative interface where watchlist conditions/groups can be managed" src="http://blog.bn2vs.com/wp-content/uploads/2011/07/swl-watchlistconditions.png" alt="Administrative interface where watchlist conditions/groups can be managed" width="888" height="503" /></a></p>
<p><strong>Email notifications</strong></p>
<p>When you choose to receive email notifications for changes to semantic properties covered by watchlist groups you watch, they will appear both in your watchlist and your inbox. The below screenshot is a simple example of a notification email.</p>
<p><a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist"><img class="alignnone size-full wp-image-1161" title="Email notification send by Semantic Watchlist listing changed to watched properties" src="http://blog.bn2vs.com/wp-content/uploads/2011/07/swl-email.png" alt="Email notification send by Semantic Watchlist listing changed to watched properties" width="735" height="265" /></a></p>
<p><strong>Extending Semantic Watchlist</strong></p>
<p>Semantic Watchlist is in part a workflow extension, which makes it  important for other extensions and tools to interact with it. This is  possible via the hooks and API modules Semantic Watchlist provides.</p>
<p>API modules:</p>
<ul>
<li>addswlgroup: API module to add semantic watchlist groups.</li>
<li>deleteswlgroup: API module to delete semantic watchlist groups.</li>
<li>editswlgroup: API module to modify semantic watchlist groups.</li>
<li>semanticwatchlist: Returns a list of modified properties per page for a persons semantic watchlist.</li>
</ul>
<p>Hooks:</p>
<ul>
<li>SWLBeforeEmailNotify: $group, $user, $changeSet, $describeChanges, &amp;$title, &amp;$emailText</li>
<li>SWLBeforeEditInsert: &amp;$this</li>
<li>SWLAfterEditInsert: &amp;$this</li>
<li>SWLBeforeChangeSetInsert: &amp;$this, &amp;$groupsToAssociate, &amp;$editId</li>
<li>SWLAfterChangeSetInsert: &amp;$this, $groupsToAssociate, $editId</li>
</ul>
<p><strong>Further plans</strong></p>
<p>I think this extension opens up a lot of new possibilities for the SMW platform in the area of workflow. Due to it&#8217;s API modules and hooks, it&#8217;s very easy for other extensions to build on top of the watchlist functionality, so I&#8217;m curious as to what will happen there.</p>
<p>This first release comes with core functionality, but at places lacks polish. And since it&#8217;s the first release of a somewhat complex extension, I do expect issues to show up in use cases not tested for yet. Both these factors make it likely that a second release will be made relatively soonish.</p>
<p>Since I think this extension is such a great addition to the already awesome SMW environment, I&#8217;m going to give a talk about it at the upcoming SMWCon. That&#8217;s bound to yield some interesting feedback <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Requirements</strong></p>
<ul>
<li><a title="MediaWiki" href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/MediaWiki">MediaWiki</a> 1.17 or above</li>
<li><a title="Semantic MediaWiki" href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Semantic_MediaWiki">Semantic MediaWiki</a> 1.6 or above</li>
<li>PHP 5.2 or above</li>
</ul>
<p><strong>Download</strong></p>
<ul>
<li>Semantic Watchlist 0.1 download [<a href="https://semanticwatchlist.googlecode.com/files/SemanticWatchlist0.1.zip">zip</a>, <a href="https://semanticwatchlist.googlecode.com/files/SemanticWatchlist0.1.7z">7z</a>]</li>
<li><a href="https://code.google.com/p/semanticwatchlist/downloads/list">List of release downloads</a></li>
<li>SVN tag checkout: http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticWatchlist/REL_0_1/</li>
<li>SVN trunk checkout: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticWatchlist/</li>
</ul>
<p><strong>Some background</strong></p>
<p>I developed the <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Watchlist">Semantic Watchlist</a> extension as <a href="http://wikiworks.com/">WikiWorks</a> consultant for <a href="http://www.ieee.org/">the IEEE</a>, with some help from <a href="http://www.yaronkoren.com/">Yaron Koren</a>.</p>
<p><a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Watchlist"></a><a href="http://wikiworks.com/"><img class="alignnone size-full wp-image-1162" title="WikiWorks, a consulting company dedicated exclusively to MediaWiki implementation." src="http://blog.bn2vs.com/wp-content/uploads/2011/07/wikiworks-header-logo.png" alt="WikiWorks, a consulting company dedicated exclusively to MediaWiki implementation." width="429" height="91" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/07/30/new-mediawiki-extension-semantic-watchlist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maps and Semantic Maps 1.0 released!</title>
		<link>http://blog.bn2vs.com/2011/07/20/maps-and-semantic-maps-1-0-released/</link>
		<comments>http://blog.bn2vs.com/2011/07/20/maps-and-semantic-maps-1-0-released/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 14:21:35 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Geocoding]]></category>
		<category><![CDATA[GNU GPL]]></category>
		<category><![CDATA[Google Earth]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[KML]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[Open Layers]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[OSM]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Semantic Maps]]></category>
		<category><![CDATA[Semantic MediaWiki]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[SMW]]></category>
		<category><![CDATA[Yahoo! Maps]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1075</guid>
		<description><![CDATA[It&#8217;s been a little over half a year since the last mayor release of the Maps and Semantic Maps extensions, but now 1.0, featuring many new features and internal improvements, is here! This is the most significant release since version 0.1, which quite coincidentally, was released exactly 2 years ago today Let&#8217;s have a look [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a little over half a year since the last mayor release of the <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Maps">Maps</a> and <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Maps">Semantic Maps</a> extensions, but now 1.0, featuring many new features and internal improvements, is here! This is the most significant release since version 0.1, which quite coincidentally, <a href="http://blog.bn2vs.com/2009/07/20/maps-0-1-released/">was released exactly 2 years ago</a> today <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Let&#8217;s have a look at all the new awesomeness:</p>
<p><strong>Google Maps v3 support</strong></p>
<p>Maps has had some very basic support for <a href="http://mapping.referata.com/wiki/Google_Maps_v3">Google Maps v3</a> since version 0.5.3, back when the v3 API was still in beta. Right now the v3 API is out of beta, and the v2 one has been deprecated a few months back, so it was definitely time to further implement support for v2. This new version of Google Maps brings many improvements, focusing mostly on performance (loading speed of the maps, esp on mobile devices), but also several other cool things such as streetview support and easy adding of layers such as traffic. Since the v2 API has been deprecated it makes only sense that the default mapping service in Maps has changed from Google Maps v2 to Google Maps v3. It&#8217;s not really a new feature, but awesome nonetheless: you don&#8217;t need an API key for Google Maps v3! So when setting up Maps on a new wiki (using Google Maps), you won&#8217;t have to bother with any API key configuration any more, it&#8217;ll just work <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Support for the former is still there, so if you want to retain the exact same functionality as you have with v0.7 of Maps (or earlier), you can still get those maps using service=googlemaps2 (or format=googlemaps2 in SMW queries). One feature has been removed from the v2 implementation, which is the overlays control. This has to do with internal changes and performance optimizations discussed later on in this blog post. Be sure to check out the <a href="http://mapping.referata.com/wiki/Google_Maps_v3">Google Maps v3 Maps documentation</a> to discover all the cool features it supports.</p>
<p><a href="http://mapping.referata.com/wiki/Google_Maps_v3"><img class="alignnone size-full wp-image-1085" style="border: 1px solid black;" title="Google Maps v3 map showing a part of New York City" src="http://blog.bn2vs.com/wp-content/uploads/2011/04/maps0.8-gmaps3.png" alt="Google Maps v3 map showing a part of New York City" width="869" height="249" /></a></p>
<p><a href="http://mapping.referata.com/wiki/Google_Maps_v3"><img class="alignnone size-full wp-image-1086" style="border: 1px solid black;" title="Google Maps v3 map showing a part of New York City" src="http://blog.bn2vs.com/wp-content/uploads/2011/04/maps0.8-gmaps3-streetview.png" alt="Google Maps v3 map showing a part of New York City" width="868" height="249" /></a></p>
<p><a href="http://mapping.referata.com/wiki/Google_Maps_v3"><img class="alignnone size-full wp-image-1087" style="border: 1px solid black;" title="Google Maps v3 map showing a part of New York City using Google Streetview" src="http://blog.bn2vs.com/wp-content/uploads/2011/04/maps0.8-gmaps3-streetview1.png" alt="Google Maps v3 map showing a part of New York City using Google Streetview" width="868" height="247" /></a></p>
<p><strong>Improved form inputs</strong></p>
<p>Since it&#8217;s first release Semantic Maps has had <a href="http://mapping.referata.com/wiki/Help:Forms">form inputs</a> using Google Maps v2, Yahoo! Maps and OpenLayers. These inputs allow for entering geographical coordinates in Semantic <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Forms">Forms forms</a> via a nice GUI with a map and an option to geocode an address. Nothing much has changed to these inputs since that initial release, until now. All input, including a new Google Maps v3 one, now have a &#8220;set location&#8221; button next to the coordinates box, which sets the map to that location, as was already the case with the geocoding button next to the address field. Some minor layout improvements have also been made, and hitting enter in the coordinates or geocoding fields will result in what you&#8217;d expect, rather then submitting the form. The <a href="http://mapping.referata.com/wiki/OpenLayers">OpenLayers</a> form input now also supports geocoding, making use of the new GeoNames API; more on that later.</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2011/07/googlemaps3fi2.png"><img class="alignnone size-full wp-image-1155" style="border: 1px solid black;" title="Google Maps v3 form input" src="http://blog.bn2vs.com/wp-content/uploads/2011/07/googlemaps3fi2.png" alt="Google Maps v3 form input" width="769" height="413" /></a></p>
<p><strong>Use of the MediaWiki resource loader</strong></p>
<p>MediaWiki 1.17 introduces a resource loader for JavaScript and CSS, which both Maps and Semantic Maps now make use of for all their JS and CSS resources. The <a href="http://www.mediawiki.org/wiki/Resource_loader">resource loader</a> does several neat things, the most important thing being delaying loading (and execution) of resources until after page load as well as combining and minifying them, which is very important for performance (page load time). This means that when you have over 9000 maps on your page, it&#8217;ll actually load before protons decay away, initially showing only gray boxes where the maps should be, and then one-by-one loading the maps into them. The resource loader does several other cool things, such as automatic right-to-left conversion of CSS and neat conversion of i18n messages from PHP to JS. Making use of the RL when available but at the same time retaining compatibility with pre-RL MediaWiki turned out to be a bit difficult and it would greatly complicate the code, so I decided to simply not do this. This obviously means you will need MediaWiki 1.17 in order to use (Semantic) Maps 0.8.x and later. Can&#8217;t use 1.17 yet for some reason? Don&#8217;t panic! I&#8217;ll continue to support the 0.7.x for a while longer, fixing bugs as they are found. Don&#8217;t expect any new features there though.</p>
<p><strong>Support for the new GeoNames API</strong></p>
<p>Maps has a new geocoding service: the new <a href="http://www.geonames.org/">GeoNames</a> API. It already had support for GeoNames, but it seems this service is now only offered as legacy support. (I&#8217;m not completely sure about this, if someone better familiar with the service knows, please poke me.) A big change with the new service is that you need a GeoNames API account to use it, which you can create <a href="http://www.geonames.org/login">here</a>. You then need to set your accounts user name in your LocalSettings.php file. Maps still has the &#8216;geonames&#8217; service as default for #geocode and OpenLayers maps. If you set the account name, the new service will be used, if not, Maps will fall back to the old one, so you can upgrade to 0.8 without geocoding suddenly failing because you don&#8217;t have a GeoNames account. For more info see the <a href="http://mapping.referata.com/wiki/GeoNames">GeoNames documentation for Maps</a>.</p>
<p><strong>JavaScript overhaul</strong></p>
<p>Similarly to the form inputs in Semantic Maps, all the JavaScript in both Maps and Semantic Maps has seen quite little attention since the initial releases of the extensions. Many additions have been made to add new functionality, but the structure has remained the same ever since. All of it has now been rewritten to <a href="http://www.jquery.com/">jQuery</a> plugins, making it a lot more orderly and easy to extend.</p>
<p><strong>More internal improvements</strong></p>
<p>Not only the JavaScript has seen significant improvements, but some  legacy code has also been thrown out of the PHP, making it a lot less  complex, more easy to track the code flow and definitely makes it easier  to add new functionality. This rewrite is very much a follow up to  internal improvements made in versions 0.6, 0.7 and 0.7.3, and completes  getting rid of some bad old architecture in the core Maps code. Future  releases will therefore most likely focus a lot more on simply adding  new features <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>And more&#8230;</strong></p>
<p>For a full list of changes, see the <a href="http://mapping.referata.com/wiki/Maps_and_Semantic_Maps_1.0_released">release announcement</a>. These do not list the huge amount of internationalization updates and small improvements made by a lot of contributors by reporting issues and providing patches. Thanks to all!</p>
<p><strong>How stable is it?</strong></p>
<p>A lot of internal changes have been made, but at the same time, most of  these have been made about 3 months back. Several wikis have been using  alpha versions of 1.0 ever since, and a release candidate was made a few  days back. Since there are no known issues at this point, I decided to  release 1.0. So yes, it should be pretty stable, although you might run  into minor issues with less frequently used components. If you do,  please report it, so they can be addressed quickly in a 1.0.1 release.</p>
<p><strong>Legacy support for 0.7.x<br />
</strong></p>
<p>As an extension developer and MediaWiki consultant, I&#8217;m quite aware  that  a lot of people are not in positions to update their MediaWiki to  1.17  just yet, preventing them from upgrading Maps and Semantic Maps.  For  this reason I decided way back when starting the development of  version  1.0 to continue limited support of version 0.7.x for a while.  Versions  0.7.4 to 0.7.7 have been released especially for this purpose,  and I&#8217;ll  continue to backport important fixes. Don&#8217;t expect any new  features to  show up for 0.7.x though.</p>
<p><strong>What&#8217;s next?</strong></p>
<p>Although the current set of functionality is pretty solid, there are  many other geographical features one can imagine. Features such as  marker clustering, static maps, route plotting (without the use of KML),  ect, have been on the wishlist practically since the inception of the  Maps extension. There is nothing really standing out for me enough to go  ahead and implement it in my free time. If any such feature is  important to you and you can fund it&#8217;s development, definitely contact  me. Of course I&#8217;ll continue to support the extension and make fixes  where needed.</p>
<p>The Semantic MediaWiki 1.6 release will be followed by a new <a href="http://www.mediawiki.org/wiki/Semantic_Bundle">Semantic Bundle</a>, which will include this new version of Maps and Semantic Maps.</p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="https://mwmaps.googlecode.com/files/Maps1.0.zip">Maps 1.0</a> (archive)</li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Maps/REL_1_0/">Maps 1.0</a> (svn tag)</li>
<li><a href="https://semanticmaps.googlecode.com/files/MapsAndSemanticMaps1.0.zip">Maps and Semantic Maps 1.0</a> (archive)</li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMaps/REL_1_0/">Semantic Maps 1.0</a> (svn tag)</li>
</ul>
<ul>
<li><a href="https://mwmaps.googlecode.com/files/Maps0.7.7.zip">Maps 0.7.7</a> (archive)</li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Maps/REL_0_7_7/">Maps 0.7.7</a> (svn tag)</li>
<li><a href="https://semanticmaps.googlecode.com/files/MapsAndSemanticMaps0.7.7.zip">Maps and Semantic Maps 0.7.7</a> (archive)</li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMaps/REL_0_7_7/">Semantic Maps 0.7.7</a> (svn tag)</li>
</ul>
<p><a href="http://www.referata.com">Referata</a>, which runs the <a href="http://mapping.referata.com/wiki/">documentation wiki</a> for the mapping extensions has upgraded to version 1.0, so you can have a look at and try out the new features yourself on the <a href="http://mapping.referata.com/wiki/Examples">example/demo pages</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/07/20/maps-and-semantic-maps-1-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live Translate 1.1 released</title>
		<link>http://blog.bn2vs.com/2011/06/16/live-translate-1-1-released/</link>
		<comments>http://blog.bn2vs.com/2011/06/16/live-translate-1-1-released/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 15:51:05 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Live Translate]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Planet Wikimedia]]></category>
		<category><![CDATA[Translating]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=1141</guid>
		<description><![CDATA[I just released a new version of the Live Translate extension for MediaWiki. Live Translate is a simple extension that allows live translation of wiki pages using Google Translate or (as of version 1.1) Microsoft Translator. It also enables you to define a &#8220;dictionary&#8221; of certain words or phrases and their translations; any word or [...]]]></description>
			<content:encoded><![CDATA[<p>I just released a new version of the <a href="https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Live_Translate">Live Translate</a> extension for MediaWiki.</p>
<p>Live Translate is a simple extension that allows live translation of wiki pages using Google Translate or (as of version 1.1) Microsoft Translator. It also enables you to define a &#8220;dictionary&#8221; of certain words or phrases and their translations; any word or phrase in the original text found in the &#8220;dictionary&#8221; will be translated using that dictionary, instead of using the Google/Microsoft translation service.</p>
<p>As you can deduce from the above description, one of the new features in version 1.1 is the ability to choose Microsoft Translator as translation service instead of Google Translate, which remains the default for now. The reason for the addition of this service is that Google has announced that it will be retiring it&#8217;s free machine translation services in a few months, which Live Translate is using. Another new feature is the ability to place comments into translation memories using the Live Translate Format. Full release notes can be found <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/RELEASE-NOTES?view=co">here</a>.</p>
<p><strong>Downloads</strong></p>
<ul>
<li><a href="https://code.google.com/p/livetranslate/downloads/detail?name=LiveTranslate1.1.zip">LiveTranslate1.1.zip</a></li>
<li><a href="http://svn.wikimedia.org/viewvc/mediawiki/tags/extensions/LiveTranslate/REL_1_1/">SVN tag</a></li>
<li><a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/LiveTranslate/">SVN trunk</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2011/06/16/live-translate-1-1-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

