Installing apps just got amazing

2016-06-14

An application platform needs a simple way for installing, uninstalling, updating and running apps. It was an old dream of mine to get this implemented. So far I tried to keep my posts short and to the fact but it’s hard to restrain myself this time, this feature is so FREAKIN’ AWESOME! :D Probably the most advanced way for installing apps out there.

Requirements

Let me share the requirements that went into the design:

  • Apps must be version controlled.
  • One must be able to fork apps, send pull requests, etc.
  • One must be able to install multiple versions of the same app.
  • Installing an app must install its documentation as well.
  • The documentation of an app must be readily accessible.
  • Updating an app must be simple, reversible.
  • Apps shall have no external dependencies.
  • Apps shall be able to contain other apps.

The Big idea

As Boomla websites are readily version controlled, it comes natural that all apps shall be separate websites. This way, an app like markdown.app.boomla.com makes it trivial where to find it. Also, as apps are just websites, visiting them brings up their documentation.

To install an app, you use the link property. You create a file to hold the installation, typically in apps, so for the above app you would create a file /apps/markdown.app.boomla.com, and set its link property to import markdown.app.boomla.com.

When you do this, the entire website of the app will be imported. It’s like making a local copy of the entire filesystem, but really it’s just a hash pointer. If you read back the link property after setting it, you will find something like import markdown.app.boomla.com 01e36bd30520786257eebd3bc0078796c8eaf506f8, which references an exact state of the app.

From this structure some amazing consequences follow.

Updating an app

Just remove the hash from the link. By removing it, you instruct the system to fetch the latest version.

Automatic updates

We can write a program to find all import links and update them like above.

Uninstalling an app

Just remove the file holding the installation.

Installing multiple versions

To install a new version, just create a new file, and import the new version into it.

Providing multiple versions

If you are an app developer and want to provide multiple versions of the same app, you can release them on separate branches, like v1.markdown.app.boomla.com.

Embedding apps in apps

An app can import other apps, thus contain the dependencies. Also, as apps are just websites and their documentation is presented as a website, there are no special tools for documenting apps, just create a website as usual.

Documentation

You can access the documentation of imported apps on the path where they are imported. Even for nested apps. The Boomla runtime has built-in support for this, the website root of imported apps resolve to the path where they are imported. So If you installed markdown.app.boomla.com to the file /apps/markdown.app.boomla.com, then visiting the installation path will bring up a documentation that is identical to the original website.

Open Source apps

The Control Panel website now allows you to mark branches as private or open source. Open source websites can be pulled and imported by anyone. Private websites are still viewable to anyone, so it’s only about access to the source.

Limitation

Currently, you can only import websites from the same Workspace. So, to import an app locally, you either have to pull the app and then import it using its local path, or you have to first push it to our servers and import the app while it’s in the same Workspace.

Release v0.2.1

The features above are contained by the latest release v0.2.1.

I hope you share my excitement! :D

Cheers, Tibor