Slashdot Mirror


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#?"

29 of 115 comments (clear)

  1. Stick with Java by brpr · · Score: 3, Insightful

    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.
    1. Re:Stick with Java by brpr · · Score: 2, Interesting

      Mono seems to be pretty good in my limited experience of it. Unless you need the Windows forms API, of course. Ironically, Mono works better for me on Linux than Java (just try getting a modern JDK for PPC Linux!).

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
  2. C# vs. Java? by Anonymous Coward · · Score: 2, Informative

    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?

  3. Considered Python? by MBCook · · Score: 4, Insightful
    Why not set it up in Python? Python can be called from just about any language, and can call just about any language. There are Python bindings for Objective-C, the Win32 API, QT, and just about everything else.

    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.
    1. Re:Considered Python? by MBCook · · Score: 4, Informative
      OK, I just watched your video, and I obviously missed the point (to a large degree).

      First I'd like to say, VERY cool concept. Like sometihng out of a movie. That is awesome and looks like it would be so much fun to work on/play with.

      OK, back to the topic. I still think that Python would be a good language. It has the usual features (object oriented, etc), it can be modified at runtime easily (loading/replacing code, a cool side effect of an interpreted language), and there are TONS of standard libraries (not unlike Java, only more) that would give you interfaces to the toolkit you use to draw (OpenGL perhaps?), and other things. Give it a look.

      But awesome application. Now if you could just combine that with a 3D display it would be amazing. And think of the games you could play on something like that (something akin to Qix using your finger perhaps?) Or the "coffee break" game from Mario Paint, or xbill, the list goes on!

      --
      Comment forecast: Bits of genius surrounded by a sea of mediocrity.
    2. Re:Considered Python? by Jerf · · Score: 2, Insightful

      You might be able to split the difference by using Jython.

      Not personally convinced that Java is where it's at where UI research is concerned, but I'll confess freely to not having RTFA.

  4. or Visual Basic by YetAnotherAnonymousC · · Score: 2, Insightful

    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.

  5. Java by Hard_Code · · Score: 3, Informative

    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?
  6. You're asking *Slashdot*? by Short+Circuit · · Score: 5, Insightful

    You're asking Slashdot, where anti-MS sentiment is a given? Good luck getting anyone to recommend C#.

    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 .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.

    When in doubt, go where there's more flexibility.

  7. nasm by BladeMelbourne · · Score: 4, Funny

    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)

  8. Comparing pluspoints by Carl+Rosenberger · · Score: 5, Insightful

    Pluspoints for Java
    --------------------
    + 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 .NET languages
    + easy direct interaction with Windows OS features

    Now what do you prefer?

    1. Re:Comparing pluspoints by mpmansell · · Score: 4, Insightful

      You're making a very big assumption that Microsoft will be the only platform that will be required.

      If you take that away then a number of you C# pluspoints become irrelevant.

      While I agree with you about C# being more open than Java (and I prefer it as a language) most people are thick and don't differentiate languages from associated APIs nowadays. With that thought in mind, how many people really mean "C# and .Net" when they say C#? While you may argue that this is similar to "Java" meaning "Java + Foundation Classes/Swing", the difference is that the Java APIs are cross platform while .Net is, in reality (despite mono) really only a Windows platform.

    2. Re:Comparing pluspoints by SunFan · · Score: 2, Interesting

      While I agree with you about C# being more open than Java...

      Score: +5 wishful thinking. How can a single-platform platform be more open than Java?
      C#'s standardization is simply a marketing trick by Microsoft to lead people into .NET. It is really meaningless in the big picture, especailly compared to Sun's JCP, which has hundreds of members from many varied backgrounds (incl. Apache and JBoss).

      --
      -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
    3. Re:Comparing pluspoints by Carl+Rosenberger · · Score: 3, Interesting

      Maybe my posting looks biased when you compare the number of pluspoints.
      They are random, I just listed what came to mind.

      My personal opinion is very strong towards Java.
      Cross-platform outweighs everything else by far.

      I wouldn't exchange Eclipse against VS.NET 2003 for one day, it feels like your left hand is cut off.

      VS.NET 2005 will catch up on refactorings but the Eclipse platform is gaining a competitive advantage which can't be beaten by MS: It is becoming a crystallisation point for all kinds of open source plugin tools like database browsers (our own brandnew Eclipse plugin will go online on Monday), JSP editors, language converters, you name it, it's there.

      One very important pluspoint for Java which I forgot to mention:
      You get all the sources.
      You can debug into them and see how Sun's professionals (try to) solve things. Yeah, sometimes (Swing) you can also see that Java does let you write awkward code also.

    4. Re:Comparing pluspoints by Carl+Rosenberger · · Score: 3, Interesting
      Are you referring to WinForms?

      Yes, I trust the Mono guys to catch up very nicely.

      How many "dialects" are there of Java?
      • JDK 1.1 is still heavily in use as "PersonalJava", on quite a few limited platforms which are nonetheless important, like Symbian.
      • Some of the more important J2ME dialects:
        • CLDC
        • CDC
        • MIDP
        • PersonalProfile
      • Not all companies can or may upgrade to the latest Java VM. Some developers have to restrict themselves to one of the following. Bytecode produced with newer compilers is not backward compatible.
        • JDK 1.1.8
        • JDK 1.2.x
        • JDK 1.3.x
        • JDK 1.4.x
      • Finally there is the glorious current JDK 5.
      I call that dialects. It's quite a mess if you want to develop GUI that has to run on a handheld and on a desktop.
      Talking of GUI dialects. There is:
      • AWT
      • SWT
      • Swing
      ...just to name the major "corporate" ones. There are tons more by small to mid-size shops.

      C# only has two major dialects:
      • normal C#
      • C# for the CompactFramework (handhelds)
      The strength of Microsoft will prevent the entry of third parties. Many people will not like that at all, but there is one advantage, if you want to build professional software:
      You can take a decision to start today, there is a clear one-and-only choice, with little risk of discontinuation.

      You can't have it both ways; it's either standardised, or it includes GUI stuff.

      I think Java and SWT is a good choice.
    5. Re:Comparing pluspoints by mpmansell · · Score: 2, Insightful

      " You should just never ignore the other side, there may be a lot to learn"

      Well put!

      Its a shame that these discussions get domminated by narrow viewed people with hobby-horses to promote :(

      Personally I prefer the .Net platform to the Java platform, but I think that that is because of the kitchen sink mentality of the JCPs. As you mentioned, they are not always efficient.

      In practice, however, I'll usually use the Java platform, despite my misgivings about it, since it allows me to use it on other operating systems that may be better suited to the job at hand.

      One thing that people often forget when talking about portability is skills portability. A language that can be used on multiple platforms is a more valuable skill to the individual; it gives them more work opportunities :)

  9. Go with Java by mpmansell · · Score: 3, Insightful

    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.

  10. Can't See Why you would change. by the+eric+conspiracy · · Score: 2

    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.

  11. Implementation? by Tamerlan · · Score: 2, Insightful

    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.

  12. Squeak by jefu · · Score: 2, Interesting
    If you're looking to decide if a one pixel wide red line around a menu entry works better than a one pixel wide green line, it won't much matter if you use Java or 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.

    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.

  13. No question; use Java. Avoid OS lock-in. by crazyphilman · · Score: 2

    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!
  14. .NET has primitive layouting by DarkDust · · Score: 3, Interesting

    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#:

    • Java is a mature plattform, C#/.NET is quite new compared to Java
    • There are more people that know how to code in Java than people that know how to code in C# (it's not hard switching from one to other language-wise, but it's a hell of a lot different framework-wise)
    • While implementations of .NET exist for other plattforms (GNU Portable .NET/dotGNU and Mono) they are not completely compatible yet, especially not in the GUI side (I know that since I've fixed a lot of System.Windows.Forms bugs in Portable .NET the last months as part of my work). Compare that to the known-to-be-good cross-plattform support of Java !
    • Ask why the people that want to use C# think that C# is better suited for the job than Java. I'm pretty sure those people just recommend because it's currently the Programming-Language-Of-The-Month and buzzword-compliant. IMHO most technical reasons really speak against C# (except for properties and foreach, which just are nice syntactic sugar but really aren't worth the huge work of switching).
    • Ask what benefits those people expect to gain. Switching your existing stuff will cost a lot of money: it'll cost time for people to learn C# and especially the .NET framework, you'll surely have to use different tools which you'll have to deal with and especially learn their flaws and work around them.
    • Most people will like to use C# with MicroSoft's Visual Studio .NET because they know it and think it's good. Be warned that this is a nice IDE but is really bad at maintaining big projects. Especially big projects with subprojects. VS.NET often makes simple tasks that the developers of VS.NET didn't anticipate extremely hard or even impossible (for example, if you have several subprojects which depend on each other you can't have them compile into one directory: VS.NET will hold some files open and then complain that it can't open those files because "another" application has this file already open; MS knows this problem but simply says "don't compile into one directory", which will force you to do "unnatural" workarounds). I think VS.NET is a nice IDE for beginners and intermediates, but it way too limited and flawed for big projects.
  15. Do what skype did by Tobias+Luetke · · Score: 2, Insightful

    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.

  16. Don't change by darnok · · Score: 4, Insightful

    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.

    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 .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

    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

  17. Stick with Java by turgid · · Score: 2, Insightful
    Stick with Java unless you wish to confine yourself only to the Windows platform. Yes, Mono aims to be a Free implementation in Linux but it's still in development.

    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.

  18. The author is a liar or a fool by mrsbrisby · · Score: 2, Insightful

    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.

  19. Re:C# is Proprietary by Mike+Greaves · · Score: 3, Insightful

    'consider that Microsoft has not given Mono a legal blessing'

    IANAL, and I have myself had reservations about this point...

    However, it seems quite unlikely that MS would succeed in choking off core (C# + CLR) Mono development - for a lot of little reasons:

    1. Novell appears to be Mono's primary backer and they appear to have real patent leverage w.r.t. MS.

    2. Probably not many of the patents covering the core can hold water due to prior art. I think it's been suggested that MS + Sun together could launch a more effective patent attack. How likely is that? (things like WinForms, ASP, ADO would seem to be in greater danger)

    3. Mono could still ship with the odd feature stripped or workaround mechanism in place.

    4. MS can not simply beat up on who it feels like nowadays; not with the EU and others breathing down it's neck.

    As an aside, can anyone think of a *language* implementation that was killed by patent litigation?

    --
    Mike Greaves

    --
    -- Mike Greaves
  20. Re:Why do UI researchers need a programming langua by Randolpho · · Score: 2, Informative

    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
  21. Most answers seem off topic ... I suggest Java by angel'o'sphere · · Score: 2, Interesting

    Slightly anoying are the answers I saw where the amount of available bindings for Python are enumerated and QT or OpenGL come to speak.

    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 :D

    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, .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.

    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 /. 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.

    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.