Saturday, March 08, 2008
Has Java started becoming legacy? May be "YES".
What is next after Java? It could be the newly becoming popular Dynamic languages.
Java lacks some of the features offered by many recent Dynamic Languages like Ruby, Python, Groovy etc. Is that a problem for Java as a language? I would say "Yes it is in this modern Internet (Web 2.0/Rich Internet Applications(RIA)) and RAD (Rapid Application Development) age. Java as a language lacks dynamisn, suffers expressiveness and human-cenric readability. I believe that is enough for Java to be marked as a legacy language to lose its popularity over the increasingly growing user base of Dynamic/Scripting Languages. Also some of the recent frameworks like Rails and Grails has proven what kind of frameworks can be developed by dynamic languages. Frameworks like these are just impossible with non-dynamic languages.
Monday, December 17, 2007
Top 5 reasons why Groovy is the best dynamic language for Java
- Offers seamless integration with Java
- Java like syntax with flat learning curve
- Mix and match Groovy and Java classes
- Brings in Dynamic language features to Java
- Brings in Fun with Productivity
Groovy generates same bytecode as Java. Once compiled, Groovy classes are nothing but Java classes for the JVM.
Groovy has Java like systax. Groovy code is more concise and readable than Java code. It comes with dynamic language features that Java language is lacking. Also brings in scripting capabilities.
A Groovy class can extend a Java class and vice versa. A Java class can implement a Groovy interface and vice versa. Groovy shares same object model, libraries ans same security model as Java.
JetBrains "joint compiler" eliminates the need for cleverly chosing the order of compilation while mixing groovy and java classes when one extending another or one implementing another and vice versa. It offers compilation of both classes with one go without having to worry about dependencies between both types of classes.
When compiling from command line through groovyc, just specify -j for joint compilation. For e.g.
groovyc *.groovy *.java -j -Jsource=1.4 -Jtarget=1.4
ANT task and Maven plugin is available for groovy project. Maven archetype is also available for rapid bootstraping your project.Run-time method dispatch is one of the core feature of a dynamic language. It happens at run-time instead of compile-time.
Groovy is fun and lot more productive to code than Java. Your code can be more precise, expressive and readable than Java code.
Groovy 1.5 gets more groovier with...
- Support for JDK 5 features including annotations, generics and enums
- Syntactic enhancements
- Enhanced dynamic capabilities through Expando meta-class (contribution from grails project)
- Improved performance