Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java or Scala for new greenfield projects?

Tags:

java

scala

After I read Bloch's discussion http://www.infoq.com/news/2010/04/bloch_java_future I started to think about "Do I have to switch to scala for new web developements" or is java preferred in all cases. What is your opinion ?

Thanks,

like image 616
sirmak Avatar asked May 02 '10 14:05

sirmak


4 Answers

If your choice is between Java or Scala, you should probably go with Scala. Spring, Hibernete, etc. works just fine with Scala, so if you can use it right now. Tooling for Scala isn't too bad in IntelliJ at this point. It's not like it was 6 months to a year ago.

However, I must caution you... Java is a pretty bloated platform at this point for strictly web development. I was a hardcore Java software architect for 9 years, and have been doing Scala recently, so I have a bias towards these platforms. Even still, if all you want to do is make an app that provides modest functionality over a database, you should just use Grails, or even Rails (although Grails will probably fit your skillset better).

I wouldn't recommend doing Lift for Scala unless you already know functional programming.

like image 106
egervari Avatar answered Nov 15 '22 12:11

egervari


It depends on what kind of web applications you want to work with although I would choose java due to the large code and API base its large community

like image 20
kafrlust Avatar answered Nov 15 '22 10:11

kafrlust


I am still a big fan of Java Spring. Some people think it might be a little heavy weight however, with annotations and auto wiring, you can put together Web apps really quickly. As well, with Java, you have access to a whole wealth of open source libraries especially from Apache commons.

One of the things I don't really like about Scala/Lift is that the line between view and controllers are a little mixed. With Java Spring, there is a clear distinction between view and controllers particularly if you use a template language for the view like Apache Velocity.

Over all though, depending on the size of your project, I don't think there is a large difference between Scala and Java. Both will do the job for you. If your project has the potential of becoming very big, I would err on choosing Java because of its maturity and large body of mature open source libraries readily available.

like image 3
Chris J Avatar answered Nov 15 '22 11:11

Chris J


I think it depends on the scale of your web applications and your human resources. Do you have good programmers who can catch up with the new technology quickly? You also need to care about the due time for the project and the budget as well.

It may be a good time to try out new technology only if it is really suitable for your project. Java still has a strong position in community and you can also find a lot of supports and open source framework.

like image 2
vodkhang Avatar answered Nov 15 '22 10:11

vodkhang