views:

295

answers:

7

I'm part of a group that starts a new development project from scratch. Currently it is on hobby-basis but we aim to make it our living in the time frame of 1-2 years. We are senior developers coming from a multitude of languages and techniques with much of the focus on Java for the last few years.

Now, we're thinking of choice of toolsets and languages (the future is bright when starting from scratch). We want to be able to use modern architectures efficiently and have good experience in Java and other JRE-based techniques.

The project is in short a lot of I/O, databases and a decent UI that probably needs to be web-based and feel quite efficient.

One route to go is classic Java and build UI using GWT (or layers on top of GWT), another is Scala + lift.

Then there are other techniques based on Ruby, Groovy and so on.

My question is then: What would you select as tools for a new long-term project given the above. Is Scala here to stay for instance or is one of those with only temporary hype?

What other techniques do you consider for larger projects from scratch?

A: 

Have you tried Jython -- Python working on JVM? I use it quite often to do various database tasks and it works quite well with such databases as Oracle, PostgreSQL and Informix. I do not create classic UI apps, but I have read that well known Python Web frameworks like web2py or django work with Jython.

Michał Niklas
my feeling is after using languages like ruby and groovy (which also work on the JVM) he wont want to go back to a language like python ;)
banister
@banister - why not? What exactly is the conceptual difference between groovy (a dynamic language on the JVM) and Jython (a dynamic language on the JVM)?
oxbow_lakes
@oxbow_lakes, there are many conceptual differences between python and ruby/groovy - multi-line lambdas and blocks being just one (and possibly the reason he may not want to use python)
banister
Yeah, dona a lot of jython previously.This is more of personal feeling rather than fact, there is somethingin the syntax/structura that doesn't appeal to me.Perhaps the indention syntax? I don't know....(Hate to be biased without facts, perhaps it's thegirl in me talking ;) )
Bjorn
+1  A: 

With the information given you can choose any language proposed. They will all still be here in 5 years.

If you cannot decide which tool to pick for your requirements we can't help you. The information given is just to vague to decide. Start building some prototypes for all language/framework and see what fits best. Maybe the requirements are more clear afterwards.

Thomas Jung
Thanks, didn't want to put a book of requirements here, just get a general discussion going.The main point that most people make is that scala as an exampleis here to stay for some years.We're of course already prototyping and testing.
Bjorn
Forgot fat/thin client: You are absolutely wrong ;)I don't want to decide, or rather I might change my mind at a later time. Instead I want to build a set of services to access the UI-infoin a structured way and then I can prototype using someui (fat or web doesn't matter) and then switch later.(I'm also considering command-line for scripting abilities etc.)
Bjorn
@Bjorn - So you should be able to see which fits best. A generic discussion is not that helpful in the end. There will come nothing new from these. There are too unspecific. It will result in an invitation of language zealots.
Thomas Jung
@Bjorn - So this is more an architecture with remote services accessed by the web layer and/or fat clients?
Thomas Jung
+7  A: 

Possibly your biggest binary choice is whether you decide to stay on the Java Virtual Machine (JVM) via either Java or one of the other languages which compile into bytecode, or to move onto some other platform, possibly Ruby or Python (with the complications of working with different architectures/operating systems that this may entail). Personally, I decided that I very much wanted to stick with the JVM and hence your language choices would be...

Scala

All I can give is my own experiences coming from a Java background: migrating to scala was made easy by its natural integration into the Java ecosystem and the ability to continue to use pretty much the same toolset in the same way.

By this last point I mean that the statically-typed nature of scala means that all the refactoring and code-navigation opportunities are still available to the developer but scala's type inference means that this comes without the unnecessary verbosity of type declarations littered throughout your code.

I can still use my favourite stuff like Spring, ant, IDEA and I can still use all the libraries I've ever written in Java (this is an argument for picking a language which integrates with Java over a completely new one like Ruby, Smalltalk or Python).

From the perspective of whether scala is here to stay as a JVM language, this is what concerned me most. But consider how many questions on SO have been tagged Jython (161), JRuby (176), clojure (388) and Groovy (661), assuming you wish to stay on the JVM. Not only is scala now well ahead of these (815) but it is growing at quite a rate.

Lastly, although I have not used Lift, a colleague has been extremely impressed with it (and I would probably look at it if I were writing a web application). The fat-client alternative (scala swing) I have found to be more than useable (better than raw swing at any rate!).

Groovy

It's worth noting that the creator of Groovy recently said that had he known of the existence of Scala, he would never have bothered to create Groovy!

JRuby / Jython

I have lumped these two languages together because they both represent an attempt to port the syntax of a dynamic language onto the JVM. Unless that syntax is already familiar to you, why would you bother to go down this route? I must say, the SO stats (above) do not indicate that these have the momentum at the moment.

I would also opine that moving from a statically-compiled to a dynamic language is a big step and you might be surprised by what you miss (in terms of refactoring and development aides etc.) - you may also care about the fact that the interpreted nature of these languages makes them over an order of magnitude slower than Scala.

Clojure

I have no real opinions on clojure other than to say that with an imperative background, its syntax is scary and its flow extremely unfamiliar. I am becoming more impressed by the functional paradigm but I felt that clojure was a step too far for me; I would be a fish out of water in the language, having no previous experience of LISP/Scheme.

oxbow_lakes
+1, Scala FTW !
missingfaktor
815 question? Scala may be just more complicated/expressive. There aren't that many typing questions in Ruby. So these numbers mean exactly not that much.
Thomas Jung
176 is for JRuby. ruby has 7287 and ruby-on-rails has 9624. Ruby is more popular than Scala.
huynhjl
@huynhjl Don't care. These are tools. Cannot understand the fights over languages. Scala is cool. Ruby and Python are cool dynamic languages. There are situations where each of these fit better than the other. Get over it.
Thomas Jung
huynhjl: Ok, point taken, goof to know.As seen earlier in thread, I just dont want to jump on a dying trend, it doesn't have to be trend that everyone jumps on.
Bjorn
@huynhjl - I was making the argument that it might be preferable to stay using the JVM, if that is what the OP is familiar with. Following on from that, the choices are dynamic languages for the VM, Scala and clojure. I was simply referring to scala's popularity (and hence its *stickability*) over the alternatives.
oxbow_lakes
Actually, I don't know anything about ruby. Was just pointing to a fact. It's harder to find a developer knowing scala than ruby. My take is, if you are considering ruby, go with ruby, not JRuby. I think twitter uses ruby+scala, so that's not mutually exclusive.
huynhjl
I never mentioned Ruby! I was always talking about JRuby because my advice was to stick with the JVM platform.
oxbow_lakes
@oxbow_lakes - don't get me wrong, I like your answer. I would not go the JRuby route if JVM is a requirement.
huynhjl
+4  A: 

The choice of language implies a lot of other choices, which collectively can be more important than the language choice itself. More specifically, when you choose a language, you're also choosing that language's web framework, ORM, IDE, build tool, etc.

For example, if you choose Groovy, you're implicitly also choosing the Grails web framework, if you choose Scala you're choosing Lift, etc. Although you can use Eclipse/Netbeans/IntelliJ for almost any JVM language, the experience varies quite a bit depending on which language you're using. Eclipse is a great IDE for Java development, but a pretty crappy one for Groovy/Grails development.

The problem with this kind of question is that if you ask a guy who uses language X, he'll tell you to choose X, then list all the reasons why X is so great and a few shallow reasons not to use the other languages. Examples of such shallow criticisms include:

Scala

  • poor tool support
  • functional programming is esoteric to typical OO developers

Groovy

  • dynamic languages are unsuitable for large projects
  • dynamic languages perform poorly

Jython

  • whitespace indendation as code block delimiters sucks
  • dynamic langages (see above)

JRuby

  • reputation for bad performance
  • funky syntax (from the POV of a Java developer, at least)

Clojure

  • very funky syntax (from the POV of almost everyone)
  • very immature

I should emphasise that I don't necessarily believe any of the statements above to be true, the point I'm trying to make is that it's very easy to dismiss languages without any real experience of them (I only really know one of the languages above). So I wouldn't put too much faith in what people say against a particular language, unless you're sure they've really used it.

If I was faced with your choice I would use Groovy/Grails, because I find it to be an extremely productive and enjoyable technology to work with for building web apps, with good tool support. Are there other choices that might be even better? Sure, but Groovy/Grails is good enough for me (for now).

Don
Don just drop your comments on Scala. The IDE support is not too bad (at least with IDEA) and python/ruby/clojure are functional in a similar way. The rest seems not to well founded as well.
Thomas Jung
@Thomas - I fell into the same trap you did. Don was giving **duff** reasons given by a programmer who uses language X, *not to use* language Y.
oxbow_lakes
JRuby does not have a reputation for bad performance, you're confusing JRuby with MRI Ruby (the C implementation).
banister
@banister - I think we're all missing Don's point. Read the paragraph before the **Scala** sub-heading again!
oxbow_lakes
@banister - also from a performance perspective, JRuby is slow when compared to scala/Java. See http://tiagofernandez.blogspot.com/2009/05/java-integration-with-groovy-jruby-and.html for pointless microbenchmarks
oxbow_lakes
@oxbox_lakes you're right, my comments about the various languages are not things I believe to be true, but rather shallow criticisms that could be made by a programmer who does not really know these languages.
Don
@Don -I agree with the general point that language choice does not stand alone, and tends to be tied to other choices.However, contrary to the assertion "if you choose Scala you're choosing Lift", interoperation of Scala with Java allows you to use frameworks and libraries developed for Java.I am not yet doing so, but I expect I will at some point be trying out Scala with Wicket and Hibernate.I don't know the other JVM languages well enough to know if similar statements apply. I'm certainly not ruling them out and may experiment elsewhere.- (another Don)
Don Roby
@donroby - i know you can use Java frameworks with Scala, Groovy, etc. but in most cases that seems like a bad choice. What's the point in using Groovy (for example) unless you use a web framework that allows you to take advantage of Groovy's features (e.g. closures, metaprogramming, dynamic typing)
Don
+2  A: 

If you all have strong Java background and no functional and/or dynamic languages background, then you are likely to do well by keeping to Java or migrating to Scala.

I don't mean to disparage any of the other languages here, but Scala will be more familiar to you, and you can put your Java familiarity to good use. Whether you should jump to Scala or not -- that's another question. If you do, however, take notice that you need not be stuck with Lift. Not only there are other web frameworks in Scala, but people have had success combining Scala with traditional Java frameworks such as Wicket.

Daniel
A: 

If you have experience using dynamic languages, and are able to write the unit tests to support them, go that way. The development speed should be greater than what you can achieve from a static language. However, as the project will get bigger, it may become harder & harder to mantain ( it may only be me, but compile time checks help you a great deal ).

If however, you have Scala experience, I'd choose that instead. I find Scala to be a nice mix between Java and Ruby.

Good luck!

Geo
+1  A: 

I worked a lot with Scala, Groovy and JRuby and I can share my experience

Scala

  • This language was designed in a very in a professional way. You can see it in every aspect of it.
  • No performance issues because it is a static typed language.
  • Interesting to learn and play with because of its functional nature.

BUT:

  • It is very complicated. You can't spend an evening to write a hello world program. You should spend at least a weekend)) Dmitry Jemerov (one of the creators of IntelliJ) said that Scala is much more complex than C++.
  • Lack of a good tool support. I believe that IDEs for Groovy and Ruby is much superior.
  • Not well integrated into java ecosystem. Of course you can use java libraries but you will dance a lot of all conversions from one collection to another e.t.c.
  • Lack of pure Scala libs. You always have to write a small wrapper over a java lib.

Groovy

  • Has shortcuts for most java boilerplate code.
  • Great IDE integration.
  • Interactions with Java are so natural and easy. It is not important whether you use a java class or a groovy class, it just works.
  • Great for writing DSLs

BUT:

  • It is a slow language (But I think that it is not an issue in most cases)
  • As the integration with java is the main goal of Groovy there are some unnatural aspects of the language.

JRuby

  • One of the best designed languages I've ever seen.
  • There are a lot of cool libs that can be used.
  • The best language for writing internal DSLs
  • Easy to learn.

BUT:

  • The integration with java sucks.

In my opinion it is too early to use Scala in production systems. It is just too hard because of the lack of tools and libraries. I used Groovy in many big projects quite successfully so it may be the best tool from these 3 languages.

Victor Savkin