Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
GUI Software

Which Text-Based UI Do You Code With? 211

JHWH asks: "I've been asked to design and implement a management software system with text based user interface as the replacement of an older one running on AS/400. Despite my attempts towards a web UI, the customer is actually willing to have a text based UI. The main reasons are the need for a very low bandwidth and the ability to run on serial terminals. All this in the 21st century! Host systems will be Linux, the language will be C or C++. I already thought about the use of text based browsers like lynx or links. So now I have to wipe the dust away from my ncurses manual, or can Slashdot suggest something more effective?"
This discussion has been archived. No new comments can be posted.

Which Text-Based UI Do You Code With?

Comments Filter:
  • SLANG (Score:4, Interesting)

    by goarilla ( 908067 ) on Thursday January 04, 2007 @11:20PM (#17469092)
    somebody in ##slackware on freenode
    once recommended me to try using the slang API
    instead of (n)curses based on the fact that he bought a ncurses book
    and it sucked monkeyballs and programming ncurses is not really intuitive
    some of the other fine folk who regularly sit idle in that channel
    also said that if it could be done in a Shell script
    you could try using shell and dialog which is a ncurses based program btw
    this could obviously be a biased opinion from slackers since the pkgtools in slackware http://www.slackware.com/ [slackware.com] are written this way
    and they have served us fine for many years
    and will continue to serve us happily for many more years to come.

    anyway good luck
  • Turbo Vision! (Score:3, Interesting)

    by pestilence669 ( 823950 ) on Thursday January 04, 2007 @11:26PM (#17469146)
    Borland's Turbo Vision UI was rather nice, considering it was all Text. It's even been ported for GNU toolsets: http://tvision.sourceforge.net/ [sourceforge.net]

    Screenshot from the link of it on QNX: http://tvision.sourceforge.net/tv2-QNX-tvscreen.jp g [sourceforge.net]

    The nice thing about it is that it's OO... one of the very first OO TUI's, if I remember correctly.

    I have absolutely no idea how it'll work over a terminal. XTerms an option?
  • by iPaul ( 559200 ) on Thursday January 04, 2007 @11:30PM (#17469166) Homepage
    And, if you want to put it on the Web, you can find a Java Applet that does terminal emualation back to your server.
  • Re:pokey reference (Score:3, Interesting)

    by tomhudson ( 43916 ) <barbara.hudson@b ... m ['son' in gap]> on Thursday January 04, 2007 @11:58PM (#17469354) Journal

    why bother with conio (console i/o - a borland c / turbo c library) when you can just write the raw ansi sequences to the screen? They're really easy, and you can even prototype your interface with nothing more than a text editor (vi or notepad) and "playing" it to your terminal ("type 'filename'" in dos, "cat 'filename'" in linux).

    http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.ht ml [ufcg.edu.br] ansi escape sequences.

    You can clear the screen, home the cursor, more the cursor to specific coordinates, erase to the end of a line, change foreground and background colors, even have web 1.0-style blinking text.

    Just remember that you have to send sequences to set your terminal into raw mode if you don't want line-buffered keyboard input.

  • by SnarfQuest ( 469614 ) on Friday January 05, 2007 @12:40AM (#17469632)
    Just write ansi escape sequences to the screen

    And you will then discover some of the reasons why you should have used ncurses in the first place:

    1. Does the cursor jump to the next line when you hit the 80th column?
    2. If you type a character in the lower right corner, does it scroll up the screen?
    3. Are they going to bring in some non-ansi terminals and expect you to make them all work?
    4. Which subset of the ansi sequences are going to be available? Using xterm, gnome-terminal, putty, ansi.sys, ...? Which version? They all support different subsets/extensions of the "standard", and have different bugs.
    5. What other intresting "bugs" in all the possible terminals do you need to work around?

    I'd rather use a library that already handles all the crap.
  • Re:Emacs! (Score:3, Interesting)

    by JabberWokky ( 19442 ) <slashdot.com@timewarp.org> on Friday January 05, 2007 @08:49AM (#17472038) Homepage Journal
    Didn't the Amazon order system run for quite awhile on Emacs? Here's a note about it [emacsen.org], but the main article has gone 404.

    --
    Evan

  • by tomhudson ( 43916 ) <barbara.hudson@b ... m ['son' in gap]> on Friday January 05, 2007 @10:01AM (#17472542) Journal

    And you will then discover some of the reasons why you should have used ncurses in the first place:

    1. Does the cursor jump to the next line when you hit the 80th column?

    Only if your terminal window is 80 columns wide. Of course, if you want it to no matter what the actual width, just insert a newline at col80 ...

    2. If you type a character in the lower right corner, does it scroll up the screen?

    Only if you haven't first set the terminal to raw input ...

    3. Are they going to bring in some non-ansi terminals and expect you to make them all work?

    Just try to find a terminal that doesn't support the standard ansi escape codes ... they may add extra functionality built upon it, but you can safely ignore that by sticking to the base escape codes.

    4. Which subset of the ansi sequences are going to be available? Using xterm, gnome-terminal, putty, ansi.sys, ...? Which version? They all support different subsets/extensions of the "standard", and have different bugs.

    So just use the bog-standard ansi sequences.

    5. What other intresting "bugs" in all the possible terminals do you need to work around?

    As I said, by sticking with the standard escape sequences, you don't have to worry about all the "extensions" each different terminal supports. No need to bother with the terminfo database, etc.

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...