Open Source Content Management Framework

Midgard App Builder

  1. Building new Midgard app instances
    1. Midgard App Builder
  2. Tweaking the application
    1. MIdgard Fluid Control Panel
  3. Working on the application itself
    1. Midgard Fluid Application
  4. Known bugs and limitations

Midgard Application Builder for Mac is a tool to build Midgard Fluid application instances. Applications produced with the tool are fully stand-alone and can be moved freely across different storage devices. Each application consists of:

  • Fluid browser instance
  • Php server running on fastcgi
  • Midgard2
  • Database
  • All the dependencies to make the package stand-alone
  • A standard app structure

The only requirement to run the app builder (and the applications produced with it) is the Leopard version of Mac OSX.

Building new Midgard app instances

First, you need to obtain the Midgard App Builder. This is a standard Mac application -- just download, unpack and run. You can move it to your "Applications" folder if you want.

view_midgard3.png

Midgard App Builder

In the dialog you can pick the location where your new application will be created and the name of it. The port setting is random by default -- unless you have a specific need, you should leave it as is.

Pressing the "Build" button will create the application structure. To run the freshly built application just enter the folder and click the application icon.

Tweaking the application

There is a couple of settings you can tweak in the application. To access the app control panel you need to show the toolbar (it's hidden by default) and click the Midgard icon.

view_midgard2.png

MIdgard Fluid Control Panel

Firstly, you can enable the Bonjour publishing. When you do, the application will automatically become visible on the local network to other people. Ie. in Safari web browser it'll appear in the bookmarks panel. Similarly, on Epiphany on Linux it'll show up in the "Nearby sites" bookmark folder.

Note that when you enable Bonjour sharing you're opening your machine to other people on the network. While the access is fully controlled (secured) by the lighttpd web server, you shouldn't treat it as a universal deployment model.

Secondly, in the panel you can configure additional binaries that need to be run when your application is started. Just list bin names in the provided table. Ie. putting hello-world there will start AppName/Bin/hello-world binary (assuming it exists). The binaries are automatically terminated when the main application is quit.

You can use dbus to communicate between your main app and the external program.

Working on the application itself

The default startup screen gives you some hints how to get started with the development of the app.

view_midgard1.png

Midgard Fluid Application

It works similarly to developing any other web app -- except that you have a live local server & browser window running. You can use php scripts, html, javascript and any other web technology.

Additionally, you can use fluid specific API's for ie. firing Growl notifications from javascript. Check the Fluid documentation to see what's possible.

Known bugs and limitations

  • Sometimes the app (especially when running from a usb stick) will lock at the loading phase. This is because of a race condition in starting the php vs. http service. The app should be simply restarted in this case.
Designed by Nemein, hosted by Anykey