Why I choose Java

As programmers we have a bewildering amount of platforms and languages to choose from. Making such a choice is not always easy, yet it’s quite an important one. Many parts of your application can be refactored later, but language is not something you can (and should) change overnight.

So what are the viable options?

At first it matters to decide on what platform your app is going to run. For an iOS app it’s basicaly Objective-C, with C++ and pure C being options. For Android it’s Java, although with some Google flavors added.

For desktop apps there’s more choice. OS X is Objective-C again, Windows is mostly C#, while Linux favors C. On all those platforms, C++ is an option as well (combined with eg Qt) and surprisingly C# is an option too (via Mono). Java actually runs on the desktop too.

Serverside there’s quite some choice as well. Java is exceptionally strong here and C# is no baby either. C, Objective-C and C++ however are barely options here. There are some other choices here though, like Ruby and PHP.

Since my interest is primarily serverside, I focussed mainly on that area. After careful consideration I choose Java for my next project for the following reasons:

1. Java is on of the most popular programming languages in the world.

This becomes clear when looking at the Tiobe language index, jobs available on indeed.com or questions on stackoverflow. Java is often number one or very high ranked (on SO C# has more questions, but Java follows not far behind). This means there simply are a lot of resources available to the Java programmer. There are many books available, many conferences to go to, many articles to read and many jobs available. RoR may be a nice and influential framework, but Ruby simly doesn’t enjoy the popularity that Java does. Tiobe puts it in the 1% range, while Java sits in the 18% range.

2. Java is one of the fastest languages around.

The Debian language shootout consistently puts Java in the top tier of most performant languages. C and C++ do outperform it, but not by a very large margin. Dynamic languages like Ruby, PHP and Python perform much, much worse. On some benchmarks this is even 2 orders of magnitude worse.
For web applications it’s often the case that 90% of the time is spend in the database, so Java web applications are certainly not two orders of magnitude faster in general but it does allow web frameworks to do quite some extra work without any significant impact on performance.

3. Simple no-nonsense syntax.

Java has a simple syntax that’s relatively easy to learn. It’s in the C family, so Java knowledge easily transfers to a multitude of other languages. I actually liked C# a bit better here, but Java and C# are still relatively close and Java gets some syntax enhancements real soon (JDK 7, I love try-with-resources) and some more are on the way (JDK 8). The only thing I really disliked about the Java syntax is checked exceptions. It’s a personal thing maybe, but to me both the Ruby and Python syntax just look too weird. I tried them both but me and they just didn’t click.

4. Java is cross-platform

Java is available on many platforms and its binaries work everywhere with the exception of Android, which compiles binaries to another VM format (Dalvik). C# was mainly at a disadvantage here, as it’s very strongly tied to the MS platform. The language is available on Linux, but its ‘native’ library .NET certainly is not (at least not at a level suitable for production). C is actually available on much more platforms than Java, but binaries are completely not portable and even source code often contains many system specific things.

5. Java has an incredibly rich yet easy to use standard library.

The standard library of Java is incredibly rich. It contains many things for which most other languages need to resort to third party libraries. The C and C++ std libraries are both much smaller, and few non-trivial programs will be build using only this. I found here PHP to be at specific disadvantage, as its std library stroke me as being very sloppy and inconsistent. Objective-C and C# don’t really have std libraries, but have defacto ones (Cocoa resp. .NET).

Where Java really shines is in it’s std ‘extension’ library for the serverside: Java EE.

In its latest incarnation, Java EE 6, the power and simplicity this offers is amazing. It’s a full stack framework, meaning it covers most everything from the GUI to DB persistence and everything in between. The GUI is handled by a very ellegant component based web framework called JSF, which provides support for scopes and validation. Validation is handled via constraints that are placed on entity objects once and can be enforced by all layers of the application. Via special beans called EJB beans the framework handles transactions nearly completely transparently.

Especially the many blog postings written by Adam Bien made me see the power and simplicity of Java EE 6.

Well, that were my top 5 reasons for choosing Java. I wonder what your reasons are.

– John Waterwood

About these ads

53 Comments

Filed under Java

53 responses to “Why I choose Java

  1. Issam

    That’s why I switched back to Java after long time C++ coding. But to be honest I like both of them :)

  2. Sidi Mohamed EL AATIFI

    Java is a great language and a great platforme but please do not use JSF for your next project, specially if you have the choice :).

    • Why do you say that? What is wrong with JSF? :-(

    • Why? JSF 2.0 is a pretty good thing.

      • zhang ye

        I work with big development team in China. We made team for new product (when you see big announcement in news soon, maybe us). It became very soon clear to us, JSF 2.0 (and Java EE 6) is absolute winner.

        Yes, we made many discussion with programmers. We did market research. Look on stackoverflow, what Java web framework has most questions and what is quality of answers. For JSF, this much more than others. Also indeed.com, we enter keywords like java wicket, java jsf, java gwt, java struts. Now struts winner, but JSF second. Then we looked at feature list. Again, JSF is top. Important for us: component libraries for JSF are very good!

        Then we tried simple page and little bit more complex page. JSF worked very good for our requirements. Validation very natural and powerful, and templating (Facelets), with composite components perfect for what we need. Many more things we liked in JSF, but sorry, maybe post getting little long.

        Finally, I must add, we tried couple other frameworks like Wicket and GWT. Wicket maybe little like JSF sometimes and also good, GWT bit weird at first but we think has power too. Only, there can be one winner, and for us this winner very clearly is JSF 2.0.

    • Well I did have a choice, and I choose JSF. JSF 2.1 to be precise (which is btw a very minor update from 2.0).

      JSF 1.x may not have been that great, but 2.x absolutely rocks! For instance, it has the concept of a view scope that just works great. There are many great libraries with components available for it (richfaces, primefaces, …), and creating your own components out of a simple Facelet template is really easy.

      • Sidi Mohamed EL AATIFI

        Personally I worked with JSF since the early versions (2005) JSF 1.0, 1.1, 1.2 and 2.0, with RichFaces, IceFaces, Facelet & JSP…

        My first argument against JSF: JSF render HTML on the server, in my opinion this is the most important issue, If I have a choice I would choose GWT or JavaScript(Closure, jQuery or Dojo) with a Single Page Interface pattern.

        Secondo the ecosystem of JSF is not very web friendly. For example Richfaces components are very ugly and the HTML generated may cause you a lot of performance issues.

        Frankly JBoss guys may be a Java Entreprise Gurus but they are not a Web Application Development reference, and when you look at the HTML generated by the components you’ll be shocked.

        These are a few reasons why I would not recommend JSF for new projects.

      • Storm14k

        I spent a year fighting with JSF and decided that if I want something componentized then Wicket or GWT was the way to go….especially GWT if I want a single page interface. JSF 2 is great in theory but when I got down to the meat of doing things a simple pagination system was almost impossible. Then I discovered that you’re supposed to use the third party component libraries for things like that. That was ok for a while until one doesn’t have something and it you have trouble trying to mix it with another. Then I realized that the whole idea is just wrong. I should be able to build something that simply myself and rely on third parties for advanced features if I want to. It also didn’t take me long to figure out that the backing beans could become just as big of a pain as ASP.Net code behinds.

        Now I’m using GWT as a front end and Python as a backend communicating over JSON RPC. Its been a joy so far. But for the rest of your article I agree. Java gets a bad rap sometimes for nothing as a language. Although I can say that once you get into the frameworks like EE 6 or Spring it often becomes overly complex.

      • zhang ye

        Secondo the ecosystem of JSF is not very web friendly. For example Richfaces components are very ugly and the HTML generated may cause you a lot of performance issues.

        Sorry, but maybe small problem in reasoning here. Okay, you say is just example, but if one RichFaces component generates HTML which is not so nice, then this is not to blame entire ecosystem and is also not problem with JSF itself.

        My first argument against JSF: JSF render HTML on the server, in my opinion this is the most important issue,

        Now you talk in riddles a little. First you tell JSF is not web because of ugly HTML. Then you say fact that HTML render on server is not web. But this I don’t buy. Sorry. Is not world wide web and HTTP started with server serving web documents via HTTP.

        This is perfectly normal! And core of web.

        But you tell me that JSF is not web because HTML does come from server? Again, sorry, but I don’t buy this argument.

        Now we talk about Internet (not web), and having client-side app talk with server is of course one option. Only, for me Javascript (GWT) as complete client-side app feels bit weird. Javascript great for nice effects, but maybe not so great for full app. For full client-side app, I think approach iPhone app or Android java app takes is much nicer for user and also nicer for developer.

  3. Laurence Toenjes

    I agree with you, Java is still a good choice as a tool to satisfy all sorts of different types of IT needs.

    After dabbling in a number of languages and operating systems over the years, I really love the Java platform even more after discovering Groovy. It’s nice to write stuff that will run on a mac and windows. I have no idea why there is so much Java applet hate out there – Java Applets work just fine for me (it’s nice to focus on programming instead of dealing with browser rendering nuances plus JS headaches when you just need to get stuff done).

    • Jeff

      I totally agree. Applets are useful in certain scenarios. Especially with the release of update 1.6_10, the memory constraint of 96MB was removed.

      I think Applets were introduced a few years to early. Would they be released nowadays they’d be used much more often… hence why Oracle still bets on JavaFX which isn’t anymore than a super polished version of an applet IMO.

    • Sidi Mohamed EL AATIFI

      Come on, it is not a problem of reasoning, it’s only my appreciation of the JSF components libraries out there. And it may cause a serious performance issues.

      Let me just clarify a thing.

      There is a big difference between a Web Site and a Web Application.

      So when we talk about web application we talk about interactions, about data exchange between client and server, we do not talk about navigation between resources.

      Mcclanahan has created JSF and now he is playing with Rails toys..

      JSF is not restful, use POST for every thing, there is no support for backward buttons.

      nowadays, we use the web browsers in web applications as a thin universal client.

      There is a lot of architectural issues to manage state in the server side (wich is useless by the way).

      Look at HTML5 Local storage, websockets, CSS3, WebGL …. Facelet XML can not replace them :).

      Just face it, the Web of 90 is not what we use today. JSF was designed to compete with ASP.NET and seduce “Corporate developers”. Today Microsoft published ASP MVC… and works a lot on jQuery (look at datalink and other plugins).

      This is just my opinion. Peace be upon your soul and that of your team :)

      • Muhammed, McClanahan only created the initial version of JSF, which had a lot of problems. Luckily Ed Burns took over and did some much needed damage control resulting in JSF 1.2. This was the first version included with Java EE and the first version that was actually tollerable. Where JSF 1.2 was mainly damage control of the mess that McClanahan left behind, for JSF 2.0 Ed Burns actually had the opportunity to do more radical changes.

        So what he apparently did was listening very well to all the complaints against JSF and addressing most if not all issues. In doing so, the EG not arrogantly invented only their own solutions, but very closely looked at what kind of solutions people had already come up with and incorporated these into the core spec.

        I can honestly say that JSF 2.0 in my opinion is really a very good framework.

        Specifically about the POST issue; this is not the case anymore. JSF 2.0 contains first class support for GET requests.

        May peace be upon your soul too, my brother. :)

      • I think this opinion is just wrong and outdated. JSF 2 is great, can do at least what other frameworks can, can surely use html5 and css3, is a component framework *and* has great component libraries. And… it’s standard, implementations have to follow some rules.

  4. elbek

    I really love java, becouse there are many choises (many frameworks), of course extremely fast, It is just amathing with “Spring”.

    • zhang ye

      Yes, Spring is very good part of Java! We compared with EJB3 and thought two bit similar. This time we make choice for going with EJB3, but maybe next time we try Spring (no problem with EJB3, but just nice to try different technology :))

  5. Java served us over 15 years. It is widespread and well known to developers which makes it programming language of my choice for any complex project.

  6. Dave

    > 3. Simple no-nonsense syntax.

    Wat

  7. All major linux distros have mono installed by default . (Fedora too in disk mode i think). And all those linux distros have at least one C# application running by default (aka tomboy). Where are java desktop apps on linux ? If you say , mono is not production ready, then you dont know what you are talking about

    • mono is not production ready

      That’s not what I meant. Mono itself works perfectly and it can be used to build great Linux apps. The thing I was referring too (maybe not that clearly) is the availability of the full .NET library on other platforms than Windows.

  8. Steve Lindsey

    I’ve not seen the tiobe index before but if their “Very Long Term History” is anything to go by then it’s surely a joke.

    SL
    32 years development experience

  9. Nicolas

    Java is great for it’s extensive echosystem. JAVA as the best IDE support, the biggest community and thousand third party library of profesional quality (ofen backed up by a company). Java run everywhere and is very fast.

    This is no accident many languages (clojure, scala, groovy…) build on the JVM to be part of this echosystem.

    JEE is good but most of the time overkill and too complex (even JEE 6). I do not like the concept of applications servers either but I must admit that JEE allowed many standard to emerge and the typical JAVA app use many of them.

    Main Java strengh is it main weakeness too. Being used to build the most complex things, jave architects tend to overdesign and overengineer advocating use of complex design pattern and JEE for doing the simplest thing.

    The good news is that you don’t have to stick to theses advenced design. You can keep a simple architecture when this is enough, and use the advenced frameworks when really needed.

    Many plateform can do the easy things, maybe even faster and better. But have no support at all for advenced needs.

    • zhang ye

      When we did research, we encounter post like you. Java EE is complex and overkill for simple things they say.

      But maybe you can explain to us.

      We build web app, so we need web GUI and Java EE has JSF 2.0 for this. We did not find feature in JSF we have no use for.

      Then we need business services for transactions. This offered by EJB3 and very simple. Only put @Stateless on simple POJO bean. We want to use all cores of server, and also use @Asynchronous.

      Now we need persistence. Here is JPA available. Very powerful for getting complete object from DB with only little code: em.find() and we have object!

      There is also JDBC, JTA and Servlet in Java EE, we use but is under the hood.

      All of this is not strange, no? And Java EE gives us this. We got our app running in short time. Does not all web applications need GUI, Business and Persistence?

      Maybe special for us, or maybe not, but we have API so external developer can make use of our system. We have JAX-RS for this and comes also with Java EE. This really simple. We put @Path on simple pojo and now we have API via REST.

      Maybe there is overkill in Java EE, but so far we did not find it. Please, Mr. Nicolas, maybe you can explain where overkill is, since we want to avoid. Yes, we read about EJB2, CORBA and Ejb entity beans (not jpa entity, but weird old EJB2 thing). We simply not use this.

      • @zhang ye
        I was having the same opinion like you until I tried Spring and Apache Wicket. The problem is Java EE forces you to go with an application server if you use EJB. Where as Spring apps can run on POSC (Plain Old Servlet Container) like Tomcat or Jetty yet providing the same features that EJB provides.

        IMHO using an application server for things that otherwise can be done via a servlet container is an overkill.

        And regarding the web framework, please give a try to Apache Wicket in your next project. I’m using it and absolutely love this.

      • @zhang ye
        Why don’t you use your JAX-RS layer yourself? Why is it only for “external developers”? If it’s good enough for them, why would you not use it yourself? I think this is an example of a very common attitude among Java developers – an overly Java-centric approach to developing web applications.
        In my opinion, Java programmers should not be writing web GUIs using Java frameworks at all. A better alternative is to learn and use more suitable languages for the GUI tier of your application. e.g. XForms, XSLT, or some such.

      • zhang ye

        @Paua Fritter
        >Why don’t you use your JAX-RS layer yourself? Why is it only for “external developers”? If it’s good enough for them, why would you not use it yourself?

        But I not said it is only for external developers! Yes, we use it too. But please realize, JAX-RS is only extra mapping to EJB method. When our system does Java 2 Java communication and server close to eachother (no firewall) and frequent calls, then better performance going via binary communication.

        For our system, difference is small. Since ultimately, just comes down to protocol we use. But method called, exactly the same! Now, same method, we may also expose via JAX-WS. Only 1 extra annotation. We not do this yet, since nobody asked, but is possibility.

        Then we have other more loosely couple service. Is firewall between and we not do very frequent communication. For this we make HTTP call for our JAX-RS service.

        >I think this is an example of a very common attitude among Java developers – an overly Java-centric approach to developing web applications.

        I not agree! We have database PostgreSQL. This not Java! Also OS is not Java (not many OS in Java). But please, we *JAVA* developer, not PHP developer. So when we make choice, yes, first choice Java. Why not? Maybe you speak English. Is not first choice for book English? Maybe there is good book in German. You read this???

        >In my opinion, Java programmers should not be writing web GUIs using Java frameworks at all. A better alternative is to learn and use more suitable languages for the GUI tier of your application. e.g. XForms, XSLT, or some such.

        Okay, this really weird. Sorry. I’m programming application in Java. Java therefor tool I use. GUI is part of application, as we make WEB application. Why not make GUI in Java? Now if Java very bad for GUI, I little agree. But Java very good in GUI. You used JSF 2.0? I think not, otherwise you know it very good.

        And this not problem of Java! On my computer I have application. This is C++ application. You think GUI is made with Pascal? Or maybe with Cobal? No??? Now we have same problem. Since C++ program uses C++ for GUI? Oh? Now C++ programmer is wrong? Don’t think so!

      • zhang ye

        The problem is Java EE forces you to go with an application server if you use EJB. Where as Spring apps can run on POSC (Plain Old Servlet Container) like Tomcat or Jetty yet providing the same features that EJB provides.

        This wellknown fallacy! With Spring apps you also have application server, but is hidden away in war. So Spring app forces to go with Spring application server and Spring container if you want make use Spring beans!

        Maybe you not know, or not want to know, but Tomcat does not have Spring support directly.

        Now in Java EE, not so much different. I consider JVM as deployment platform, this even more lightweight than Tomcat! I deploy my app which is JBoss + own code to JVM. ANY JVM will do.

        Now you deploy Spring + your code to Tomcat or Jetty. Who has more possibilities? Maybe Java EE ,no?

        And little silly, but I too can put entire AS in war! No problem and I have done this in past, but not so convenient. I put Mojarra, Weld, Hibernate, OpenEJB, JBossTS and HornetQ all in .war. Now my war becomes large (like Spring one) and I have application server embedded in .war (like Spring does) and I have maintenance overhead (like Spring does). But this buys nothing for me! Only silly argument with Spring fan who loves to use word “container” and “application server” because Springs fans once told this nice stick to beat Java EE with.

        Look back my comments, I say I like Spring, but I not like fans like you. Sorry!

  10. mnicky

    I started with C, then learned Java and although I’m not strongly dissatisfied with it, after two years of programming in Java I start to see why so many people don’t like it. I’ll sum it up to a few points: Java has quite wordy syntax and is evolving very, very slowly (e.g. lambdas that JDK 8 will bring maybe the next year were present in other languages like Python or Ruby years ago). Back then when Java appeared, it brings some really valuable, new things to masses, but than Java fell asleep and was overtaken by other programming languages, which are now more powerfull yet more simple like Java. The things I like about Java is that it’s really cross-platform (but other JVM languages like Scala/Clojure and to lesser extent languages like Python/Ruby are cross-platform as well) and has lots of libraries available (but languages like Python/Ruby do as well)… While I don’t want to throw Java aside, now I’m going to learn Python and also would like to learn Clojure in the future…

  11. I don’t understand how anyone can use Python and claim that Java has a “no-nonsense” syntax. The noise is Java’s syntax and semantics is so overwhelming I need to overdose on pain killers to use it. Equivalent Python code is about 4 to 10 times less than that of Java. “No-nonsense” alright! Even a simple HelloWorld program is extraordinarily verbose in Java. I’m not even going to compare powerful abstractions. Does Java have “real” closures yet?

    http://www.archive.org/details/SeanKellyRecoveryfromAddiction

    http://pythonconquerstheuniverse.wordpress.com/category/java-and-python/

    http://www.python.org/doc/essays/ppt/acm-ws/sld024.htm

    • The thing I tried to explain is that I didn’t based my choice of language on just the syntax. Many things mattered to me. Java’s syntax is simple in the sense that it does not have an awful lot of fancy language features. It draws most of its power from the libraries and JVM. With annotations one can implement features that might be thought of to require a language extension.

      Personally I think the Python fans greatly exaggerate the supposed pain that the Java syntax induces. Quite a lot of people enjoy writing Java and we don’t feel any of the pain you try to talk us in to.

      Besides, having such a rich library available means that Java coders can often rely on a single annotation or a few method calls, for which you may have to write thousands of lines of code in Python.

      The shortest code is the code you don’t have to write at all, and with Java this is often the case for many common problems. Additionally, if a syntax becomes “too clever” it may not actually improve readability. We all know and perhaps hate Perl for this.

      • I think you have things backwards. Given Java’s convoluted APIs you almost always have to write more in Java than you do in Python. Some studies claim 4 to 10 times more! Yes even with “libraries” and all. In fact, I dare you to bring up just 1 example where Java code has less lines of code that equivalent Python code. Go ahead. I’m waiting. :-)

      • I want to add that your choice to use Java based on the availability of Libraries is a good and valid choice.

        The most important factor to me in choosing a platform or language is the availability and accessibility of very powerful abstractions and also the ability to easily compose even more powerful abstractions to solve problem patterns.

        Libraries are a form of abstraction. How well they are designed is a discussion for another day. In any case, the availability of libraries to help solve problems is very important, if not most important, in a platform’s ecosystem.

  12. I love Java as well, but one little problem I found is that hosting for web applications is kind of expensive compares to other frameworks. Have you found any good hosting service for Java?

    Thanks,
    Oscar

    • Well, Google App Engine has free Java hosting. It’s an (advanced) kind of shared hosting, so there are some restrictions. Servlet, JSP, JSF, CDI, JPA and JAX-RS are available among others, so this is fairly complete. Other shared hosting solutions (eg for PHP) also have limitations so considering GAE being free I found I could live with it.

      If you do want to have the full Java platform available, there are not really any other options than renting a full (virtual) server. Amazon has rather affordable options here. Purely technically speaking, a virtual server is shared hosting too, but the software is layered completely different.

  13. cjalmeida

    Also, static typing matters. It allows one to develop powerful IDEs like Eclipse, makes refactoring way simpler. Allows some additional static analysis. Yes you could write 100% coverage tests, but who does that?

    I love Python conciseness and elegance, but I aways find myself looking back and forth the reference because I forgot the spelling or expected arguments for a given method. And some large refactoring (like trying to clean-up your own code a few months latter) always give me the chills. You know those Friday afternoon sprints never get well tested.

  14. noname

    have u tried vaadin, its really awesome and uptime is very short.

  15. Kevin Wright

    Which Java? The platform or the language?

    You seem to have amalgamated the two in your reasons, yet many of these benefits can be realised from othe languages that compile down to JVM bytecode: Mirah, JRuby, Clojure, Jaskell, Groovy, FJ, Scala (to name just a handful). Especially Mirah and Scala which are statically typed and have particularly good interop with Java’s standard libraries.

    To address the rest of your points:

    1 – Popularity isn’t everything, at one point Java was relatively unknown. Fortunately, it’s lack of popularity didn’t stop it ever being adopted

    2- It’s not the language that’s fast, it’s the JVM
    Read this: http://www.theregister.co.uk/2011/06/03/google_paper_on_cplusplus_java_scala_go/

    3 – Java is *not* simple, it’s full of corner cases other bizarre behaviour. Read the language spec some day, or a “Java puzzlers” book

    4 – The language isn’t cross-platform, the JVM is

    5 – The standard library is available to any language running on the JVM. Though the date/time isn’t especially easy to use, and the inherently mutable collections are far from easy to use correctly in the face of parallelisation.

    • Regarding which Java I hope it was obvious I referred to the whole package, the JVM, the language and the library.

      There may be 100′s of those languages like Mirah, Jaskel, Skupa, Idiolly-2, Rascow, Lya, Zlya, Lua… The list is literally endless. But what on earth is the rationale behind adopting any of these obscure minority languages? I don’t have any problem with the Java syntax, my team mates don’t have any problem with it, and our technical customers don’t mind it either.

      Scala may have some attention in the blogosphere right now, but it’s practical usage is still near zero. Tiobe only mentions the language exists, but doesn’t rank it. This means the language is just not really popular. What follows is that overall support is low (e.g. Tooling like IDEs and static code analyzers).

      Don’t get me wrong, I kinda like Scala but it’s not exactly a safe choice at the moment, is it?

      1. You are very right here. There’s a beginning to every road, but not everyone wants to travel roads that lead into the unknown. Java started in a time when there were relatively few hyped languages. With a syntax that looked similar to C++, but simpler and with killer features (at the time) like garbage collection, a sort of smart pointers, much simplified replacement for what #include is used most for and, a simple high-level immutable String type and… the ability to easily get something graphical on a screen, where all things I remember that basically made it an overnight hit.

      Now look at Python, Ruby and Scala. These are not new languages at all. Python is from 1991! Ruby is from 1995 (same year as Java) and Scala is from 2003. Whatever those languages are, apparently very few people immediately fell in love with them.

      Currently there are quite a number of languages who each claim to be the ultimate “new” language, and in order to fullfil this destiny it seems its fans must attack the number one language (Java). It’s because of this that I take statements like Java is *extremely* verbose and painful to use with a grain of salt. In my book it’s still a very good language.

      2. It’s both. JRuby crawls on even the most optimized JVM. Java’s syntax is such that it gives the JIT enough information to optimize fairly aggressively.

      3. I read Joshua’s effective Java and puzzlers book and even participated in Joshua’s real time puzzlers during talks. Yes, those situations exists, but there are puzzlers in every language and static code analyzers recognize a bulk of them as many are well known by now.

      4. True, the Java binaries are mainly portable to many platforms by virtue of the JVM being ported to many platforms. But there’s a little more to it. The language also plays a role by specifying fixed width datatypes and internally using unicode. The library also helps by providing various system abstractions (like threads) that require system specific functionality with some others languages. Here again I look at Java as the whole package as explained above).

      5. Yes, Java libs can be used by other JVM languages, but the result is not always pretty. It’s not for nothing Scala fans have cried for a native Scala MVC framework, despite the sometimes embarasing number of those that already exist for Java.

      The Java library has simple utility functions for making many collection types unmodifiable. And the concurrent package has collections that can be very efficiently shared between huge numbers of threads (eg ConcurrentHashMap).

      • Kevin Wright

        Scala may have some attention in the blogosphere right now, but it’s practical usage is still near zero.

        Except for at Twitter, LinkedIn, Foursquare, Google, Amazon, the UK government and numerous banks.

        Tiobe only mentions the language exists, but doesn’t rank it.

        Tiobe mainly ranks (and this is putting it politely) your likelihood of finding someone to write about a given language. As professional engineers, we should be basing our choices on a more robust, and relevant, metric.

        Don’t get me wrong, I kinda like Scala but it’s not exactly a safe choice at the moment, is it?

        Commercially supported by a company that includes James Gosling, Doug Lee, and Martin Odersky (…who wrote the Java Compiler) at the helm; I’d say that Scala is a safer bet than Java right now. The commercial interests of Typesafe are strongly aligned with the interests of Scala users, I can’t say that I have the same degree of confidence in Oracle’s motives.

      • Well, I deeply respect Doug Lea (not Lee ;)) and Martin, but have some mixed feelings about James lately. But yes, this gives Scala some extra credit and I’ll keep monitoring it to see how it progresses. I do have to mention that I also respect Gavin King, but have doubts about the future of this Ceylon, which is -yet- another new JVM language and I’m actually wondering whether they have a Plan (pun intended).

        I case you happen to have any kind of influence in the Scala community, please tell them to work on binary compatibility and improving tooling support.

      • Rich Lopez

        Kevin,
        Don’t try to bullshit anyone with this “Scala is a safer better than Java right now”. Nobody believes it. You Scala fanboys are just delusional

      • Kevin Wright

        Half of Typesafe is working on tooling, the other half on binary compatibility. They don’t need any persuading to stick to the status quo :)

  16. Pingback: Por que escolher Java? « Fernando Franzini Java Blog

  17. Zameer

    hi gurus
    Any one worked on Oracle ADF, it is very easier and fast for developing any complex Enterprise apps using Jdev, with oracle weblogic server.

    Other wise use Apache MyFaces(Trinidad) [ it was known as ADF Faces]

  18. carol mcdonald

    I totallly agree with this : Ruby and Python syntax just look too weird!

  19. Simon

    ZK is a radical improvement for java web. It is like an applet described with XML layout running at the server which is painted as XHTML into the browser as a single page app. Google “ZK desktop MVC” for patterns and sample code, or even “ZK MMVM MVB” for .Net like coding yet pure java running at the server with Ajax library code working in the browser. I would love to try jsf and wicker yet I found ZK first and it is too far ahead of those branded solutions.

  20. Simon

    I find language flame wars very odd. The last fee years I have worked on codebases with over thirty developers coding full time. In any such team saying that “this logic takes less lines of code” has no value. How long it takes for the less strong members of the team to understand the code is more important – so split the logic onto more lines written in a plain way is best. All devs should take a touch typing course and use ctrl+space to have IDE complete the line of code (or whatever is shortcut for you). Seen like this what counts is a mature programming environment.

    I was recently able to attend a course paid for by my employer to learn smalltalk: a language better than Java but killed by java. This course we send devs on to learn OO and TDD where they don’t fall into their bad habits of there main language – using smalltalk to teach forces you to think before you type. Is smalltalk the best language – yes – but it died as java was free and “web” so won the market. Whilst it is still a superior language the IDEs are old, the runtimes don’t port, the multiple CPU support are old. Then Java JVM is alive and kicking.

    I see too much poorly written code written in Java. Nothing to do with Java just a reflection that it has aged with people’s learning fixed at five years ago. Deprecation are never cleaned out of the core API. Would I prefer to code Scala on JVM? Sure, but I am paid to keep a large team coding and don’t yet have the luxury of a fresh project with a small set of polygot programmers on their third or forth language who learnt smalltalk for the love of learning…

  21. +1 for PrimeFaces
    +1 for Vaadin

    I like both, and depending on your needs, the one will seem more attractive than the other.

  22. I dont really know if we should start another language comparison here, however, i would not disagree that your points above are wrong.

    But, I seriously believe that there’s a language for everything, we should not be saying, one language fits all.

    Syntax wise, I think i prefer ruby, hahahaha!
    Windows applications, I prefer c#
    web development, i prefer javascript(just nodejs)
    Just too many cases :)

  23. Dazza

    As someone who has been spending a very long time trying to figure out whether to go with c# or java, I decided to go with java mainly because it just seems to ‘click’ more with me. I know the C# syntax isn’t too different, but perhaps its having to use visual studio thats been putting me off trying to learn c#? Anyways, thanks for a great article, you’ve certainly reinforced the reasons for my choosing java or c#.

  24. srishti

    informative read.. I’m all new to JAVA developer community and few of your points echoed with me too.. I’m enrolled in http://www.wiziq.com/course/1617-core-java-for-beginners-icse-students and people out there asked me to surf around that may help in visualizing a larger picture worldwide.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s