views:

18

answers:

2

I'm looking for writing a GUI client for a existing application in my job, this application is CLI and because this is not widely used.

This is the first time I'm writing something similar, the I ask you for recommendations, books, techniques, methodologies, advices. My first approach is to create the interface and to make calls to the original CLI client, is this a congruent approach?

Thank you

A: 

Though it's not ideal, I don't think it's a bad approach, creating a GUI shell for your CLI app. In this design, the GUI acts as the CLI program's user. You have to consider things like:

  • Can the GUI anticipate or understand all possible CLI program output? How about errors? How complex will that be? Consider parsing Unix "ls" output. Simple enough. How about Windows command prompt "dir" output? A bit more funky.
  • The CLI program may take time to execute, this must be presented in the GUI. The GUI may have to prevent the user from running another instance of the CLI.
Jerome
A: 

You might want to consider tcl/tk. I've written several successful commercial GUIs that work in exactly this manner.

Some people will certainly down vote this because they think tk is ugly or tcl is a poor language. I'll admit that it maybe takes a little skill to craft a stunning GUI but it's not impossible, and not even that hard. You won't be able to reproduce the eye candy of flash or silverlight, and if that is important this might not be the right solution for you.

If, on the other hand, you are more concerned with Getting The Job Done, tcl is a very viable choice. It's easy to learn and easy to I integrate with command line tools.

Bryan Oakley