Which is better in this case, PHP or JSP?

Discussion in 'PHP' started by gandalf117, Nov 2, 2011.

  1. #1
    I am just hoping to find some expertise and opinions from people, who know about both PHP and JSP. I have already done research but it wasn't enough. I don't want to start a general argument as to which one is better, therefore I put some specific questions of concern here:

    1) Is using PHP or JSP more suitable for low budgets when it comes to hosting, development, maintenance? Therefore is it suitable for small low budget company websites?

    2) Which one is easier to code?

    3) Is JSP or PHP faster? In other words does the pages in JSP load faster than those in PHP in general?

    4) Which one is more formal? In other words which one is preferred for corporate and company websites and which one is used more for online stores, blogs and homemade websites?
     
    gandalf117, Nov 2, 2011 IP
  2. kurianthomasy

    kurianthomasy Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Better is relative to what you want to do with it. JSP is more structured in terms of language construct.I have done a my web site on PHP, but I've been told that JSP is better.But PHP is easy to get up to speed with in a relatively small time span. Also there are a lot of scripts already made out there.
     
    kurianthomasy, Nov 2, 2011 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Niether is better than the other. Both have pretty much the same capabilities in the big picture. PHP is far better supported, more flexible, and will be significantly cheaper to develop and maintain. You can find sites of any size and type using JSP or PHP. You'll find more back-end, and enterprises using JSP, but that doesn't make it inherently better. Speed is dependent on the hardware and platform setup, the database setup, and how well the application itself is coded, optimized, and organized. Assuming you have the same hardware and high quality coding, PHP running through APC or a compiler would probably be faster as Java tends to be much more clunky and resource intensive even though it's pre-compiled. JSP is vastly more complex to develop on than PHP which significantly increases the cost. If you're looking for mainly website coding, regardless of the size and scope of the website, PHP would be my choice hands down.
     
    jestep, Nov 2, 2011 IP
  4. gandalf117

    gandalf117 Active Member

    Messages:
    111
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    jestep, thanks for the good answer

    You kind of reinforced what I was thinking, after doing research online.

    "If you're looking for mainly website coding, regardless of the size and scope of the website, PHP would be my choice hands down."

    The website is probably not going to be very big. The traffic is hardly going to be high since most of the clients are going to be potential firms and established companies. It will still contain and deal with thousands of rows of data and a lot of information (but that's more of a concern of the database I guess). So it's not like everyone will want to visit it and use it's service.

    The budget is quite low and the website is not something that complex or huge but some still insist that JSP is the way to go. Therefore I was wondering why would they insist on JSP so much and wouldn't PHP be a better choice in this case.

    You said that PHP is far better supported. Do you mean that it's harder to find programmers for JSP than for PHP?
     
    gandalf117, Nov 2, 2011 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    There's probably 50-100 PHP programmers to every JSP programmer. The caveat with that is many php programmers, or so called php programmers, are not much more than people that have played with it enough to be able to do some developing, but not necessarily programmers by education or profession. You definitely need to make sure your PHP programmer is actually a programmer if you need more developing that customizing a pre-made app like wordpress, or magento or something similar.

    If your developer is pushing JPS, it's most likely what they are most comfortable with or what their servers support. I can't think of many reasons why a site must be in either JSP or PHP unless the server doesn't support 1, or the developer only uses 1 of the languages. As far as scaling, we have a large internal CRM that has hundreds of millions of database rows in some of the tables. It pushes over 100Gb of bandwidth per month, and a single web server with a php and an external Percona MySQL database has no problem handling it. In terms of enterprise usage this would still be considered very low usage. I would definitely find out why they must use JSP. IMO, you should do what's in your best interest and find a host to meet your needs, not the other way around.
     
    jestep, Nov 2, 2011 IP
  6. amgadhs

    amgadhs Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Cant say it better than jestep. Just one more thing, almost all budget hosting providers support PHP. So its easier to find web host for a PHP script than JSP. I only mention this because it seems like its one of your concerns.
     
    amgadhs, Nov 2, 2011 IP
  7. futureslay

    futureslay Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    2
    Trophy Points:
    0
    #7
    Very good explanations above. It's down to personal preference and what you want to achieve from it.
    I use php but suggest that you take the time to explore them both and find out wich is easier to use and allows you to achieve what you're trying to do better.
     
    futureslay, Nov 7, 2011 IP
  8. David Lemarier

    David Lemarier Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    PHP all the way !
     
    David Lemarier, Nov 8, 2011 IP