20 Years of Java
Well, seems that Sun Microsystems announced Java on May 23, 1995. I started to play with it at University in something like 2002, and after 13 years and projects (even not Java) it’s my favorite platform. The language is not perfect ‘per se’, but IMHO Java outclass all other platform for it’s “ecosystem”, where it started pioneering in aspects then taken by others (sometimes mimic or reinventing the wheel).
This amazing platform allow me (and you) to:
- use that library! (or my own in different projects) >> thanks maven to make it easy (than before)
- find a good way to do X
- offer services/pages in response to HTTP requests >> Servlet Specification, and choose your container
- have objects on a relational Database (aka ORM) >> JPA Specification, and choose your library
- multi tenant objects retrieving on a Database >> JPA2 again
- webservices >> JAX-WS specification, and SOAPUI to easily test or load test
- REST >> JAX-RS specification
- websocket >> Websocket Specification
- compose/configure my objects to adapt on different deployments >> Spring, and CDI
- logging frameworks >> SL4J API and choose your runtime library! (take a look to logback)
- caching data for at least 15 minutes and with a maximum of 1000 entries >> the new JCache Specification and of course Guava caching
- public-subscribe queues
- integration patterns
- multi-threading, transactions, connection pooling, batch executions
- test what I’m doing >> JUnit, mockito, hamcrest, etc…
- change overall behavior without touch the existing code >> AspectJ and AOP
- really run on different OS (and hardware) >> not limited to Android
- remotely control and monitor >> JMX adding Jolokia and Hawtio for more pleasure
- tune how my application perform >> JProfiler, plumbr to measure it; multiple Garbage Collectors and soft/weak/phantom references to change it!
- easily improve your code (and the things that your application do!), before trashing it when nobody knows anymore how/where to change it (aka REFACTORING) >> thanks to IntelliJ IDEA, Eclipse, Netbeans
- write with other languages! (with pro and cons for each one)
I’m missing tons of other things of course, but speaking about the Java ecosystem in general I can see these strong points:
- Standardization for better reuse/interoperability
- Mature and battle-field tested libraries and best practices
- Open-minded community of real developers
Standardization for better reuse/interoperability
We all know that it’s no good to reinvent the wheel. We all know that sometimes you have to. I see only two valid reasons for do that:
- The wheel is not a wheel (it’s a square!) so we need to radically change the “shape” of the solution.
- The wheel doesn’t fit (I’ve a Panda, not a SUV!) so you can’t use because of some constraints.
This two reasons helps to distinguish a specification (a well-structured solution to solve a problem) and an implementation. This is a really important aspect to build the basis of a successful development platform, and luckily Sun started the JCP allowing people to contribute and define specifications with sometimes multiple implementations developed from the community.
(Almost) all these specifications helps the developer to focus on the business part of their applications, with a good confidence that what they build upon other components will work.
Mature and battle-field tested (open-source) libraries and best practices
Really…. there’s a Java library for almost everything, and some of them are so widely adopted than they had been refined over the years, surviving on production in a myriad of configurations/environment and load. Hibernate, Spring, Jetty, JDBC drivers, apache-commons libraries, guava, etc etc etc.
Open-minded community of experienced developers
Here again, you can’t have a successful development platform without developers. Furthermore, my feelings, maybe a little bit biased, are that the Java platform has the more experienced developers. I can imagine that in the beginning days of Java, a lot of professional developers approached the platform attracted by the good design of that new modern language. I believe that a lot of those developer are still contributing to the Java ecosystem, and probably helped other junior developers to improve theirs skill.
I say open-minded because, even with an important standardization process, you can’t win them all, so as a community you have to be open to other solutions and recognize what’s not work and find other way to solve problems. This happened, for example, with the evolution of the JEE specifications now highly influenced by the Spring Project.
Last but not least, we can’t miss this: http://jz10.java.no/java-4-ever-trailer.html