Which serverside-language is better PHP or JSP?

I am currently at the moment wondering which language I am to spend my time on trying to learn…

I like very much what I have seen so far of PHP, but then again is not JSP just as powerful as PHP?

Yes and no.

Languages are languages. If you learn one, you end up

  1. Getting better at programming in general
  2. Getting good at solving problems in said language

Most of the time your choice of language won’t make a difference. Pick whichever language is easier to develop with/find support for.

Remember that for most purposes, your choice of language doesn’t matter. The programming language may dictate the way you solve a problem, but it rarely dictates whether a problem is solvable or not.

They both have their advantages and disadvantages. It really depends on what you want to do with said language. PHP has an easier learning curve, it has a larger community-base for support and it’s cheaper to get hosting. However it is not considered by many as being of “enterprise quality”. JSP is harder to learn, smaller community-base for support and hosting is generally not cheap. However it will probably get you a job (not freelancing work) better than PHP will.

Do a seach, there are so many of these kind of threads around it’s not funny, they’ll give you a good perspective to base your decision from :slight_smile:

Bah! Let’s cut to the chase… PHP is better :wink:


JSP isn’t a language.


Php is free, widely used and supported, and more often than not, powerful enough for you…

Moving to general development issues.

JSP is not technically a language. It’s a way to code web sites with Java. Java, in turn, is a lot more powerful and advanced than PHP. It’s only natural, since Java has been in development for much longer than PHP has.

However, it’s not possible to say that one is “better”. It basically depends a lot on the size and complexity of your application.

JSP and Java are meant for larger applications. While Java is an agile language, it’s not as agile as PHP for small applications. With PHP, wou can code small things very fast without an IDE (Integrated Develpment Environment - a software used to develop software). Coding Java without an IDE is, in comparison, a pain.

PHP is unbeatable for small scale applications, because it’s so incredibly cheap, in both time and money, to get started with. Add to that that the learning curve is very small, and you instantly have the #1 language for one-man websites.

However, once you start going more advanced and bigger, PHPs agility instead becomes it’s own worst enemy, and you have to do a lot of extra coding to get the infrastructure needed that JSP and .NET already has in place from the beginning. PHP is also very problematic in the sense that it completely lacks a standard approach to development, which causes loss of time when you are dealing with many developers.

That said, PHP can still be useful for large-scale applications - it’s just that the choice isn’t as clear-cut anymore. Generally, Java or .NET is much better suited.

Mattias and DJ P@ckman covered it already. Basically, if you’re building smaller sites PHP is perhaps the best way to go. However, if you’re working for a company and they want some complex web apps with lots of backend connections and you’re working in a semi-large team, you’ll probably end up using JSP or .NET on said site.

Yes small one man sites like Yahoo , Deutsche Bank , AMD etc do use PHP , when they grow up they will get an IDE for Xmas … absolute FUD as ususal

JSP (as part of J2EE) like .NET is a framework and can not be compared apples for apples with PHP , anyone who argues such is standing on shaky ground.
With PHP you have to consider other applications as part of your framework (apache/*SQL/hard|software load balancing/clustering etc)

lack of a ‘a standard approach to development’ is a valid argument from some standpoints, of course it is also argued that the standardisation enforced by some methodolgies inherently introduce inflexibility.

I was speaking more towards the low cost barriers to entry when developing in PHP vs. JSP or .NET. I don’t care about its “enterprise-readiness” or whatever; I use PHP, JSP, and ASP all the time and they’re all fine with me. However, it’s more likely that somebody would start their Web coding career in a language like PHP because it’s so much cheaper to get started with a real site than with .NET or JSP. Note: I am talking about things like shared site hosting where PHP can be had for dirt cheap, as opposed to .NET or JSP hosting which is typically run in-house by a dedicated IT staff, or has more expensive shared hosting than a PHP/Perl-only server.

You can start developing .NET for free and hosting is cheap

Development: Yes I know it’s practically free*, which is why I kept it out of my argument.

Hosting: Pound for pound I’ve gotten more with my money going with Linux hosting over Windows hosting. If you can show me a hosting site that offers the same plan (space, bandwidth, etc.) at the same price for both Windows and Linux (and not expensive a la Gearhost) it would be a first for me.

*free with the cost of Windows, which for most people isn’t an issue anyway.

I pay £50 a month for .NET hosting, and I host 6 sites, with a monthly bandwidth figure of about 60gig and a ton of emails.

But this is totally offtopic, I’ll butt out now. :slight_smile:

I appreciate that , and that fact alone often makes people forget/ignore that PHP runs very well at the other end of the scale as well , in theory and in practice, I am simply doing some underlining :smiley:

If you’re building the next Amazon, learn Java/JSP. If you’re building a small to medium company or content site, go with PHP.

I suspect that if you’re building the next Amazon, though, the language is the least of your concerns.

As has been said, PHP will get you plenty of freelance work, Java or .Net will get you a corporate job. One language is not necessarily better than another. They’re just suited for different applications.

If you’re building the next Amazon, learn Java/JSP. If you’re building a small to medium company or content site, go with PHP.

…more samples of off the cuff , parrotted & baseless comments that obfuscate and consfuse , :wink: never mind.

There is as much point to this conversation as there is to the question “whats better to walk on, grass or the path”.

Have a crack at them both, thats what I did, and whatever you feel comfortable with, stick with it. The first language I started working with was PHP, but I didn’t enjoy it. So I tried something else. I tried Jave (J2ME) really, and I didn’t like that much either (well, I didn’t like the free IDE from Sun) for a dropped it too.


Yeah, these arguments tend to get circular and repetitive. I’m butting out too ;).

What statement are you directing this comment towards? Nobody said that PHP couldn’t be used for large scale applications.

Mattias doesn’t seem to be able to take your lead… :wink: