Monday, February 22, 2016

Why Tomcat Sucks

I've been a java developer since java first came out. During that time I have had to use HTTP protocol a lot, and with that Apache Tomcat. Initially I enjoyed how the JAR/WAR/EAR file would be used in a Tomcat container and have an uncompiled version in the 'work' directory.

Last year I had a new project where I could use whatever I wanted for the back-end. One of the first times I could choose. Since the project didn't have to scale to a high level, performance wasn't a primary concern. The HTTP calls did have to support the ability to upload and download excel type of data. So that needed to be fast, and I actually worked on 3 different ways to do the upload and download to see which would be faster. JSON, XML, and raw SQL.

All of this work I did using Python and Django, which I felt I was able to accomplish the work 3x faster than if I had written the same code in Java. Also the code was more self describing and would be very easy for a junior developer to review and pick up compared to its Java equivalent.

Here is a list of the things I think Python/Django is better than Java/Tomcat:

1. Real time compilation - I write a line of python, save the file. And the Django server automatically restarts with the new code. I know you can do the same thing using JRebel, but I have found that its a pain to support with various versions of Java and Tomcat. Also the Sales people at JRebel will call you almost every day asking if you plan to purchase the software, and/or how is the software going?

2. Self Describing Code - I felt the python is much more concise and easier to read. Decorators in Python are much more intuitive for security compared to Java annotations.

3. Online Documentation - Here is where I think Python shines compared to Oracles ancient documentation.

4. Native JSON Support - Having a JSON be a Dictionary object in python is awesome. In which a developer can easily stream a JSON request/response to a Dictionary object. Then do complex collection operations on the object.


No comments: