JDAF ConsoleApplication view utilising curses

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

JDAF ConsoleApplication view utilising curses

Postby ddimitrov » Thu Jul 10, 2008 12:49 am

Console apps are the most convenient way when it comes to administering via remote console. The JDAF Console Application class provides a good abstraction for the application logic, but it lacks in usability.

There are two features that come to mind right now:

1. Using the up/down arrows recall previous commands
2. Using tab to auto complete commands and arguments.

Both can be achieved by integrating http://jline.sourceforge.net/ or reimplementing subset of the functionality.
ddimitrov
 
Posts: 6
Joined: Tue Jun 10, 2008 2:40 am

Postby JDAF Support » Fri Jul 11, 2008 3:19 pm

The Input is the process input and it blocks until a return is given and there is no way to control that unless we use Swing. I believe JLine is using Swing and creating something like a terminal emulator. JDAF ConsoleApplication explicitly excludes Swing. JDAF is more at the I/O stream level. Hence It is directly pulling from the input and output process streams. Is much more low level in this way. The "down side" is the issue of not being able to trap certain characters.

If we had a GUIConsoleApplication that was a hybrid, it would work. That is on the list actaully, just not a lot of demand.

As a contrast, I don't thing JLine has an MVC framework with printing, help and the other special stuff like type-safe blocking inputs and blocking dialogs like JDAF has.
JDAF Support
 
Posts: 637
Joined: Mon Jul 23, 2007 4:52 am

Postby ddimitrov » Fri Jul 11, 2008 6:28 pm

JLine uses escape-commands to control the screen. This way the application can be used through SSH (without X11 tunneling) and you still get completion and other terminal niceties on the remote end. For Windows it uses a small JNI library as it needs to use the conio.h native library.

I was not implying that JDAF and JLine are comparable - one is input library, the other is application framework. I'm suggesting that the JDAF ConsoleApplication is (somehow) enhanced to feature completion and history recall.

JLine is one of the open-source (BSD) libs that can be used to achieve these two features, but it doesn't give us all the other features of JDAF (or if it did, I wouldn't waste my time writing this post ;-).
ddimitrov
 
Posts: 6
Joined: Tue Jun 10, 2008 2:40 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 7 guests