Here is what is perhaps the simplest application. It simply creates a subclass of application, and names the window. Even with only this, the new application can be moved around on the screen, resized, and so on.
In the book I go on to describe how other, more interesting, applications can then be written.