Originally posted by yousaf931
Php and mysql are faster as well.
Jsp is much slower than php.
And with jsp mysql dint try nor heard anyone to use this combination.
You haven't ported any PHP apps to JSP I take it...
Here's the setup:
P3 750Mhz box with 256mb RAM
W2k Pro
Apache v2 & Tomcat with JConnector so they play nicely together
PHP
Latest Java SDK
MySQL v3.23.x
At the shop I'm in, PHP is not a "supported" language. But Java/JSP is. I completed several PHP apps with a week of development time for each (web log tool, time entry app, and a marketing promo app).
The apps worked and did their job. The concepts worked. But a W2k Pro desktop box doesn't make for a good intranet web server. So I had to port the PHP code to Java so they could later be tossed on a dedicated intranet web server. The PHP and Java apps follow similar (if not almost the same) models for handling templates, forms, queries, etc. The difference between them was Java objects were used (very little JSP - JSP would just kick various Java objects).
I had added timers to PHP and Java because I was very interested in performance. Same database - even the same exact data and queries. Similar code routines used.
Java usually was displaying pages with the same speed as PHP or beating PHP by a 10th of a second or two. Its not enough for an end user to notice, but technically speaking, Java was just a little quicker then PHP. Sure, the first time you run the web app, there's a hefty delay (due to JIT or just-in-time compiling), but after that its quick.
To make things a little more interesting, I'm pretty sure my Java code is not all that great due to my lack of actually coding in it. But based on that fact, it still did as well as PHP. Could it be optimized? Probably.
Now in terms of actually writing code and getting an app done, PHP makes it a lot easier which means less time spent on the overall project. The Java versions took about 2-3 times as long as the PHP versions - once I figured out what I was doing with Java. You're mileage may vary.
The one interesting thing about Java is it FORCES you to think in terms of objects (JSP not so much if thats all your doing). For a small scale website, I think it can be a bit overkill. But for the larger sites that have multiple developers working on the code, having objects can be pretty valuable (usually self documenting, plug-n-play/reuseable, forces thinking about design and implementation).
I still prefer PHP over Java. But that's my opinion. Its easier to work with and gets the job done for the sites I use it with.
For this web portal you're working on, its a tough call. Either language will do just fine. Question might be how many will be coding for it and what is the web server already outfitted with?