Programming Language for Corporate UI Research?
Daniel Wigdor asks: "I'm a PhD candidate doing an internship at a major American UI research lab. They distribute an input/output hardware device to research labs, along with a Java API for the development of 'concept pieces' (here's an example from a university). Java was chosen because it was simple, and seemed, at the time, to be the language of choice for UI researchers in both the corporate and academic worlds. There is now pressure to switch from Java to C#, since they don't have the resources to maintain an SDK for both. We're not at all concerned with system performance, since this is only for concept-development: it's really just about accessibility for newcomers to the hardware. Given that, what would the community advise by way of a choice between Java and C#?"
Carry on using Java if you can, and switch if you have to. No point in changing language if you can avoid it (especially given how similar Java and C# are).
Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
What's the difference?
If you're not concerned with performance, and you're in an academic environment, why not use a language like Ruby or Lisp?
I realize that this probably isn't the kind of thing you were expecting (I'm guessing you expected to get answers like "C++"), but I think it's a good idea.
But of the two languages that you have now, I would stick with Java simply because it is completely cross platform (plus just about everyone getting out of school now knows Java because it was so popular/"language of the future", where as many don't know (or have only had an introduction to instead of a large amount of work with) C#.
But the great thing about Python is you could use it as an itermediary between toolkits and such. Without changing your API, you could replace the Python code so that it used Win32 instead of Swing or QT without making your users learn something new. You want to change the back end from C++ to C or to something else, the interface and the way they call things stays EXACTLY the same.
Just a though, from a guy who has recently discovered and fell in love with Python. And things will only get better with Python 3.0!
Comment forecast: Bits of genius surrounded by a sea of mediocrity.
Or Visual Basic. Seriously. If I'm reading the question right, the SDK is going to be .NET IL (written from C#), and you don't care about performance of the UI above that - you just want to experiment with different interfaces with little learning curve for new researchers. Sounds like VB.NET would work fine.
C#/CLR is nice and has promise, but if you want UI consistency I would suggest sticking with Java/Swing for the meantime. With C#/CLR you have to pick between Microsoft's Windows Forms implementation, or Mono. As far as I know, Mono has an incomplete Windows Forms implementation at this time, and even if becomes complete I would expect at least some minor UI differences. At the current time I believe Mono has independent GTK, QT, etc. bindings. So if UI consistency is what you want, I'd stick with Java/Swing, and the default cross platform metal/ocean theme.
If and when Mono implements Windows Forms fully, so that they are sufficiently similar, you may want to re-evaluate at that time (depending on whatever other factors would influence your chioce).
It's 10 PM. Do you know if you're un-American?
You're asking Slashdot, where anti-MS sentiment is a given? Good luck getting anyone to recommend C#.
.NET, in general) on Mac and Linux is likely to play continual catch-up a la WINE, I'd say stick with Java. It has much wider support in terms of development environments, giving researches flexibility in their choice and tools.
Actually, if C# was supported under other platforms as well as it is under Windows, then I'd say, go forit.
However, since C# (and
When in doubt, go where there's more flexibility.
tasks(723) drafts(105) languages(484) examples(29106)
I put my vote on assembly. Sort the men from the boys.
C# is powerful in the right hands, but you loose platform independence. (Mono isn't there yet IMHO)
Pluspoints for Java
.NET languages
--------------------
+ more OS Platforms that you can run on
+ Eclipse as a terrific free IDE
+ huge number of free open source libraries
+ further away from MS (O.K. there is Mono too, but you only have one single second vendor that you can rely on)
Pluspoints for C#
-------------------
+ one single choice for UI development
+ more language features (this may be a minuspoint for corporate development, when you only want one way to write things)
+ one language standard, less dialects
+ believe it or not, it's an open standard and (on paper) less proprietary than Java, which is owned by Sun
+ easy GUI development for WinCE or windows mobile, including many mobile phones
+ possible easy interaction with other
+ easy direct interaction with Windows OS features
Now what do you prefer?
db4o - open source object database for Java and
Personally, i think that there is much to commend C# as a language, but I think you'll find that those pushing for C# are really pushing the .Net framework rather than the language. While I think it is one of the best things that Microsoft have come up with, it is not portable and unless you wish to have code that runs purely on Windows, Java is the way to go.
The advantage of Java is that it has a standard API that is tailored to multiple platforms.
If you are doing UI concept R&D I would think that you would want to be platform independent. Despite all the posturings about Mono, it seems to me that Java is the leader in that area.
You said about Java API? What is the language the implementation itself is written in? From my experience it is importnat to have API in the sam language as implementation first and then have APIs. You also did not describe motives behind the pressure. What are they? Technological, financial, Microsot grants ... what? That would help in answering your question.
Changing anything will cost your employer money. Did they count how much reqrite will take in terms of time and money.
If you have to support several APIs, I'd say write IDL and generate interfaces for as many languags as you want. Unfortunately this is not as easy as it supposed to be.
my sstream of consciousness
The reason:
While the obvious rebuttal concerns Mono, consider that Microsoft has not given Mono a legal blessing. How long will they allow Mono to exist? Until they feel
If your two options are Java and C#, the obvious choice is Java. Java has a very strong multi-vendor commitment to its development, and it has complete implementations available from Sun for Linux, UNIX, and Mac OS in addition to Windows. As a Ph.D. canidate, I hope you can appreciate the value of this regarding freedom from corporate entanglement as you move forward in your research.
If I was making hardware, I'd implement a 9P file server on the device.
This leaves developers free to choose whatever language they feel comfortable with, be it Java, C#, COBOL or Brainfuck.
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
... is stupid ;) it's the same as asking "what company rules, syn or microsoft?".. gee... the answer here is obvious ;)
Seriously enough, if you're having to swap code with the company you're interning with, then either hold a rear-guard action, and advocate for Java, or subvert the Borg, and insist on the Mono/C#, rather than Microsoft/C#.
OTOH, if it's for your own research, then Python + GUI toolkit is good for rapid prototyping, or there's always Sqeak. (Smalltalk with good multimedia behaviour and performance) Both of these also have the advantage of being Open, which may matter to you later. I like the elegance and history of the pure OO Smalltalk, but realize that you're not going to find hordes of other programmers comfortable with it.
the more accurate the calculations became, the more the concepts tended to vanish into thin air. R. S. Mulliken
If you'd like to develop new ideas in UI's and really experiment with different ways to handle them, probably neither Java nor C# will really help much.
But squeak (a smalltalk implementation) might. You should at least give it a serious look. Of course there are other possibilities (self, raw X windows...) but squeak looks like a good one to me.
use flash.
you're going to be making fucking mockups all night long anyways...
If you switch, and start using C#, you'll be stuck using Microsoft Windows for most things. Although there is Mono, if Microsoft ever goes berserk and starts suing them over "patent violations" that'll cause real problems for you.
If you stick with Java, you can move pretty freely between Windows, Linux, Mac OS/X, and *BSD.
With C#, I believe you're more limited.
Additionally, I believe that many more companies offer Java development environments than offer C# environments; with C#, aren't you pretty much limited to Microsoft and Mono? With Java, you can go with Borland, IBM, Sun, even Oracle, and I'm sure there are others as well as "Free Software" implementations.
Just my two cents; this isn't a Microsoft bashing, by the way, it's just a matter of flexibility. Java gives you more flexibility than C#, so I'd stick with it.
Farewell! It's been a fine buncha years!
I've you're used to Java's SWING layouting, you'll find C#/.NET ridiculous and primitive.
In .NET, you only have one, fixed layouting mechanism which uses either "Dock" or "Anchor" (read specifics in MSDN's Control class documentation, specifically the "Anchor" and "Dock" properties).
If you're doing UI prototypes I really think that this is a severe limitation.
Other arguments against C#:
"If you'd like to develop new ideas in UI's and really experiment with different ways to handle them, probably neither Java nor C# will really help much."
Flash with Actionscript.
There are ISO standards for a few languages. Those languages have a chance to be viable for a while. Why not present a C interface? You can get at that from any language, and anybody can maintain it. Why not present a C++ interface? It remains unsurpassed as an industrial language. Ten years from now when Java and C# are as nearly forgotten as BASIC and Pascal are now, C will remain an important language, at least for interoperability purposes, and C++ will still be well known and heavily used. There's no better way for your work to wash away than to associate it with passing fads.
Java, C#, and C++ are not scripting languages - for example they have compile-time type enforcement, no eval statement, etc. Starting about 10 years ago I think it's been pretty clear that you don't want to do UI programming in a low-level language like those, you want to use something like Python, Tcl, or Scheme. Just write the "hello world" application in each of those languages and see the difference. It's 2 lines in Tcl/Tk. What's it in Java - 100 lines or so?
Do what skype did. Implement the essence of your application in whatever you see fit. They used c because they needed performance. Then they go round and use the best GUI toolkit on every platform. Objective-C + Cocoa on the mac. Delphi / VCL on windows, QT on linux (ok arguable choice). The clients are very pretty and excellently integrated on all the platforms, for example the mac version uses a drawer like interface for current calls and uses a little translucent notification window on incoming calls with buttons for answer and hangup.
That being said, wxWidgets works on most platforms and you can program it well from many languages like ruby, python, all the c's, c# and so on.
My advice is to stick with what you've got now. That advice would also apply if you were using C# and wondering about switching to Java.
.NET equivalents to your scriptable Ant software build scripts, retrained people and maybe pissed off a few in the process, etc.) a lot more than $0
Honestly, the two languages are close enough in terms of capability that it really boils down to the cost and effort involved in switching.
Cost to remain with Java: $0
Cost to switch to C#: (by the time you've recoded all your "trivial" common routines you've created to work within your particular environment, built
Speak to people who've worked a lot with both languages. Get them to rank both languages out of 10 in terms that are relevant to you. Average the scores across a bunch of people. If C# averages >1.5 more than Java, then consider switching
I'm totaly into java. But for proof of concepts use scripting languages Pyton or Ruby.
C# is unsuitable for serious research, as it is designed to compete with Java for enterprise applications, not systems or interface programming. It is a very specialized tool best suited for running databse intensive applications with very little UI that isn't part of Microsoft's standard widget library.
Java is the language that the majority of comp sci programs use to teach programming these days, and it is very, very good as a general purpose programming language. Its abilities and limitations are well understood and documented in books and scholarly papers, and the number of useful third party libraries, both commercial and OSS, is staggering.
Python would be an interesting choice, too, depending on how much horsepower your UI concepts require. If you're thinking of a photorealistic immersive 3D environment, pick something else. Like fortran on a Cray. But for novel approaches to GUI or command line interaction, check out pygame, the Python libraries designed for game development.
Actually, check out all of the game development systems out there. A GUI and a Game are both a way of interacting with a computer using visual and aural feedback, after all...
SoupIsGood Food
It also seems to me that if you are using Java or C#, which are commercial systems unlikely to be influenced by academic research, you are a bit behind the curve. WIMP interfaces have been around for 20 years now.
If you have research that is best shared through an SDK, then you should use the language and tools of your most likely or receptive audience, no matter how unpleasant that may be. But an SDK implies you have an audience of programmers, and not an audience of UI designers who as a rule wouldn't know what to do with an SDK in any language. If, on the other hand, you have useful tools, then any number of languages would be acceptable.
UIML is a subset of the XML-language for implementing platform- and programming-language-independent user-interfaces.
Maybe you should have a look around, whether there is a good UIML-renderer for Java.
If your research is into this topic, you may even want to develop a UIML-renderer for Java yourself! I'm sure many people would be interested in an open-source project with this aim.
I am using Qt (with C++) and qt-designer myself, which is using a proprietary XML-format for rendering user-interfaces (ui-files).
References:
UIML-tools
Qt-Designer
Qt user-interface renderer
Mozilla user-interface renderer
If you stick with Java, you can use Java language compilers from many different vendors, including gcc, and your code will be portable between many different Operating Systems.
Java is more stable and mature, has a huge developer community and is supported by enormous, comprehensive class libraries.
Stick Men
Just use your bathroom scale. Sybex Mastering Java 2 weighs in a 1236 pages. Harbison & steele, who covered their topic with equal thoroughness and greater clarity, managed C a reference manual in 392 pages. Java decided it had to be the OS and had to move a few layers out into the application space in order to be viable...it may have accomplished that but simplicity?
SLASHDOT: news for people who can't concentrate on work or have no life at all and got tired of yelling back at the TV.
UI Research is a pain in the ass in Java or C#. It's a pain in the ass in any language that makes you work to reinvent.
I perform UI experiments largely with pygame, or perl-SDL. It gives me a chance to rapidly try out USER interface changes as I don't have to worry about whether or not delegation is "easy enough" to facilitate the change.
With Java and C# (or C++ for that matter) you've got an awful lot of work building classes and inheritance and if experimentation demonstrates a particular (unexpected!) trend, you've got an awful lot of work ahead of you to refactor and rework existing paths to make the new paths possible.
Given that, what would the community advise by way of a choice between Java and C#?
Neither. Having watched the video, I am most reminded of AudioPad. For that, "Most of the code is written in Python, except for the low-level tracking code, which is in C and C++." I've also used a demo inspired by that called Mix done in Io. UI experts want to be able to very quickly scale up from the low level of the device to the high level of the research. I would thus suggest you target C in an OO fashion, which will allow binding to all kinds of different higher-level languages.
Seriously, both offer a very rich IO API, and they're both quite mature, despite C#'s "newness". The syntax of both are roughly similar, keywords and C#'s "property" syntax notwithstanding. What you can do with one language, you can do with the other, no problems.
My personal preference is C#, simply because I enjoy the property syntax and delegates, both of which Java does not offer. Plus I'd rather code in Windows.Forms than Swing any day of the week. But you're not doing desktop GUIs, are you? Anyway, you can do the same stuff in Java using the Bean specification for properties and interfaces rather than delegates, though, so don't get me wrong. If you prefer that platform, go that route. Java also offers cross-platform compatibility, which is a plus if you plan to use *nix over WinXP.
But that whole paragraph was trivial. The bottom line is that what matters is whatever your programmers feel most comfortable programming with.
BTW, I saw the video.... am I the only one thinking about using it for table-top gaming? Add this to my list of things to put in my Ultimate Gaming Room (tm) if/when I get the time/money to create one.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
This is *hardware* UI they're talking about. They're not talking about Swing or Win.Forms. They want to know which platform has the better I/O API.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
The more I think that maybe you should consider offering APIs for *both* languages. Why tie your API to one platform?
.dll or .so written in C (or whatever language you use for the driver), and create wrappers in both Java and .NET. You could even create a (shudder) COM wrapper as well, so the VB6 folks could jump in.
You could even consider a multi-tiered approach: create a
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
Slightly anoying are the answers I saw where the amount of available bindings for Python are enumerated and QT or OpenGL come to speak.
:D
.NET, GTK bindings, QT, QT bindings plus the desired scripting language. Whats with mono for the Mac BTW? All the nice Scripting languages for the Java Virtual Machine run on my Mac as well.
....
/. suggested in switching to a "better" language and have endless bindings, the more work you will spend in configuring those systems instead on improving them.
Probably the authors of such posts should at least have watched the video?
Back to topic:
I suggeest to stick with Java for several reason:
a) why dropping a succesfull existing system because of language?
b) why forcing all people allready working with it to learn a new language/environment (libraries and such)
c) you likely get FAR MORE developers (researchers) for Java based software than for e.g. Python
There are people like me who simple never would touch Python.
Why the crowd may ask? I simply can't cope with the syntax. I hate it, I have an awersion against it. I can't stand it that as soon as you try to some meta level stuff everything is done with full capitalized variables starting with __. I cant understand why you have to declare the "this" pointer in each method, called self -- by convention, instead of simply "having one" like in C++/Java. Its a dynamic typed language, I simply can't work with something like that. Thats just me, but there ARE programmers LIKE me, who simply hate languags liky Python and e.g. TCL.
d) Java has enough bindings to scripting languages like Groovy, TCL, Python(Jython), Ruby(JRuby) and a lot of others. It is far better to keep your "kernel" in Java and let the users descide if and how they put additional services or "experimental software" on top of it. So all the guys yelling Python is so much better can use it without blocking me from using Java
Switching to C# gives no new options, but just different ones and IMHO far less mature ones.
Lets look at platforms, in case you want to use a scripting language with such a binding to access your software written in C#: Installing software on a machine allready having Java is merly a download/copy process. C# based software (or GTK/Qt) OTOH needs on Windows likely to be "installed" and the user needs admin rights. For a geek it is easy to install Qt or GTK on HIS OWN windows machine as well as on any other machine/OS he has the rights to. But a PC pool in a university likely has more rigid management.
However for a cross university developemnt process, its better to stick with something simple, where not every PC, Linux or BSD or Windows, needs to have additionaly software: Mono,
e) Releasing your software (even internal) under different languages will undoubtable lead to an enourmous increase in support questions.
Why does my Python call give that silly error message? Because the user gave a wrong argument (type)
The more complex your system becomes, like a lot here on
angel'o'sphere
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
- C# gives you access to a wider variety of tools. You can import most .dlls with far less fuss than JNI. Plus the DirectX / Direct3D bindings give you better media processing capability than Java's sound and media extensions. Finally, if you're doing ubicomp / sensing / small devices and need to do some low-level stuff, C# lets you access USB and parallel devices.
- Java has much better IDEs available. The refactoring support in Eclipse is a critical tool for research / prototyping projects, letting you clean up and rearrange code quickly and easily. Visual Studio is a nightmare.
- If you have PocketPC / MS SmartPhones as a target platform, go with C#. If you have to support anything else, go with J2ME. Java support under PocketPC is available but excruciating to use. Most mobile devices support some kind of J2ME profile, but you'll still wind up writing a custom version for each brand and model of device.
I'm not sure about speed. If you're doing non-widget stuff that requires a lot of low-level drawing, you'll probably be using 2D extensively. My instinct tells me that GDI+ is probably faster than Java2D, but I haven't done much low-level GDI+. The APIs are identical, anyway.
Before I got to the comment list, I *knew* the first comment would by 'python'. LOL. Open source lemmings are so predictable. It's the VB of the open source world - everyone and his brother thinks he is an 'expert' in it, even if he has never written a program with it.
First of all, disclaimer: I am the President of the Northern Virginia Java Users Group, and I am a big fan of Java.
You are doing UI Research... Chances are, you are going to want to do things 'outside the norm' for existing UI development. Which language has better support for this? Frankly, I don't know, because I don't know C#.
I do know Java. Java has AWT, Swing, SWT, JSP, Java Server Faces, etc. With Swing, you can easily switch between different 'look and feels', and has the 'pluggable look and feel' architecture (PLAF) so you can write your own. I don't know what kinds of abilities C# has in this area, but Java was designed with the idea to have chameleon look and feels. I would think that this would make it easier in Java to do the kinds of things you would want to do for UI Research.
Asking most slashdot readers to choose between Java and C# is like asking them if they would want to be bitten by a poisounous snake or crushed by a constricter. I bet most responses will say something like "Python with the QT libraries". That may be a valid answer as well.
A Java person talking abtout "lock in". How many JVM platforms are officially supported, like 3? Win, Linux(x86), and Solaris (Sparc). (Mac is provided by Apple) Compare this to how many are officially supported for python. I count 16 just in the OTHER catagory. So while "lock in" is not locked in to one platform, you are extremely limited in what platforms you can choose.
.pyc files instead of .java. I can only speculate that it was a lack of a standard windowing system and a browser plug in. But everything is better in python.
.Net don't forget IronPython.
Python is also free; there is no controlling corporate body; no single source.
I often wonder why we aren't just distributing
Since you are coming from Java, don't forget Jython. And if you are coming from
All in all, I have to recommend python for so many more reasons than vendor non-lock in.
Also for your new interface I would suggest the PyGame module.
Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
Cool video. What it shows is essentially TouchStream keyboard technology combined with a touchable display. Their device could be built now.
(I'm not associated w/ Fingerworks.com, and in fact was unable to adapt to their products, but they does essentially what the video shows.)
You did say "corporate". And with a PowerPoint compiler, your visions for synergy of paradigms can not be beat!
Hey, quit reading the articles. You're increasing the SNR too much. :)
Java isn't so strong natively on I/O but that's what JNI is for. Wrap your primitives in JNI and do your work in a higher-level language.
Speaking of which, the video just screams LISP, though I have no experience interfacing hardware with LISP. Ruby might be a good second choice - you can wrap c functions with Ruby like you can with JNI and it's a more powerful language than Python which might help in the more lambda-oriented parts of the project.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Appreciate the feedback. As you saw in the video, we are defining new input paradigms. Although there is a great deal of ongoing WIMP related research, ours is not at all in the WIMP domain: we're using the language to build new tools. It's fair to say that HCI research should start with the H, but it certainly can't end there. Implementation and verification of effectiveness is an essential component of any UI design work. Otherwise, it's not researching at all: it's pontificating.
about which you can say the same things :)
The clearance system sounds logical. It is not. It is completely arbitrary. -- John Bolton