This high-falutin title represents a simple thought with respect to how to classify computer programming models.

My GUT theory of computing models is this: All computing occurs on the basis of data, communications and processing. The programming models are likewise of 3 types: Functional and function-based programming; object-oriented programming; and call-back-based and/or event-driven programming. When you center a computing model around data and state, you get object-oriented programming – start with data first and build from there. When you center a computing model around functions, you get procedural programming, and when you further treat functions as manipulatable, functional programming; when you center a computing model around events and communications, you get event-driven programming.

Having the opportunity and the necessity of brushing up on the latest in computing and programming techniques and technologies, I was struck by an ‘aha’ moment in perusing the How To Node – NodeJS site. NodeJS has a built-in event callback loop, akin to how you used to program X11 GUI or other interface code, and it’s clear that putting this in the core of the programming model is giving it both a power and characteristics that make it distinctly different from other programming languages.

That’s where the GUT theory of computing comes in, treating event-driven not as an added feature, but as a different computing model. Thinking of NodeJS this way is more useful way to understand and appreciate what it is capable of.

In the end, all programming consists of a mixture and combination of data-based, functional/procedural and event-driven algorithms and code. Functional programming is really distinct from procedural programming by the power of treating functions as objects or data; object-oriented languages, like Erlang and Scala have Actors for communication; you can code event-driven callbacks and event handlers in other languages (just as Javascript VM is written in C++).

The right programming languages should enable expression of these various abstractions effectively,
and the right programming abstractions would reflect the problem at hand, in terms of whether the focus is on data, events or processing. In the case of the RIA (rich internet application) that I am developing, the right computing model is a web-based version of client-server, where the client side is event-driven with a bit of state, and where the server side is data-centric.

By Patrick