

Ask HN: PHP or JSP ? - vikas0380

Which Should I Learn?
I am from java background.
======
mindcrime
I think the answer to this involves a big dose of "it depends", but I'd lean
towards jsp. The Java ecosystem is just so mature and so comprehensive, and -
for all the warts of certain elements of the Java stack (JSF, anybody) - JSP's
are actually pretty cool.

Java is especially good for apps that have lots of intgration "touch points"
were you need to tie in with external, 3rd party apps. Java makes it pretty
easy to use REST, SOAP based WebServices, RPCs of different flavors (RMI,
etc), asynchronous messaging using JMS, or pretty much any other integration
technology you need. If you will be building larger systems that need to be
built in more of a "small pieces, loosely joined" style, a JVM based stack
will serve you well.

And if you need to do "Big Data" stuff, already being in Java will make it
straightforward to use, say, Hadoop. If you want to use Machine Learning, you
have the convenience of Mahout, Weka, etc. Want to join the Semantic Web? You
have Apache Jena. Need to do Natural Language Processing? OpenNLP is there.
Want to add search to your app? Apache Lucene / Solr are your friends.

Now, to be fair, _most_ well known platforms have plenty of libraries
available. Java isn't unique in that regard. But I think it is somewhat unique
in just how comprehensive and mature the overall ecosystem is.

------
agibsonccc
Not to be irrelevant to the question, but something to consider. Why not just
go with java as a rest API and use a frontend framework? JSP with taglibs and
all that aren't as heavily used now a days.

Keep in mind, this is coming from someone who has done JSP and spring (still
use spring) for years.

Especially in light of some of the newer JVM frameworks, you'd benefit from
being framework agnostic on the front end but take advantage of your java
experience otherwise.

------
KajMagnus
Does it have to be PHP or JSP? What about Java and Play Framework instead of
JSP? [http://www.playframework.com/](http://www.playframework.com/) — I like
it a lot

~~~
vikas0380
Play Framework sounds good

------
shire
I recommend you go with PHP, it's really easy to use and get started with. You
can make some pretty amazing applications rapidly and deployment is a joy with
PHP. The job market for PHP and Java is the same as a far as demand but Java
pays much more.

~~~
vikas0380
Java pays much more means? can you please elaborate

~~~
shire
Well Java is one of those languages that a lot of people don't like working
with because of it's verbosity and is overkill for a lot of simple
applications. People to tend to favor Python for simple things. Java is best
suited for Banks and high-level web applications for big corporations which is
why Java developers make more than 100k at least.

------
debacle
There are very few technologies that are as bad as working with JSP, even
considering your Java experience.

Have you considered other options that run on top of Java?

------
talles
Since you are from a Java background maybe you should stay with it.

Explaining why your options are just PHP or JSP might help.

~~~
vikas0380
cheap php servers and java knowledge, can u tell me the other options?

~~~
workhere-io
Python would be another option, and many cheap hosts out there support it
(HostGator and WebFaction, e.g.).

------
jhowell
What are you trying to build? If it's enterprisey I'd go with JSP and take a
look at Spring MVC.

------
firefoxd
if you know java you should continue with JSP then

