Hacker News new | past | comments | ask | show | jobs | submit login

I've used both, and while I'm no fan of PHP I think it's absurd to even compare the two. Quite simply, JSP is an exercise in masochism. These days JSPs are only used for the view layer and most of the work is done in a servlet or a controller in whatever framework you're using so they really serve as little more than a templating tool.

Even when used that way they are a royal PITA because of the bean conventions and the fact that many of the classes in the Java API (Collections cough) don't adhere to them. Unless you use a scriptlet you can't directly call a method on an object. You reference properties like myObject.prop1 and in the background it would call the method getProp1(). This convention only works with get, set and is* methods. If you want to get the size of a list (List.size()) you're SOL since lists don't adhere to the bean naming conventions. You either have to write a wrapper class or use a scriptlet. It's some kind of cruel joke.

PHP isn't pretty, but it's got a huge library of functions, it's easy to get it running and it doesn't enforce a bunch of questionable rules in order to protect you from yourself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: