Nuxeo - an ERP company - took the decision on 2006 to port their core products from Python to Java. Infoq recently got hold of their CEO to discuss how the conversion went and also discussed the merits of static very dynamic typed languages since Nuxeo now tried both.
Summary of reasons to convert to Java
1. The availability of components and frameworks in Java like Hibernate, Lucene and Eclipse makes it much easier to build applications. Although they admint Python is great, it wasn't suitable for the platform they were envisioning to build.
2. The range and depth of the Java libraries was one of the main drivers for switching to Java. The Nuxeo product is using 100 libraries in total, including jBPM, OpenSocial, OAuth for widget inclusion, Apache Shindig, Apache Chemistry for CMIS, JXA-RS, JPA, JDBC, JTA, JSF, Seam and RichFaces.
3. Build system facilities based on Maven, Hudson, JUnit. Supporting Jetty, Tomcat, JBoss and bare OSGi.
4. Market Reasons. The market for java applications is huge. All companies know Java. Most already have java applications running. A lot of companies require Java for their IT. All system integrators have extensive java knowledge.
5. Community Reasons. The community is again, huge. The Java Apache community is tremendous. There are big annual conventions around Java (JavaOne, ApacheCon, Devoxx, Jazoon, etc.) and hundreds of small ones.
6. Specification Reasons. Many technologies in the Java world are based on published specifications that have many implementations and reference implementations promoting clean specs.
7. High availability of tooling for Java. The VM itself, debugging tools, IDEs, monitoring, performance benches, etc.
The results of the new Nuxea java based platform
1. Performance scales of about 10 to 100 times more.
2. In terms of features, its around 4 times the scope of what had been.
3. In terms of developer compatibility and ease-of-use, its about the same, but with alot more tooling experience.
4. Doubling or even tripling the capabilities of the old platform.
How customers reacted?
1. 80% were okay with the change.
2. For those organizations that didn't want to move, the community stepped forward to ensure their ongoing support (the open source advantage).
Merits of Python versus Java (Merits of Dynamic versus Static typing)
Merits of Python and Java is a subset of the merits of Dynamic versus Statically typed languages. Lets see what both sides have to say.
Advocates of Dynamyic types languages argue that they are faster to code in, since the languages are inherently more expressive.
Advocates of Static typed languages argue that time saved in development using Dynamic languages is time lost in testing. This is because the lack of type information makes testing harder. In addition, dynamic languages are generally slower than statically typed languages and thus tend to be more expensive to scale.
Nuxeo Opinion on Static and Dynamic Languages
In Nuxeo's case, they tried both dynamic and static languages to write their large scale product that consists of thousands of classes and hundreds of thousands of lines of code. Nuxeo's CEO says: Without a doubt, statically typed languages are better for such applications and yield many benefits giving you:
1. An IDE with proper autocompletion
2. An IDE that knows all the uses of a given method or field in all of your classes thus vastly improving search and refactoring.
3. Many compile time checks.
4. Tools that find patterns and bugs in your code.
5. Tools that extract documentation based on the actual types in your code. This is because a statically typed language will explicitly indicate the type of an argument passed to a function. This is rarely a hindrance and always good documentation. Dynamism on the other hand doesn't bring you anything except for less typing of the argument types.
What about the advantages of dynamic languages?
IMHO, dynamically typed languages are useful only for tiny applications or fast written scripts that perform different tasks.
Another interesting thought that comes up when debating dynamism versus static languages, is an analogous subject that has sparked myriads of debates in the United States when Obama's administration applied a new set of regulations on businesses (which in some people's opinions is freedom limiting).
I've spotted this interesting analogy from comments placed by the infoq.com visitors on the same article discussing the new regulated economy.