New ways for Midgard coding

For years Midgard application development has been constrained by the fact that most of the programming work has had to be made through a browser window. Now there is a solution through WebDAV.

Earlier usage of better editors has been possible through two slightly hacky solutions:

  • PHPmole is a nice IDE for PHP. However, it is written using the PHP-GTK toolkit, making it difficult to install
  • The other solution was synchronizing code snippets to filesystem using the Aegir FileSync AddOn. However, this didn't work for creating new snippets in the file space

But yesterday I wrote a new Midgard WebDAV Server class, initially with only snippet editing support. With this system the Midgard snippet library space can be exposed as a network filesystem, or a Web Folder in Windows. This means that the code snippets can be managed completely with all the regular editors and IDEs.

Here's how browsing the /net/nemein MidCOM component space looks like on my OS X box:


The WebDAV Server class can be found from src/php-libs/webdav directory of the Midgard CVS repository. It requires PHP 4.3+ and the PEAR HTTP_WebDAV_Server package. To use it, create an active and authenticated page with empty style and the following content:


Since this seems to work quite well (although tested only on Mac), we wanted to see how we could improve our development work using WebDAV. The first solution that came to mind was using the ultra-cool collaborative editor SubEthaEdit. With it we can easily see what the others in the Nemein team are doing, and get comments and review done. It really makes pair programming much more efficient.

As I write this I'm sitting in a WiFi-capable cafe, hacking on some components together with Kaukola. Here's how it looks (we were adding a new feature to the de.linkm.taviewer component):

Collaboration with SubEthaEdit - Click to enlarge

The lines with blue background have been last edited by me, and the ones with pink background by Kaukola.

Read more Midgard posts.