groovy

Allow ConsoleApplet to be used as an OSS evaluation tool

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.6-beta-2
  • Fix Version/s: None
  • Component/s: Groovy Console
  • Labels:
    None
  • Number of attachments :
    0

Description

With a few small tweaks, I think the Groovy ConsoleApplet could be a powerful evaluation tool for many OSS (and non-OSS) Java-based (and Groovy-based) projects. Here's what I think you'd need:

1. Make it trivial to drop on a Web page (see http://jira.codehaus.org/browse/GROOVY-2919)
2. Let developers add their own OSS project's JARs to the CLASSPATH (the applet tag already does this)
3. Let developers initialize the Console with an example script

So, as an OSS project owner, I can say to interested users: 'hey, here's a Web page you can go to where everything's ready to run. You just click Run and you'll see my project doing its thing. Then you can tweak the example code, interact with my API, keep running it and seeing it in action. If you like it, then you can download the distribution proper and work through the tutorial'.

I think this'd be a great 'low barrier' evaluation tool. Imagine, say, JFreeChart could have a page where there's some script which populates a chart with some data. You can run it, then go back and play with JFreeChart's API to change colours, gridlines, etc and see if you like the API. They have something similar right now (http://www.jfree.org/jfreechart/jfreechart-1.0.10-demo.jnlp), but it's...

1. non-interactive
2. would have taken them a long time to put together, prohibitive for many OSS project owners

Just an idea.

Activity

Hide
Kennard Consulting added a comment -

So something like...

public class ConsoleApplet
extends JApplet {
...
public void start() { mConsole = new Console(); mConsole.getInputArea().setText( getParameter( "script" ) ); mConsole.run(); }
}

...may be sufficient

Show
Kennard Consulting added a comment - So something like... public class ConsoleApplet extends JApplet { ... public void start() { mConsole = new Console(); mConsole.getInputArea().setText( getParameter( "script" ) ); mConsole.run(); } } ...may be sufficient
Hide
blackdrag blackdrag added a comment -
Show
blackdrag blackdrag added a comment - sin't there already a consle run method, that takes a JApplet? see http://svn.groovy.codehaus.org/browse/groovy/trunk/groovy/groovy-core/src/main/groovy/ui/Console.groovy?r=14077#l190
Hide
Kennard Consulting added a comment -

Jochen,

Thank you for your reply.

Yes, there is a console run method that takes a JApplet - that is what groovy.ui.ConsoleApplet uses.

However, I am proposing a simple extension to groovy.ui.ConsoleApplet (ie. allow a script to be passed in as a parameter) so that it can be used as an OSS evaluation tool. I have done this myself and I think it is very handy. Please see my two links above.

Show
Kennard Consulting added a comment - Jochen, Thank you for your reply. Yes, there is a console run method that takes a JApplet - that is what groovy.ui.ConsoleApplet uses. However, I am proposing a simple extension to groovy.ui.ConsoleApplet (ie. allow a script to be passed in as a parameter) so that it can be used as an OSS evaluation tool. I have done this myself and I think it is very handy. Please see my two links above.
Hide
blackdrag blackdrag added a comment -

so what is missing is only your point 3? How about providing a patch?

Show
blackdrag blackdrag added a comment - so what is missing is only your point 3? How about providing a patch?
Hide
Kennard Consulting added a comment -

The patch is basically this code here...

http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/swing/console/GroovyConsoleApplet.java?revision=371&view=markup

...but it's a moot point until GROOVY-3604 is resolved. If that could please (please, please) be fixed, I promise I'll provide a proper patch.

Regards,

Richard.

Show
Kennard Consulting added a comment - The patch is basically this code here... http://metawidget.svn.sourceforge.net/viewvc/metawidget/trunk/examples/src/java/org/metawidget/example/swing/console/GroovyConsoleApplet.java?revision=371&view=markup ...but it's a moot point until GROOVY-3604 is resolved. If that could please (please, please) be fixed, I promise I'll provide a proper patch. Regards, Richard.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:

Time Tracking

Estimated:
1d
Original Estimate - 1 day
Remaining:
1d
Remaining Estimate - 1 day
Logged:
Not Specified
Time Spent - Not Specified