Results 1 to 15 of 15

Thread: php or jsp

  1. #1

    php or jsp

    any one can help me decide what better?
    I'm sure that many had answered this question before...

  2. #2
    Join Date
    Jul 2002
    Location
    Victoria, Australia
    Posts
    36,941
    Moved to Programming Discussion.

  3. #3
    Join Date
    Jun 2003
    Location
    Janesville, Wi
    Posts
    1,520
    I prefer PHP over JSP for many reasons:

    JSP has always been a pain to install. You either need to get a new web server like Apache Jakarta or Resin. Both are annoying to install. Also, mod_jk is just as annoying to install. So much so that I've decided it is no longer worth my time.

    PHP is extremely easy to install. You just add in the --with-apxs flag to the configuration, and you have yourself a working PHP module in Apache.

    The languages are also very different. PHP is a server-side processing tool that processes and manipulates the supplied data. At the same time, JSP is typically used to launch Java applications on the server-side instead of having the client download a Java applet or the likes. The language itself simply annoys me.

    Have a good day.
    Jakiao

  4. #4
    never been fond of jsp

    Not only a pain to install, but has been the most problomatic system as well
    that i have experienced over that past many years..

    Seems that most of those scripts are put pretty extensive loads on server as well, which leaves you with those cheap providers turning your site off.

  5. #5
    Join Date
    Apr 2002
    Location
    Denver, Colorado
    Posts
    272
    JSP is very powerful, however definitely not for a noob. I'd say PHP is a good starting point, but be sure to expand your horizons in the future.

  6. #6
    Join Date
    Nov 2005
    Location
    Maryland
    Posts
    562
    I have always used PHP over JSP. It is so easy to use, and it is very powerful!
    Need C Class Diversity For Your SEO Campaigns?

    Get SEO Hosting From Arctic Hosting

  7. #7
    Join Date
    Apr 2002
    Location
    Denver, Colorado
    Posts
    272
    oh, not to start a Jihad or anything...but you should start to learn perl over any of said languages :-)

  8. #8
    Join Date
    Aug 2005
    Posts
    438
    Both are annoying to install.
    If you find unpacking a tar file "annoying" then yes resin and tomcat are annoying to install otherwise...well installing them is just unpacking a tar file (on windows its absolutely trivial), MUST less effort than installing Apache. Of course you have to have Java on the server too...but that is easy to install as well. Furthermore installing mod_jk is easy..but you can just use mod_proxy instead which is trivial to use.

    The languages are also very different
    Well JSP isn't a language...but the way JSP is used is pretty much the same as the way people use PHP - that is to embedded code into html to make front end scripts. Furthermore..at least php5 is fairly similar to java. Also server side java is in no sense a replacement for Applets... and JSP is no more used to "lauch java applications" than PHP is used to "launch php applications".


    Anyhow to the poster, if all you are going to do is right some front end scripts than there is little point in using JSP as its more complicated. Also hosting for PHP is much easier to find (and is generally cheaper). But if you have an interest in writing something that does something more robost...than looking into JSP/servlets may be worth it as there is a lot you can do with it that can't easily (or freely) be done in php..and some things that can't really be done at all. If you are just starting out PHP may be the best thing though regardless of your intended use.

    Lastly, This form is very php biased....try asking the same question on a java forum if you want to hear want the other side says (and like usual the truth is going to be somewhere in the middle)

    but you should start to learn perl over any of said languages
    or maybe fortran?

  9. #9
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,104
    Actually, the truth is that they are both for very different purposes. You will see that mostly, JSP is used in large corporate setups where really the strengths of Java can be fully exploited.

    Really can't compare PHP to JSP since JSP isn't a "language" per-se.

    Anyway, seems this topic comes up every month. Just search the forum

  10. #10
    Join Date
    Aug 2005
    Posts
    438
    Actually, the truth is that they are both for very different purposes
    I don't know why you say this, they are often used for the same purpose, that is to embedded code into html. Although in the case of JSP you are usually accessing some bean (or EJB), but I don't think this makes them much different. The code in the JSP should really be trivial, people that pack a lot of code into JSP are really miss using the the technology.

  11. #11
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,104
    That was my point, most people use JSP as the core logic component in their apps, ant not just handlers to beans.

  12. #12
    Join Date
    Aug 2004
    Location
    El Salvador
    Posts
    72
    I've been around 4 years working and developing for the web.

    I've tried many technologies combinations, and i've found LAMP (Linux, Apache, MySQL, PHP/Perl) the most reliable, affordable and scalable.

    PHP is just good enough for most web jobs. And you can add the excellent web documentation... http://www.php.net

    I really admire and respect some friends of mine that have developed excellents web applications over JSP. But i just feel it so complicated even if you just need to change a little algorithm.

    I think it is a flavors's issue.

    PHP is just my way.
    ...

  13. #13
    Join Date
    Aug 2005
    Posts
    438
    and i've found LAMP (Linux, Apache, MySQL, PHP/Perl) the most reliable, affordable and scalable
    JSP is free to run...in fact you get more for free with it, to get similar features with PHP you have to pay for the Zend platform.
    Additionally clearly java is more scalable than apache + php (you can scale apache + php, but its not as easy..)

    But i just feel it so complicated even if you just need to change a little algorithm.
    The complication is in learning the technology not making changes, in fact due to the fact that java is heavily OO changes are generally much easier to make if you've designed your application correctly.


    Anyhow your reasons really reduce to "I like php better", which is fine.

  14. #14
    It's like Delphi or VC++, Delphi or VB. Java is a whole programming platform. That is you can program application of any kind using Java language and Java standards. PHP's sole purpose was to provide web-designers with an easy yet powerful tool to create dynamic content. And PHP is very strong at this point. It is used by numerous sites, by thousands of developers worldwide. And every hosting company gives you PHP for free. If you intend to become a web-designer/web-developer then PHP is the way to go.

    And as I have already mentioned Java is a platform, it is much bigger than PHP and it intersects with PHP only in a very small area. There is no question for many large projects what technology to use - PHP or Java. Of course, Java. And if Java is used than the only way to go is to use Java web technologies - JSP/JSF/Servlets/whatever gets promoted tomorrow. As a Java developer I find JSP and Servlets a rather interesting, useful and robust technology. Want server-generated images? 5 lines of code to get an antialiased picture. Want nice pie and bar charts and reports? Grab a free library and generate them within seconds. 3D worlds on the server-side? No problem! Want to create an application that will work in web-browsers, cell phones, desktops? Java is the way to go. Love AJAX? Check out Echo Platform
    Also the transition between online and offline becomes transparent. Java programs with a "proper amount of force" can be ported to online and vice-verca. Not PHP.

    I personally would stick to Java. The technology developed and supported by both evil corps like Sun, IBM, BEA etc and a large open-source community has a real potential.

  15. #15
    Join Date
    Nov 2000
    Posts
    3,046
    Bottom line: define your target market and you have the language you will be programming in. If you are looking at the enterprise market, JSP is easily the most popular and likely the most functional. If you are looking to target the biggest available market, go with PHP, it's installed on nearly every webserver you can think of. If you are specifically looking at the Windows server enviornment, look at the .NET platform. If you are an OOP nut, try Ruby on for size. Want to code faster than a rabbit in heat, Python is the way to go.

    No language is better than the other, each has its strengths and weaknesses. Until you define WHAT you want your program to do for you and for your clients, they are all on equal footing. Every programmer has their favorite language (PHP5 has quickly become one of my dear friends), but the difference between a programmer and a GOOD programmer is what I outlined above.

    Ignore the hype about ease of install or ease of programming. If either of those were particularly good reasons to choose a language, everyone would be using PHP or Python. But guess what? They don't.
    A well-reasoned assumption is very close to fact.
    - Adorno

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •