The Object Network

The Onex app and programming system

Onex is a mobile app that will enable you to build your own programs and manage your own data, directly on your phone or tablet. It's as easy as spreadsheets, but can scale up over the network.

Write your own Chat app!

Suppose you wanted to write your own family chat application, similar to WhatsApp groups, but one that you are in complete control of, and that runs entirely in the house, not via servers in another country.

Traditional programming

The traditional route is to learn a computer programming language such as "Javascript" or "Python", then, several months or years later, to spend long hours deep in technical detail:

Visual programming

If that's too much for you, you can turn to apps that work "visually", with graphical blocks that are clicked or wired together to make programs, or that use "if this then that", event-to-action style rules:

These are fine for simple apps on the device, but you will be right back into the technical stuff if you want to make a chat application, as they weren't originally built with networking in mind.

Plus, when attempting anything complex, they quickly become hard to manage and understand as they lack the ability to modularise and layer your programs. Being able to structure programs into re-usable and easily understood chunks is an essential property that professional programmers aspire to.

Further, all of these approaches make it hard to see what's going on with the actual "stuff" that you're working with: your data. In other words, when programming in these visual languages, you can see the processing functions, the events and the actions, but not the data they work on - in our example, the chat history, the people chatting. This is also true of all the traditional programming languages.

Spreadsheets and Databases

Spreadsheets don't have that problem, and are often used by non-coders to build certain kinds of apps. The data in a spreadsheet is the first thing you see, so you always feel in control. The formulae work "behind the scenes", and can be edited when you enter a cell that happens to be generated that way:

However, spreadsheets are still very limited in their power to express complex applications in a clean and easily-managed way. They have a continuous, "infinite" grid into which all your work is placed, but there is no concept of a "chunk" of related data.

You may have it in your mind that "this" area of the spreadsheet is a cost lookup table, "this" area is the plan, and "this" the final costings. But the spreadsheet knows none of that, so can't help you manage those chunks. It doesn't really know that "this" column header describes the data in this column: you could move all the data in the columns away from their corresponding headers, and right on top of the data of the lookup table, and the spreadsheet would happily let you.

And of course, you wouldn't even bother making a chat application in a spreadsheet!

So, instead of a simple spreadsheet, you could use a flexible database app like Airtable, Memento or MobiDB:

   

These apps allow you to structure your data much better - you have distinct collections of chunks. You can also link data in those collections together so you can navigate related data. Plus they can still be programmed like a spreadsheet, with formulae describing dependencies between the values of data.

However, it can still be hard and error-prone to evolve and maintain your more complex programs, because the formulae are scattered around so it's hard to structure them into the modules and layers that would allow re-use, and hard to manage the bigger picture of the relationships between formulae.

And of course, once again, you wouldn't make a chat application in a database because it's a different kind of data: it's static not dynamic. These apps don't easily model the concept of data that changes or can be evolved through formulae, and don't allow you to express the kind of circular or mutual dependencies that are needed for data to interact with other data, as you'd need in a chat application.

Also they don't have a native concept of data that happens to be on the network, not on a single device - you'd have to export and import it, or set up more technical web pipes.

Summary

These apps are great for getting started, but suffer from three problems which prevent you getting far with the chat application:

Firstly, they offer only rather "flat", unstructured programming models which makes it hard to grow and manage an increasingly complex project such as making a better WhatsApp.

Secondly, these approaches don't allow you to see and program both the data and how that data changes. There are two types of app discussed above - either very dynamic or very static: the dynamic ones with events, actions, flows and commands, that focus on the behaviours but scatter or hide the data, and the static ones such as spreadsheets and databases, that focus on the data but scatter or hide the formulae, and which don't have a programming concept of behaviour, events or evolution in that data. We'd like to see the live innards of all the chat members chatting and the program driving the reactions in the data as equal parts of the system.

Finally, they leave you stranded with only technical solutions when you want to create an application that is distributed over the net, such as chat.

There are however some good things that we'd like to take with us from the above: visual, 2D or graphical programming interfaces; being able to see your data up-front like in spreadsheets and to organise them into linked chunks like in the databases. Also, being able to write in simple formula style to describe the dependencies between values of data.

Onex

Onex enables you to build the chat application easily. It offers shareable, re-usable, linked and more easily organised chunks of both data and program rules. Onex rules describe data inter-dependence, behaviour and evolution.

Onex can easily run your applications almost transparently across the local or global network, sometimes without you even knowing or caring where things are. It allows you to run these linked-up data and behaviour rules everywhere - on the devices, machines and servers all around you, joined up over the internet.

Onex linked Objects

Onex really has just one simple concept - the linked Object.

An Object is like a collection of spreadsheet cells.

There are also Rule Objects that are like collections of spreadsheet formulae for describing your data dependencies.

Onex enables you to chunk up both your data and your formulae into separate Objects, which can then be linked together.

In Onex, you build collections of Objects for your data then link them up to each other. You then link these data Objects to Rule Objects.

A spreadsheet formula describes how a cell value depends on another cell value...

...an Onex Rule Object describes how the values of a data Object depend on other values in that Object - or in other linked Objects.

You can link to any Rule Object from any other Object, so you only need to change the Rule Object once and all linked Objects will behave differently.

A single Rule Object can simultaneously set multiple cell values of an Object, plus many Rule Objects can potentially set any given cell value.

All this collecting and linking of cells and formulae makes it easier to manage more complex programs by collecting related formulae that work together.

Also Onex rules, unlike formulae, talk about how any chunk of data changes, not just about how it is. It's easy to set up mutual dependencies between evolving objects, so that they can have "conversations".

The linking between objects and rules also works across the network, "peer-to-peer".

Thus you can interlink sets of objects owned by you or others, or share useful rules by simply sharing links, just like on the web.

Smart lamp example

Show me more!

Go here for more examples of Onex programming, including a sketch of the chat application.

What's the release plan for the Onex app?

Onex isn't ready to be useful just yet, but if you're actually technically-inclined, you can watch the development progress of the open source Onex App on GitHub!

As described above, the first target of Onex is "A better way to program and connect all your Android tablets and phones", so you can easily make that chat app if you wanted.

Onex will allow programs using and setting on-device data, like the automation apps above: your media, contacts, calendar events, sensor values, etc.

This is when the power of the approach starts to shine - opening up your device so that you can see and control every aspect of it. Existing data and sensors will be represented by pre-existing objects in lists.

Once Onex has conquered that, it can branch out into broader areas such as "A better way of programming your smart home, or of programming 3D virtual worlds".

Obviously, Onex would be a great language for everyone to be in full control of their smart home. Rather than conceding your private environment to a remote service, you'd be in full control of the programs running your house and over the data you alone should own. Of course, you can share (directly, peer-to-peer) with other friends and family, if you want.

The core or kernel of Onex is written in a compact and portable way so that it can actually be run on the home devices as an operating system and will be able to run your Onex programs directly on the device.

Onex is built from the ground up on a 3D technology, so the next feature will be to allow people create their own 3D games and worlds. Indeed, at this stage, all the elements are in place to build an open "Metaverse" or global shared VR world, which will run directly between your phones and PCs, rather than being centrally-owned and hosted.

While I'm waiting, can I read reams of rambling philosophical articles instead?

Sure thing: go here!

Duncan Cragg, 2019

Contact me and/or subscribe to my blog and/or follow me on Twitter.