0

Please let me first emphasize that I am not looking for flame wars. I just want advice from people who have real experiences.

I started learning JAVA EE 6 as real newbie and am having a difficult time choosing what tools to use. The first question I have is - what are the advantages of using Scala vs. Groovy with Java EE 6 apps over Java? I've seen on some blogs people mentioning Scala can mean writing less code but as a newbie I don't know what other advantages and disadvantages there are.

The second question is whether I'm better off choosing Netbeans 6.9 or Helios 3.6.1? I realized that with eclipse I can easily mix EE 6 applications with Groovy or Scala without any problems (I only did this by displaying a String message from Scala and Groovy classes.). With Netbeans the only advantage I can think of is having separate Java project libraries and using the jars in my web app. But I also realize to the extent of my little knowledge Netbeans has better support for Java EE 6.

Please need your expert advice.

Thanks.

blueberryfields
  • 13,200
  • 8
  • 51
  • 87
  • Your SO question got migrated to this site as well and I've now merged it into this one. In general, don't worry about manually cross-posting to multiple SE sites. If a question belongs elsewhere, it can be seamlessly migrated for you. – Adam Lear Feb 08 '11 at 21:23
  • 2
    I'm fairly new to Java but have been learning the Spring framework, what Scala and Groovy seem to try to do is to remove some of the conventions of Java such as needing to statically declare variables.. its just basically making Java have features more like a dynamic language such as PHP, Ruby, etc.. honestly I think its best to learn the core Java stuff, such as Java EE6, spring, etc and then use these where needed, you don't want to shortchange yourself as, for good reason, a lot of companies wouldn't be using this for their development as static typing has advantages. – programmx10 Feb 08 '11 at 21:58
  • 1
    also, writing less code does not always mean thats ideal... sure, its easier and faster to write but it can make it harder for someone else to maintain later so its always a trade-off – programmx10 Feb 08 '11 at 21:59

3 Answers3

2

NetBeans vs Eclipse is a holy war question. I say this not because I think it's a bad question that should not be asked but because most of the time holy wars mean that the two pieces of software are equal enough that you should just pick one and start using it. Personally I've picked Eclipse since it was what was used at my last job and it's what I see used most of the time. Use what works and try the other every so often to make sure what you're using did not fall behind.

Scala vs Groovy is simple if you know what you are aiming to do. Groovy is more designed to be scripting language and Scala is more designed to be a next generation OOP language. So if you are looking to quickly write scripts use Groovy if you are looking to write code that will stick around for a while and will be part of your actual application use Scala. Long story short, Scala will best help you in Java EE work.

In a way, this all misses the point. If you want to be an awesome Java EE programmer (as your name implies) I would start looking at frameworks in Java, not languages built on top of the JRE like Groovy and Scala. While some big names have started using Scala (like Twitter and FourSquare) most people don't have any reason to stray far from standard Java to get their work done. You will be far more marketable if you can use Spring or Hibernate then if you knew both Scala and Groovy.

Also be awesome in core Java before you learn other stuff. There are lots of cool shiny toys that run on the JRE so it's easy to get distracted. Just remember that if you are good at the core Java ideas (or core programing ideas for that matter) you will be able to pick up anything you need very quickly.

If you are just getting started I would recommend starting small and learning some Ant. It's the standard language for Java build scripts. Learning it will both give you a useful skill in common Java software and teach you the ins and outs of the Java compile process. Two warnings 1)It's a headache if you try to do anything impressive in it so stick to building simple apps. 2)Don't expect it to mean much on a resume, basic Ant knowledge is just a useful skill to have as a Java programmer.

If you now want to know what framework to learn that's a whole other holy war question. I recommend you look at jobs in your area and pick something everyone seems to be using that sounds fun.

AmaDaden
  • 121
  • 1
  • 6
  • +1 for learning core Java, and frameworks such as Hibernate/Spring first. From what I've seen it's much more popular to use various frameworks in a web app than switch out it's language. – Jon Onstott May 04 '11 at 22:46
1

As new Java EE developer, Scala or Groovy are the least of your concerns. It is more important to remember that most companies using Java EE are very conservative. You'll be lucky to be using Spring 3.0 and Java 6, let alone Scala or Groovy. I could list an alphabet soup of Java EE technologies that you should learn, but the best thing you can do is create a full-stack Java EE application and deploy it on an application server. JBoss, Geronimo and Glassfish are all open-source. Heck even, Weblogic, is available for free for non-commerical use.

If you're not comfortable with Java and Java EE programing to write your own app, then look for the classic Pet Store examples. To get started with Spring, Spring has a new series call 'Green Beans' http://www.springsource.org/documentation. I'd suggest using Spring Tool Suite over Netbeans, because Eclipse is the main IDE I see use at client sites. STS bundles of all the key plugins most shops use.

0

Rick as you pointed out by this morning even before seeing your post I've made up my mind. Sometimes the complexities involve in mixing languages defeat the purpose of the advantages of the additional languages. Also so far based on what I've found no one have been able to use scala effectively with J EE 6 without doing a lot of trial and error and also the lack of documentation related to its integration, most of the info are from blogs of hobbyists or should I say people willing to venture. What I also realized is that as a beginner it's not advantageous to try to grasp a lot of stuff at same time. Rather start with the basics well integrated and well tested then if you master that and the need arises to use additional languages/tools then go ahead and venture. Thus finally I think I'm gonna settle with Netbeans and Java EE 6.