giggle
giggle

Reputation: 1941

Collaboration of command line and UI widgets

Could I assume that every powerful application would provide a command line/script input?

Even there are many many fancy widgets in current software, but I still think command line input mode in UI is still necessary nowadays, since command line/script input is more straight forward and neat. If application could provide more domain specific script language, that would be more powerful.

Is there some book provide some theory on this? Effective UI?

Upvotes: 1

Views: 139

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 385900

You ask about books related to the theory of this. The theory is one of separating presentation logic from business logic, or separation of concerns. This goes by many names such as model/view/controller, model/view/presenter, and many others, and there are plenty of books on the subject.

If you design an application this way, the presentation layer (ie: user interface) is a separate entity that can be replaced with another. Thus, you could have a graphical user interface as well as a textual one. Arguably, in a perfect world all apps would work this way, with a desktop UI, a web UI, a command line UI, and so on.

This all comes at a great cost, however. It is difficult to design applications in this way and, because of the loose coupling between the application and the UI there may be performance penalties. To further add to the difficulty, it is inherently difficult to provide a rich command line interface to a complex application. How would you go about creating command line input to Adobe photoshop or Microsoft Excel, for example?

So while it's possible in a theoretical sense, from a practical sense it becomes more difficult as the complexity of the UI goes up. There are many applications that are able to accomplish this, however. For example, many version control systems such as BitKeeper, AccuRev and others have both command line and graphical interfaces.

So, yes, it's possible that most applications could implement both a graphical UI and a command line UI, and it's true that a few of them do, it's not reasonable to expect that all applications will or even can.

Upvotes: 1

Related Questions