That’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 let’s have a look at all the new awesomeness
Support for RDF triplestores
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:
$smwgDefaultStore = ‘SMWSparqlStore’;
$smwgSparqlDatabase = ‘SMWSparqlDatabase’;
// The following should be set to the URLs to reach the store:
$smwgSparqlQueryEndpoint = ‘http://localhost:8080/sparql/’;
$smwgSparqlUpdateEndpoint = ‘http://localhost:8080/update/’;
$smwgSparqlDataEndpoint = ‘http://localhost:8080/data/’; // can be empty
The specific support that SMW used to have for the RAP RDF store has been discontinued.
The Type namespace has been abolished
Builtin types now are displayed by the special page Special:Types, and there are no “custom types” 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.
Changes to units of measurement
Changed the way in which units of measurement work. Type:Number now does not accept any units, and a new type “Quantity” 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.
Type:Record changes
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 “has fields” as before. Properties must not be used more than once in has_fields, or the order of values will be random.
Reworked internal data model
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.
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.
There are already 2 SMW extensions that now require SMW version 1.6 or later: Semantic Maps 1.0 and the new kid in town: Semantic Watchlist (see Semantic Watchlist release post).
Result formats make use of Validator
Semantic MediaWiki now makes use of the Validator extension 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 < 1.6 when you enter a text value for a numeric parameter, it’ll simple be ignored (without giving any warning). With this new approach the user will get a warning along the lines of “The value ‘foobar’ is not valid for parameter limit, it must be an integer.”. 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’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.
New DSV format
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 “format=dsv” to any ask query.
New API module for version info
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.
New smwdoc parser hook
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’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’ll be possible to use this hook to fill part of the documentation gap there unfortunately is.
Some noteworthy fixes
I’m probably forgetting others here
Downloads
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.
What’s next?
Devayon Das, a Google Summer of Code student, mentored by Markus Krötzsch, is working on improving the search and browse interfaces of SMW (read all about it here). This work will probably end up in one of the upcoming 1.6.x releases. I’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’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.
In any case, if you are interested in the future of SMW, I definitely recommend attending SMWCon, the SMW event that’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.
More frequent updates
In an effort to provide the community with more frequent updates on the status of SMW development and other news, a Twitter and an Identi.ca account have been set up. You can follow these to stay up to date on the latest SMW developments
Further info
Semantic MediaWiki 1.6 release, zip archive
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 MediaWiki watchlist. And you can even request to be notified via email when a change is made!
Feature overview:
Let’s have a look at the different parts of the interface:
The watchlist
Each user can view changes to properties they watch on Special:SemanticWatchlist, which looks and works similar to the regular watchlist. Items that have not been viewed yet on the watchlist will be indicated as ‘NEW’.
Watchlist preferences
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 Special:Preferences, which is linked at the right top of the page in most skins for logged in users.
Watchlist groups
The watchlist groups can be managed via the Special:WatchlistConditions page by people that have the ‘semanticwatchgroups’ 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.
Email notifications
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.
Extending Semantic Watchlist
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.
API modules:
Hooks:
Further plans
I think this extension opens up a lot of new possibilities for the SMW platform in the area of workflow. Due to it’s API modules and hooks, it’s very easy for other extensions to build on top of the watchlist functionality, so I’m curious as to what will happen there.
This first release comes with core functionality, but at places lacks polish. And since it’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.
Since I think this extension is such a great addition to the already awesome SMW environment, I’m going to give a talk about it at the upcoming SMWCon. That’s bound to yield some interesting feedback
Requirements
Download
Some background
I developed the Semantic Watchlist extension as WikiWorks consultant for the IEEE, with some help from Yaron Koren.
It’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’s have a look at all the new awesomeness:
Google Maps v3 support
Maps has had some very basic support for Google Maps v3 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’s not really a new feature, but awesome nonetheless: you don’t need an API key for Google Maps v3! So when setting up Maps on a new wiki (using Google Maps), you won’t have to bother with any API key configuration any more, it’ll just work
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 Google Maps v3 Maps documentation to discover all the cool features it supports.
Improved form inputs
Since it’s first release Semantic Maps has had form inputs using Google Maps v2, Yahoo! Maps and OpenLayers. These inputs allow for entering geographical coordinates in Semantic Forms forms 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 “set location” 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’d expect, rather then submitting the form. The OpenLayers form input now also supports geocoding, making use of the new GeoNames API; more on that later.
Use of the MediaWiki resource loader
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 resource loader 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’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’t use 1.17 yet for some reason? Don’t panic! I’ll continue to support the 0.7.x for a while longer, fixing bugs as they are found. Don’t expect any new features there though.
Support for the new GeoNames API
Maps has a new geocoding service: the new GeoNames API. It already had support for GeoNames, but it seems this service is now only offered as legacy support. (I’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 here. You then need to set your accounts user name in your LocalSettings.php file. Maps still has the ‘geonames’ 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’t have a GeoNames account. For more info see the GeoNames documentation for Maps.
JavaScript overhaul
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 jQuery plugins, making it a lot more orderly and easy to extend.
More internal improvements
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
And more…
For a full list of changes, see the release announcement. 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!
How stable is it?
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.
Legacy support for 0.7.x
As an extension developer and MediaWiki consultant, I’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’ll continue to backport important fixes. Don’t expect any new features to show up for 0.7.x though.
What’s next?
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’s development, definitely contact me. Of course I’ll continue to support the extension and make fixes where needed.
The Semantic MediaWiki 1.6 release will be followed by a new Semantic Bundle, which will include this new version of Maps and Semantic Maps.
Downloads
Referata, which runs the documentation wiki 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 example/demo pages.

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 