On Thu, Sep 15, 2005 at 02:54:50PM +0200, Richard Spindler wrote: > I actually use some some text based applications quite often, and I > really like that the provide some kind of "command language" so I only > type in what I wan't to do and here we go. This however is a totally > different approach than a GUI Application, so I think it won't be easy > to unify these ideas.
It's not so different if you think in MVC (Model-View-Controller) terms. When writing a GUI based program, there is a natural tendency to combine the 'intelligence' (logic, state machines, etc.) of the app with the GUI code, as doing so reduces the amount of code to be written. When thinking MVC, you do just the opposite: when you touch something on the GUI, all it does is send a event ('user has clicked on button #123') to the 'model' part. This does the thinking, takes actions, and may send a command back to the GUI ('set the state of button #123 to RED'). The GUI has become just a dumb translation between commands or events and visual objects. When your app is structured this way, it's relatively easy to add a text based interface, maybe using some OSC-like syntax. But it's hell to convert an existing application to this model. The only sane approach is to write it in the MVC style from the start which requires more work, and that explains why few writers do it. Another reason is that the popular toolsets do not encourage this style of writing, and actually can make it more difficult than it should be. I'm currently going through this process with Aeolus, and it has been a lot of work. But once finished, adding OSC or text based user interfaces will be a quite simple exercice. -- FA