Motorcycle Adventures and Free Software

Weblog: Archive

2008-04-01 - 2008-04-30

Beyond Google Maps: Mapstraction is a good starting point

Posted on 2008-04-08 12:54:15 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Some shops on map
A List Apart 256 has a very interesting article on Taking Control of Your Maps, explaining how to provide richer and more customized web map solutions using tools like OpenLayers and Mapnik, and the free data provided by OpenStreetMap:

For the practical developer who wants to add geospatial information to a site or application, the Google Maps API has been an easy call.

But, perhaps no longer. As websites mature and the demand for geographic applications grow, the old mashup arrangement is starting to chafe. Mapping components are more and more vital, and so we demand greater control, expressiveness, and functionality from them.

Fortunately, as in many aspects of internet technology, an ecology of open source online mapping tools has emerged alongside the market leader. It is now possible to replicate Google Maps’ functionality with open source software and produce high-quality mapping applications tailored to our design goals. The question becomes, then, how?

While setting up your own map server might be a lot of effort, Mapstraction could provide a nice way to move beyond the "same old" Google Maps. With the same javascript you can experiment with different map providers like OpenStreetMap, Yahoo! and Microsoft.

Mapstraction comes bundled with Midgard's GeoCMS component, org.routamc.positioning. Switching map providers can be done in component configuration, and then displaying things on a map is very straightforward:

$map = new org_routamc_positioning_map('my_photo_map');
foreach ($photos as $photo)
{
    $map->add_object($photo);
}
$map->show(400, 200);

Technorati Tags: mapstraction, midcom, midgard, openlayers, openstreetmap, mapnik

Sponsored links

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

Interprocess communications in Midgard: D-Bus comes to the web

Posted on 2008-04-08 13:11:37 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

In his recent blog post, Piotr Pokora showed how the the D-Bus API will work in Midgard 2. D-Bus is an interprocess communications system that is used heavily in modern Linux desktops like GNOME and KDE. With Midgard, the same system now becomes available for PHP and web applications:

midgard_python "service":
import dbus.mainloop.glib
import _midgard as midgard

def mbus_callback(object, arg):
        print "Hi! I am midgard_dbus from midgard-python. I got message:"
        print object.get_message()

mbus = midgard.dbus("/midgard_article")
mbus.connect("notified", mbus_callback, "foo")

mainloop = gobject.MainLoop()
mainloop.run()
midgard-php "client":
$message = "Greetings from midgard-php!(" . mgd_version() . ") PHP ver." . phpversion();
midgard_dbus::send("/midgard_article", $message);
I started php script which immidietialy[sic] ended, and on midgard-python service's terminal I got this message:
Hi! I am midgard_dbus from midgard-python. I got message:
Greetings from midgard-php! (2.0alpha0) PHP ver.5.2.5-3

This is a major milestone in our greater plan for the future of Midgard, and should be interesting to also other PHP and web application developers.

Good work, Piotras!

Technorati Tags: dbus, midgard, php, python

Zenburn colors for PHP editing in SubEthaEdit

Posted on 2008-04-09 12:58:01 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

In my company we're using the SubEthaEdit collaborative editor for our development work. It is nice to be able to share editing sessions when pair programming, or just showing a particular solution to a colleague.

Yesterday's del.icio.us popular alerted me to the Zenburn color scheme for programmers. It is a quite nice low-contrast color scheme developed by Jani Nurminen.

To try it out, I made a SubEthaEdit color scheme for using it with the PHP-HTML mode:

Zenburn in SubEthaEdit's PHP mode

The color scheme file is available for download. If others are interested in collaborating on this, the scheme is also in a GitHub repo.

Technorati Tags: osx, php, zenburn, subethaedit

Shell usage statistics

Posted on 2008-04-10 13:59:05 UTC in 60° 8.868 N 24° 25.182 E Kirkkonummi, FI to . 0 comments.

This meme seems to be running again:

Compass:~ bergie$ 
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c | sort -nr |head -n 10
 209 git
  47 svn
  30 cd
  24 sudo
  24 phing
  18 ssh
  16 ls
  13 vi
  12 ~/ajatus_ssh_replicate
  12 scp

Interesting to see how the stats have changed in one and half years. Main changes are due to Ajatus replication, and git being used for MidCOM 3 development.

Technorati Tags: history, shell, unix

GitHub for MidCOM 3 developers

Posted on 2008-04-11 10:21:00 UTC in 60° 9.840 N 24° 44.190 E 7km S of Espoo, FI to . 0 comments.

Yesterday Arttu Manninen posted notes on how to use git for MidCOM 3 development. In addition to the repo.org.cz usage he described, the other way to work on the next generation PHP framework for Midgard is using the GitHub service.

Rails on the Run has quite good tutorial.

Technorati Tags: midcom, midgard, git, github

Numpty Physics and Fennec: the tablet is becoming more fun

Posted on 2008-04-11 19:54:41 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

I've been using my N810 as sort of an universal communicator for a while now, and for this it has generally served well. The only thing I really miss is Skype video calls.

But other than that, I haven't been using the tablet too much. In real-world usage I've found the browser way too unresponsive, and the RSS reader too limited. But now, thanks to two very promising projects the tablet is becoming fun again:

Fennec is the mobile version of the Firefox browser with heavy performance optimizations (install):

Fennec on N810

Numpty Physics is a maemo port of the awesome Crayon Physics puzzle game where you draw objects and play laws of physics to get a ball moving to the end of a track (download):

Numpty Physics explanatory track

Good stuff!

Technorati Tags: maemo, n810, fennec

GeoClue presentation in FISL 9.0

Posted on 2008-04-19 00:25:48 UTC in 30° 3.312 S 51° 11.334 W 5km S of Porto Alegre, BR to . 0 comments.

I'm currently in Porto Alegre, Brazil attending the 9th International Free Software Forum (FISL) - a huge conference with some seven thousand participants. My talk in the event will be about GeoClue, the geo-information framework designed for Linux-based mobile devices.

For those unable to be there or missing the 9am talk because of the parties tonight, the slides are now available online:

GeoClue is now nearing release, and so we will probably be present also in the GUADEC and Akademy conferences this summer.

Technorati Tags: geoclue, fisl

Midgard 2: Finally legacy-free

Posted on 2008-04-24 22:41:14 UTC in 23° 39.702 S 46° 36.672 W Diadema, BR to . 0 comments.

While watching Everaldo work on the upcoming Midgard C# bindings, I decided to try running Midgard 2 with lighttpd. After quite a lot of struggling to get latest SVN checkout to compile on my mac, and some playing with lighty rewrite rules, I was greeted with a working MidCOM 3 page:

MidCOM 3 running on Midgard 2 and lighttpd

So, after such a long time, Midgard 2 is finally a running system without any legacy dependencies, independent of HTTP server module or a specific database engine. Things will be even more interesting as we will really start using Python, PHP and mono bindings together using D-Bus.

Technorati Tags: dbus, midcom, midgard, mono, php, lighttpd, python

Back