lib.Application

IWM Browser Applications follow a common three phase pattern, shared by many programming environments as diverse as Processing, Arduino, Intern, etc.

This pattern is reflected by the IApp Interface:


class IApp extends Interface {
    setup() { return this }
    run() { return this }
}

In practice the pattern may be more complex, because the setup phase can only be entered after loading things, a main loop cannot be entered because requirements are not met, etc. But the basic structure is always the same:

The setup and run methods can also be chained:

References