Live data from Hacker News

Ask HN: Why are there so few apps being built with JSP?

news.ycombinator.com

11–20 of 107 posts

Re: Ask HN: Why are there so few apps being built with JSP?

#11
post #5

Just to set up one of the Java frameworks you list is already a lot of work and a lot of wrangling of XML. Without frameworks, it is probably OK if you already have a working web.xml. I used to just copy my working web.xml and modify it. Good luck if you want to create a working web.xml from scratch, though. The specification for a proper web.xml is a PDF with several 100 pages (last time I looked, a couple of years…

Yeah, but 99.9% of what you want to do with web.xml can be summarized in about 2-3 pages of documentations. It's NOT as complicated as you make it sound. The same goes for JSPs and JSTL. You could have a decent understanding of both technologies in an afternoon of reading.

Re: Ask HN: Why are there so few apps being built with JSP?

#12
post #5

Just to set up one of the Java frameworks you list is already a lot of work and a lot of wrangling of XML. Without frameworks, it is probably OK if you already have a working web.xml. I used to just copy my working web.xml and modify it. Good luck if you want to create a working web.xml from scratch, though. The specification for a proper web.xml is a PDF with several 100 pages (last time I looked, a couple of years…

Thanks for making me feel a bit better. The only way I can get a valid web.xml file is by getting started from a simple copy and then relying on my IDE to warn me when I'm about to make a mistake. Come to think of it: I don't know when I last started a Java web app from scratch. The first thing I do is copy the configuration from an existing project and strip out everything I don't need.

Re: Ask HN: Why are there so few apps being built with JSP?

#13
From my own experience of working with Java/JSP at work and PHP for side projects (I'm also learning Python), it comes down to developer productivity -- rapid application development, deployment speed and developer experience. For most small- to medium-size projects, you can achieve the same results in Java, PHP, Python, Ruby and even ASP, but the journey towards completion varies greatly across languages and tools.

IMHO deployment on the Java stack is not as fun. Time spent configuring Tomcat, Ant, and compiling code adds-up, especially for a basic web app or prototype. The Java stack also has a larger learning curve for beginners.

However, if you work on "enterprise" applications, especially ERP, finance and banking, Java is currently the lingua franca.

Re: Ask HN: Why are there so few apps being built with JSP?

#14
post #9
post #6

I can't speak for PHP but if you follow the usual Rails conventions for db structure, URL layouts, etc then it takes significantly less time to build (and maintain) a Rails site vs Java EE. Simply collecting all of your Java libraries, frameworks, dependencies, etc and getting them running in your app server can take days. Minor changes like adding a db column can end up touching nearly every layer. All these costs d…

It doesn't take me days to get a Java web app up and running. It takes me minutes. In days, my Java web app is done. I'm a senior engineer who codes for pleasure, so maybe I'm faster than average --- but if it's taking you days to get your libraries together and minor db changes touch every layer, you're doing something wrong.

I'm curious what your framework of choice is.

Re: Ask HN: Why are there so few apps being built with JSP?

#15
post #14
post #9

Earlier quoted context omitted.

It doesn't take me days to get a Java web app up and running. It takes me minutes. In days, my Java web app is done. I'm a senior engineer who codes for pleasure, so maybe I'm faster than average --- but if it's taking you days to get your libraries together and minor db changes touch every layer, you're doing something wrong.

I'm curious what your framework of choice is.

Spring, Spring MVC, SiteMesh, JSTL, JSP and iBatis.

Re: Ask HN: Why are there so few apps being built with JSP?

#16
post #9
post #6

I can't speak for PHP but if you follow the usual Rails conventions for db structure, URL layouts, etc then it takes significantly less time to build (and maintain) a Rails site vs Java EE. Simply collecting all of your Java libraries, frameworks, dependencies, etc and getting them running in your app server can take days. Minor changes like adding a db column can end up touching nearly every layer. All these costs d…

It doesn't take me days to get a Java web app up and running. It takes me minutes. In days, my Java web app is done. I'm a senior engineer who codes for pleasure, so maybe I'm faster than average --- but if it's taking you days to get your libraries together and minor db changes touch every layer, you're doing something wrong.

Recently I started working on a new project using Tapestry 5.1 in GlassFish 3. That particular combination requires replacing GF's StAX lib with a different implementation that Tapestry depends on. Then there's the usual issue of reconciling the 2-3 different logging frameworks that various components depend on, writing the (albeit minimal XML descriptors for the app, web app, EJB, configuring resources in the app server admin console, etc.

It's unlikely you can do all that in minutes, so you're probably talking about copying an existing app template.

Adding a db column requires modifying the entity itself, DTOs, form beans, and of course the relevant JSP/templates. With Rails conventions you'd only modify the pages.

Re: Ask HN: Why are there so few apps being built with JSP?

#17
My opinion. It's partly because teams who do webapps tend to be small, young and agile. First, prejudices: they prefer new things (Java is old); they dislike the environment that is Java's home (big enterprise) and the practices and personalities types that go with it (perfectionistic, professional, conservative).

Second, real reasons: Java is verbose and statically typed, and therefore it takes more work to make changes - it is slower to develop in and less flexible/agile. These things really count when you want to try out an idea; and when you need to adapt it. There's also a community effect, where all those early adopters are working with Ruby/Python, that's the platform cool stuff gets developed for (eg. sinatra, github, haml).

Technically, it's possible to write a sinatra in Java (I have; using annotations for urls); but who would use it? I actually love Java myself, including its static typing, and use it in my startup. But when I've played with Ruby - even as a novice without knowing the tricks - I found it much quicker to develop in, and the code easier to understand because less cluttered. It's probably not as reliable; and the code doesn't run as fast; but these things just don't matter for prototypes and early versions.

Re: Ask HN: Why are there so few apps being built with JSP?

#18
post #11
post #5

Just to set up one of the Java frameworks you list is already a lot of work and a lot of wrangling of XML. Without frameworks, it is probably OK if you already have a working web.xml. I used to just copy my working web.xml and modify it. Good luck if you want to create a working web.xml from scratch, though. The specification for a proper web.xml is a PDF with several 100 pages (last time I looked, a couple of years…

Yeah, but 99.9% of what you want to do with web.xml can be summarized in about 2-3 pages of documentations. It's NOT as complicated as you make it sound. The same goes for JSPs and JSTL. You could have a decent understanding of both technologies in an afternoon of reading.

No, but the documentation is horrible. Somebody should create those 2-3 pages of documentation.

Actually the web.xml spec got much worse somewhere in the increasing version numbers of Java Servlets. I rememeber just thinking "WTF" when I realized it was several 100 pages now. It definitely doesn't need to be that long, but I guess they wrote the documentation "enterprise style". It's just off-putting, who cares if the documentation could be simpler? They didn't make it simple, so I don't like it. Especially since the job of a Java developer is essentially digging through the mountain of specifications.

In my companies library there is a book "Handbook Of Java Development" with 1300 pages in small print. I think somebody left it there as a cruel joke.

Re: Ask HN: Why are there so few apps being built with JSP?

#19
post #13

From my own experience of working with Java/JSP at work and PHP for side projects (I'm also learning Python), it comes down to developer productivity -- rapid application development, deployment speed and developer experience. For most small- to medium-size projects, you can achieve the same results in Java, PHP, Python, Ruby and even ASP, but the journey towards completion varies greatly across languages and tools.…

A good IDE can help most of the issues you mention. Eclipse is free and you can compile Java web apps in it without Ant. I've worked places whose deployments involved making a WAR file from Eclipse. Configuring Tomcat in Eclipse takes a few clicks to basically just point to where you have your Tomcat directory. Compiling from Eclipse requires you to click a green arrow icon.

Re: Ask HN: Why are there so few apps being built with JSP?

#20
For me, it's purely emotional.

My last class at Uni 2 years ago was a survey of web dev technologies. We built sites using ASP.NET, Perl, PHP and JSP. Java and asp.net were tied for worst experience ever. Setup and configuration of the Java stack was 2/3rds of the project. And, that's after taking 2 years of Java in school. Setting up a Java stack on a Ubuntu or a Windows box was equally as painful for me at the time.

My experience at school as made me loathe to try anything Java related. And, while I love the idea of the jvm, I have a pretty visceral emotional reaction to anything java related. I know it's wrong, but I can't even bring myself to do the installation required to mess around with Clojure or Scala.

I get the same vibe from a number of young developers I come across at Hackers and Founders SV meetups that have recently graduated from school. Someone mentions Java at our meetups and everyone at the table groans.

Python and Ruby are essentially lingua franca here in Silicon Valley startup culture, with C and C++ mixed in for speed. I've settled on Python/Django for day to day dev work.

In my case, even though Clojure and Scala look really sexy. The thought of installing a jvm based development environment makes me break out into a cold sweat. If I'm going to play around with a "sexy" language to learn stuff I'm going to play with Haskell, Erlang, or O'Caml, just to avoid using the jvm.

Post reply on HN