views:

424

answers:

3

I want to develop a website web chat application like yahoo. Only difference is that I want to make it web based not desktop. I will be implementing it in jsp/php with ajax. I want to know whether jsp or php will be better for this. What will be advantages or disadvantages of both. Which one of the two would you prefer and why?

Will jsp applicatioon will be slower then php? I am thinking of using using struts with jsp and ajax . Will using of struts decrease speed? I know jsp, java and struts but not php. Is php more difficult then jsp?

+17  A: 

Use whichever one that you're a better programmer in.

The task can be accomplished in either language just the same. You can argue endlessly about language features, the bottom line will be whatever works best for you.

zombat
+11  A: 

JSP based web applications are a bit more harder to deploy than PHP based web applications, but you gain the ability of creating Servlets.

PHP requires less server administration skills to setup properly and get running, is fast to learn, and allows fast creation of simple applications.

None is better than the other, they are different in nature. Check your requirements, and take a decision based on that. If your requirements doesn't favor one over the other, choose whichever your team is more comfortable with.

Andrew Moore
+1 for basing your decision on *your requirements*.
zombat
Exactly! Great answer. Just because you can program easier in PHP doesn't mean it will always be the best choice. The requirements should be used to point you in the right direction.
Doomspork
I've worked with both JSP and PHP. Even if I prefer PHP, I still work with JSP from time to time depending on my requirements. There is not really a better choice. It always, **always** depends on your requirements.
Andrew Moore
A: 

JSP isn't a language - it's just a view/presentation technology - so it's only to build a web Frontend - while the main programming happens somewhere else - in the Java Language, as a so-called Java Servlet.

I personally like Java more, but PHP is okay, and if you only know PHP (which I must assume from the questions :) ) you're better off doing it in PHP now - you can learn Java later...

Apart from that, the others asking for more background info are right - you need to see what technology meets your requirements best...

Henning
People refer to JSP the same way as ASP.NET is referred to. It is a framework.
Andrew Moore
Which is incorrect, and therefore I point out how it really is :)No, really, maybe people not doing Java development themselves do that. Java folks neither say they build something in JSP instead of PHP, because JSP isn't a language, nor do they refer to JSP as a framework (because it does not deliver a complete stack of functionalities) - frameworks are things like struts, gwt, webwork, sitemesh - and even those only deliver the view part - a full stack web framework helps you with a lot more things than just the view.
Henning