Best Language For Experimental GUI Demo Projects? 278
New submitter GrantRobertson writes with a question about quickly developing prototypes for new interface design concepts "My research/tinkering will be along two main lines: (1) Devising entirely new graphical user interface elements, mostly in 2D, though often in a true or simulated 3-D space. I am working on ways to visualize, navigate, and manipulate very, VERY large data-sets of academic research information. (2) Computer based education software, though of a type never seen before. This will combine some of the GUI elements invented in (1) as well as displaying standard HTML or HTML5 content via a browser engine My requirements are: (A) A decent IDE ecosystem; (B) A decent set of libraries, but ones that don't lock me in to a particular mind-set like Swing does in Java. (Boxes in boxes in boxes, Oh My!); (C) An ability to easily draw what I want, where I want and make any surface of that 3D object become a source for capturing events; (D) Ease of cross-platform use. (So others can easily look at my examples and run with them.); (E) No impediments to open-source licensing my code or for others to go commercial with it either (as I have seen when I looked into Qt). So, should I just stick with Java and start looking outside the box for GUI toolkits? Or is there something else out there I should be looking at?"
I'm not sure what impediments Qt has to proprietization of software since it's LGPL nowadays; in any case, Qt Quick and GNOME's Clutter seem like they could be a useful. Read on for more context.
"I am not a professional software developer and never have any aspirations to become one. I've been through a generic university computer science degree-program and I can tolerate C++ begrudgingly. I do OK with Java and prefer it, though I still have to look up every API before I use it. Most of the code I want to write will be not much more than prototypes or proof of concept stuff for the research I will be doing, rather than full-on applications ready for distribution and use. I can learn any language out there, if need be, but these days it is more about the ecosystem than the core language. IDEs, libraries, cross-platform compatibility, user support, open source licensing."
GNUstep (Score:1, Interesting)
I'd use Cocoa on a Mac, and stick to the (large) subset supported by GnuStep. Bonus, you'd be able to test IOS devices with your data set with a little more effort...
Simon
Flash (Score:2, Interesting)
This is probably going to draw some heat, but frankly, it sounds like using Flash and ActionScript 3 may be a good fit for the prototyping work. You probably wouldn't want your final deliverables that way, but as a prototyping framework, you could get pretty far with it.
I'm not sure what the state of Flash's 3D support is these days, but I know that back in the day when I used to work with it more heavily (about 8 years ago) there were things like Swift3D that you could export 3D models from applications like Lightwave and bring them into Flash. Although I think this was less from a data-driven standpoint and more from an animation standpoint, but that may have evolved since then - I simply don't know.
AFAIK there shouldn't be any problem with you open sourcing AS3 code. And while the Flash IDE itself is commercial, you can get an AS3 compiler from Adobe for free and just write everything in AS3, although you wouldn't have the ease of use of the IDE itself for drawing on the stage, doing keyframe animation, etc. But that may not matter to you.
Flash has a plethora of UI components and modules out there that are free (and some commercial, too) that you can use. It ships with many re-usable components to add things like collapsable lists, windows, text editing fields, etc. It also has some sugar to make working with data easier, though personally I always preferred writing clean AS directly.
Full disclosure: I haven't bothered with Flash in at least 3 or 4 years now, but based on my current knowledge it still sounds like a potential fit. Haters are gonna hate no matter what, so don't let all the negative hype get in your way of using it in a controlled environment as a prototyping system. After all, a prototype is just a prototype, not the finished product.
Python with wxWidgets (Score:5, Interesting)
Take a Good Luck at Delphi and FireMonkey (Score:5, Interesting)
Yes...I know...Pascal..Ugh (it's a shame so many people under rate Delphi's Object Pascal). But, Embarcadero Delphi will enable you to build FireMonkey based apps that can run on Mac, Windows and iOS. FireMonkey still has a ways to go. However, if you look at the whitepapers posted on the Embarcadero.com website, you will see some interesting stuff. FireMonkey is evolving. Once of the nice things is that it can use the GPU vs the CPU for rendering. This makes 2D and 3D rendering a piece of cake. Additionally, FireMonkey controls can (and should be) stylized. The number of effects one can achieve for a simple button is amazing. Imagine what one can do in terms of designing new UI paradigms.
Are are some blog on using FireMonkey to render functions and demonstrate wave interference (in 3D).
http://blogs.embarcadero.com/ao/2012/02/02/39215/
http://blogs.embarcadero.com/ao/2012/01/30/39208/
http://blogs.embarcadero.com/ao/2012/01/27/39206/
and, for a commercial product by TMS Software http://blogs.embarcadero.com/davidi/2012/02/07/41510/
FreePascal w/ Lazarus is another way to experiment (and, get Linux and ARM as target environments as well). FireMonkey for iOS depends on the ARM compiler to bring the apps to iOS (at least until Embarcadero writes their own ARM compiler).
Granted, the tool isn't cheap. But, if you have the budget, it's worth adding to your tool bag.
Another alternative is getting intimately family with JQuery and the DOM. There is a lot you can do to experiment with new UIs.
Re:When I think of a quick GUI project, C#. (Score:4, Interesting)
Visual Studio with C# isn't very useful great for cross-platform development (which was one of the requirements of the OP)
Also I personally find that "visual" editors, while good for producing something quickly, aren't much use for more advanced GUI development where you need to do much more meta-programming, develop custom components and have detailed control over layouts and behaviour etc.
Even when I was using Visual Studio a lot (which I'm glad to have left behind), I tended to code all the GUI stuff by hand.
Re:Haskell !! (Score:2, Interesting)
banana
http://www.haskell.org/haskellwiki/Reactive-banana
Re:When I think of a quick GUI project, C#. (Score:4, Interesting)
I think you need a i7 Extreme edition to run Eclipse....
The same one you need to run Visual Studio 2010? Not that I'm an Eclipse fan (I'm not), but VS is no speed beast by any metric, and it gets worse once you load external plugins, heavy components or are working with a medium codebase. That's one of the motives why I use SharpDevelop.
QT (Score:4, Interesting)
You dismissed the one framework that would do what you want. LGPL and if really necessary, Digia does not charge that much for a commercial license. I've been doing cross platform work for 20 years. Java was my first foray. Star Framework (Star Office was written with this) was a pretty good framework. But QT beats them all hands down.
Re:Javascript (Score:3, Interesting)
I'd seriously consider Javascript.
As an added bonus, javascript provides the best of both functional and object oriented programming, and just about every decent programmer knows javascript or can learn it easily.
For varying definitions of the term "best". Shoot me in the head before I take on the nightmare of debugging a project like this written in Javascript. The thought of it truly makes me *cidal. (where * is sui and/or homa)
Expressive versus easy-to-learn (Score:5, Interesting)
If you want demonstrations and "proof of concept" stuff, you want a language which is expressive, not a language which is easy to learn or which generates heavily optimized code.
In the demo phase, you're not really worried about performance. The goal is to have something showing as quickly as possible, and not worry too much about how fast it runs, or how much memory it takes. Overspec your demo system for the time being (ie - make it really fast and install lots of memory), and once you have a reasonable interface go back and recode it in a simpler language which can be more easily optimized.
Languages which are simple to learn (c++, for example) are generally not very expressive. You end up wasting tons of time debugging issues of memory allocation, library interface details, and datatype conversion.
Languages which are expressive are a little harder to learn, but any individual line in the expressive language does a lot more. Since you are writing fewer lines, and since the fewer lines do more, you end up making programs more easily and in less time.
Yes, the programs will execute a little slower, but as mentioned, this is not important in the demo stage. Your productivity will be much higher.
Perl was written by a linguist, not an engineer. As such, it's harder to learn (it's got tons more keywords and context), but once you get the hang of it it's much more expressive. The following single line:
@Lines = sort { $a->{Name} cmp $b->{Name} } @Lines;
unfolds into several lines of C++, plus a subroutine definition with datatype definitions. The following line:
@Files = <c:/Windows/*.exe>;
can be implemented using one of over a dozen possible library calls in C++, but is builtin in perl. You don't have to look up the library call interface specific to your system.
I hear that Python is also expressive, although I don't use it.
Re:OpenGL (Score:4, Interesting)
This isn't true at all! It doesn't take "pages" of code to open a context and draw something, not even close. It is a poor choice though, since you're starting from absolutely nothing. You don't have a single resizable button control or any way to kern/reflow text for labels.
Matplotlib (Score:5, Interesting)
Python Matplotlib covers some of what you might be interested in and it can be used with other GUI toolkits see http://www.scipy.org/Cookbook/Matplotlib and http://matplotlib.sourceforge.net/ - at the very minimum it might provide some food for thought about the feature-set you're seeking.
Re:Processing and Java: not always play nice (Score:5, Interesting)
Not to say you shouldn't do it-- but while the Processing learning curve is pretty easy, it gets quite steep when you want to incorporate more high-level functionality.
That said, there's a lot of libraries that will address most stuff you'll need in terms of UI elements-- controlP5 is one that deals with text fields, text boxes, etc, for instance.
Lazarus (Score:5, Interesting)
The reason I recommend this tool is because even though it doesn't have a massive ecosystem like C++, it is coherent and works very well between platforms. The Object Pascal language is very easy to learn, it's powerful, and well designed. While not as fast as C or C++, is you look at the alioth debian language shootout page, it is pretty quick compared to other languages. It provides access to all of the familiar C library functions, and includes all kinds of stuff in the language for compatibility with the C language. It's not the old Pascal from the Turbo Pascal days that people like to bash, almost all of the complaints I hear about the language itself were taken care of a decade ago. The only issue I can really think of is that the language can be a bit verbose compared to C, but compared to Java it's pretty succinct.
Re:"I am not a professional software developer" (Score:4, Interesting)
And you want to do this without imposing any hierarchy (of the type "boxes withing boxes") on the 3D object's surface, yes? Assuming that it is possible, once the event is generated, how would you implement the event processing if you can't discriminate on the type of your "event source"?
Why do you need a hierarchy to have an event source? Maybe each piece of data is an event source. Maybe the data is "drawn on the 3D surface" because it matches some criteria which can change over time and has no impact on the behaviour of interacting with the data. Whatever!
Unless he asks for a holographic GUI, when interacting with a 3D projection in 2D, one will need to solve 2 problems:
1. data presentation and exploration - you know, like rotating the POV, zooming in/out, etc. Believe me, it is necessary
2. Interaction - even if only the selection of one sample point.
You'll need to distinguish then between an event that doesn't have the subject a sample (like a navigation gesture) from an event that have the subject a data point.
But... as you say... whatever.
Given that one of the areas of research is developing new UI components it seems reasonable to want to do away with the standard models (or at least not be restricted to them).
Huh? Developing new UI components in the context of "I am not a professional software developer and never have any aspirations to become one" ? Go away, I wonder why I'm bothering to answer to AC trolls.
Re:OpenGL (Score:5, Interesting)
For that matter, I had to look down to about the 8th page of google hits for "opengl hello world" to find one that did NOT use an abstraction library. Which tells you how many people actually do that. So, "use openGL" isn't much help. How about, "try using openGL throgh wxWidgets" or somesuch. Nobody uses straight openGL.
Paper and pencil, story boards (Score:5, Interesting)
I'd use [software environment and platform here] ...
No. Just use paper and pencil. Create a story board, http://en.wikipedia.org/wiki/Story_board [wikipedia.org], showing how the user will use the interface.
Go to the academics that represent your users. Ask them what they want to see in a visualization, how they expect to do a search, how they expect to manipulate things. Give them paper and pencil and tell them to just draw things however they think it should be, not what they are used to seeing in their current environment and applications, rather whatever they can imagine would be a good way, a way that feels natural.
So: I want X, but not in Y, even if Y supports it? (Score:5, Interesting)
Why not just use Flash & ActionScript, along with Unreal. Specifically, Scaleform. [youtube.com] Since it already does the "never before seen" 3D GUIs you want, and game engines are particularly good at visualising extremely large data sets (we call them game worlds).
Any amount of searching "HTML 3D" would have turned up WebGL [google.com], which uses OpenGL in existing browsers... That would be a good prototype platform for me.
I take particular issue with the childish statements against using Java (and Swing), considering they already support 3D Swing components (see XTrans demo). [jogamp.org] Swing displays HTML components, even in tool tips. In fact, there is already an entire 3D collaboration framework in Java [openwonderland.org] ready for any "Never Seen Before" GUIs you wish to dream up... It displays HTML, images, & PDFs etc.
Furthermore, their indignant remarks smack of ignorance, considering Java 2D & Java 3D exist, and both have rich non standard box shape intersection libraries, which can be used to create custom components of any shape or position, hierarchical or not restricted only in that they should be used in a Canvas, to save yourself some time.
They want someone to hand them a magic library that has all the bells and whistles already to go, but heaven forbid any of them have an API that requires using... Have fun inventing that shiny new wheel.
Re:Processing (Score:3, Interesting)
Try Piccolo, also known as Piccolo2D.
It's a ZUI (zoomable user interface) framework in Java. Essentially a 2D scene graph model, with event handlers for zooming, panning, tapping/clicking, etc. Nodes can be 2D vector graphics, or can contain bitmapped images, and standard Java UI controls.
http://www.piccolo2d.org/
Re:Haskell !! (Score:2, Interesting)
Flash or Apache Flex (yep, Adobe donated Flex to the Apache software foundation).
Flash is still king of 2D GUIs that's why AAA games use it for their interfaces via Scaleform
http://gameware.autodesk.com/scaleform/usage/games [autodesk.com]
If you want to do it via Flash tecnologies, you can build .SWF, .AIR or native export via Apache Flex too, the SDK of which works like Java's JDK (you can write the code in any text editor, then compile use the SDK.
I've yet to see an HTML5 site that runs anything close to the old 2Advanced site [2a-archive.com] without brining a dual-core CPU to its knees. Or anything done as slick for that matter in iOS or Android. The old 2advanced site runs full speed on an 800MHz Android CPU btw.
Cheerios.
Example of OpenATC (Score:4, Interesting)
I thought I would share some info with you about how one team did this, what was cutting edge work at the time.
Not that I am saying you should use these tools although it seems they are one possibility.
Here are links related to a quite interesting software project developed by Christophe Mertz and others at CENA.
The Digistrips system was a user interface prototype demonstration system written in Perl for the design of new touch screen based air traffic controller systems that mimic the traditional system in which paper strips are used to represent aircraft in flight. The demonstration is said to have been successful, and there are a number of papers written about user interaction in the system.
It used Ivy (a cross platform message bus in Perl) and TkZinc (an OpenGL and 2d capable canvas).
Below are numerous links to papers and software sites although the openatc.org website is no longer in service itself. It is possible to download Ivy and TkZinc it seems.
keywords: cena france french aircraft controller prototype perl perl-anim gui prototyping tk-zinc opengl perl strips
Ivy Software Bus
http://www2.tls.cena.fr/products/ivy/ [tls.cena.fr]
http://freecode.com/projects/ivy [freecode.com]
http://www2.tls.cena.fr/products/ivy/download/desc/ivy-perl-deb.html [tls.cena.fr]
Ivy is a simple protocol and a set of open-source (LGPL) libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. Ivy libraries are available in C, C++, Java, Python and Perl, on Windows and Unix boxes and on Macs. Several Ivy utilities and hardware drivers are available too.
Ivy is currently used in research projects in the air traffic control and human-computer interaction research communities as well as in commercial products. It is also taught to CS students.
http://wiki.tcl.tk/9246 [wiki.tcl.tk]
Christophe Mertz
Zinc.pm
http://search.cpan.org/~zincdev/tk-zinc-3.303/Zinc.pm [cpan.org]
Patrick Lecoanet
http://search.cpan.org/~cmertz/svg-svg2zinc-0.05/svg2zinc.pl [cpan.org]
though openatc.org is down.
TkZinc
http://www.tkzinc.org/tkzinc/index.php [tkzinc.org]
http://freecode.com/projects/zincisnotcanvas [freecode.com]
http://wiki.tcl.tk/2798 [wiki.tcl.tk]
TkZinc is a Tk widget developed with Perl/Tk, Tcl/Tk and Python/Tk bindings. TkZinc widgets are very similar to Tk canvases in that they support structured graphics. Graphical items can be manipulated, and bindings can be associated with them to implement interaction behaviors. But unlike the canvas, TkZinc can structure the items in a hierarchy, and has support for affine 2D transforms. Clipping can be set for sub-trees of the item hierarchy and the item set is quite more powerful, including field-specific items for Air Traffic systems. TkZinc is fast enough to allow the implementation of 2k2k radar displays with smooth animations. It is structured enough to allow the implementation of direct manipulation desktop GUIs.
Since the 3.2.2 version, TkZinc also offers as a runtime option, support for openGL rendering, giving access to features such as antialiasing, transparency, color gradients and even a new, openGL oriented, item type : triangles. In order to use the openGL features, you need the support of the GLX extension on your X11 server.
Zinc Is Not Canvas!
Tkzinc has been developped at CENA to help building experimental user interfaces for Air Traffic Control. Tkzinc is a Tk widget, with Tcl, Perl/Tk, and Python/Tkinter bindings. Tkzinc is available as open source under the GNU Les