Live data from Hacker News

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

news.ycombinator.com

91–100 of 107 posts

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

#91
post #50
post #26

Earlier quoted context omitted.

You can do that with a JSP page, and Tomcat. You can use JSP very much like a scripting language (no need to hit a servlet, controller, etc), but obviously it can get a little messy to manage depending how large of app you write.

One big problem; if you keep most of the Java code on the servlet side and you throw an exception, the stack trace will give you the line number of the offending code. OTOH, if you do all that heavy lifting in the JSP side, depending on your choice of server, you get a stack trace...either without a line number, or with a line number of the JSP which was compiled and turned into a Java program on the fly. And we all…

Not entirely true. On Tomcat 5 and 6, the resulting code is really close to the original, plus lots of out.write().

If the logs show an exception on org.apache.jsp.mypage_jsp._jspService(mypage_jsp.java:NNNN), you can find the generated Java class on TOMCAT_HOME/work/Catalina/localhost/myapp and it's rather straightforward from there.

I do this on a daily basis to maintain a legacy app. Not sexy but, not hard either.

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

#92
Here's why (and I'm flammable):

Because it sucks. Seriously. I don't want another bloated framework like tiles, struts or even Spring MVC (and yes, I know it's the 'less bloated' framework).

You know what the best user interface is for Java apps? XML, JSON or Java. You know what the best framework is for a webapp? Me either, but it better fucking be html, css and javascript.

It's not rocket science. For fucks sake if I wanted a framework for my front end I'd use the native language.

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

#93
post #48

Earlier quoted context omitted.

What's the big deal with setting up a "JVM Environment"? Working with Scala for me involves the latest Scala distro and a copy of VIM. Is there something in particular that makes it so painful that I"m missing?

Yes--there's more to setting up a JEE stack then getting a JVM and a language running.

I sometimes do "yum install tomcat6; sudo rctomcat6 start; emacs foo.jsp" just to dink around with the odd corners of the servlet API (I'd do it in Eclipse if it weren't such a pig). You can just ignore a lot of the painful ceremony that JEE wants to inflict on you.

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

#94

I actually have come to enjoy java servers/services this summer at my internship, but there is no way in hell I'll ever do anything with JSP, ever.

Could you expand some more? Why do you 'love' JSP so much after your internship?

No, I hate JSP. I enjoy writing servers and services in Java. I like the statically typed nature, I like the language constructs and I like the breadth of existing examples.

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

#95
I moved all my webapp development from java to python+django. What I observed is: - I code webapps much faster now - I produce a lot less lines of codes - Testing is so much faster due to uncomparable faster deployment time on development server - Templating engine is more clear - Configuration is faster, everything in one file, no sucky XMLs! - Python is easier to read and so fun to code

Ultimately I feel now that moving from PHP to Java was a step backward, and I feel like now I made a big step forward by moving to Django.

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

#97
post #44

I find javadoc very ugly and annoying to look at. Dumb reason, I know but I can't get past it.

To be fair - neither ruby/rdoc and rails api documentation are much if any better in that regard. I like the ruby/rails ecosystem but the javadoc approach was IMHO really OK as well (I don't talk about some of the parts of the standard library / the API itself)

Django docs rocks on the other side... Better than PHP and jdocs.

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

#98
post #27

IMHO the answer is here in this thread... which would you choose? a) php b) rails c) Java + JSP/Servlets/JSTL/Tiles/Struts/Spring/JSF/Play/Wicket/GWT/Stripes/Tapestry/WebObjects

This is not really accurate.

When using java, you will not use JSP, JSTL, JSF, Play, Wicket, STripes, Tapestry, etc, all at the same time. Unless you are crazy.

The same way, in Ruby, you will not use ERB, Haml, Erector, Markaby, or the other (at least) 19 template engines out there (http://www.hokstad.com/mini-reviews-of-19-ruby-template-engi...)

But this comparison is not actually fair, because you mixxed template engines with frameworks. To be fair, you'd have to add Sinatra, Camping, Rails, Merb, Ramaze, Padrino and Hobo to the Ruby list, and CakePhp, Zend and Symfony (at least) to the Php list.

It is not which language has the most options of framework/template engines, but which has the best optins. JSP is one of the worst template engines on Java land, and this is why it is not used as much (well, there is also the fact that it has a very bad reputation, and JSF is considered its successor, but it is worse nonetheless).

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

#100

Earlier quoted context omitted.

Yes--there's more to setting up a JEE stack then getting a JVM and a language running.

I sometimes do "yum install tomcat6; sudo rctomcat6 start; emacs foo.jsp" just to dink around with the odd corners of the servlet API (I'd do it in Eclipse if it weren't such a pig). You can just ignore a lot of the painful ceremony that JEE wants to inflict on you.

Sure, if you don't need it. The bulk of my JEE work is somewhat more complex than "dinking around with the odd corners of the servlet API".
Post reply on HN