Automatic updates

2018-03-03

As mentioned in my last post, I’m working towards releasing the File Panel, which is a side-bar that visualizes the structure of your website. As Boomla lets one play lego with the building blocks of a website, this is greatly needed.

(You can already try it on a per-branch basis, via branch settings -> select the bleeding branch of System tools.)

First things first

One thing became apparent. To release the File Panel, we have to roll out another feature first: automatic updates for apps.

What’s that? Well, updating application code was already supported, but what if you had to change the instances? (The gallery app is the app, a concreate gallery is an instance of the app.) This is also referred to as migrating the data, a super complex problem space.

Here is an example. Images in a gallery were stored in placeholder 0, but for a better user experience with the File Panel, we have to move those images into placeholder 1. On every existing website. Of course, I’m not going to do this by hand. Plus, Boomla is a platform, and I want to empower application developers with the same tools. They have to be able to roll their own apps, and update the instances as we go. We need automatic update support baked into the platform.

How it works

As an end user, you can effectively ignore this change. Automatic updates will run every once in a while and your apps will be updated. We will create a snapshot of your website (each branch) before and after the update. That way, should anything go wrong, you can always undo the update.

If you want, you can also completely turn off automatic updates via branch settings. Generally, you shouldn’t use this feature on regular websites. This is more a feature for developers, who want (should) verify every change to their application.

If you head to the Story of your website on the Control Panel, you will most likely already see entries like that:

[SYSTEM] automatic update: commiting changes before updating

[SYSTEM] automatic update: gallery.boomla.net

Developers

If you are a developer, follow this link to read more about automatic updates.

As usual, Boomla is about simplicity, and so far it seems our solution is as simple as it gets. In case of the gallery, the following snippet is the entire code required to move children from placeholder 0 to 1.

images = f.children()
images.each(function(img) {
    img.move(os.APPEND, f, "", 1)
})

And it works if you have several update scripts. It works if you check out a snapshot of your website after a long time.

Let’s chat!

I recently started a Boomla channel on Reddit. You are welcome to ask anything.

Best,

Tibor