Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Is it worth switching from PHP to JSP

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Is it worth switching from PHP to JSP

    I've been using PHP for a number of years as well as Java. One thing I like about Java is the great support for it in Netbeans and in other programs, plus I could work with only one language instead of two. Unfortunately, it doesn't seem like there's many people using the language so I'm wondering am I missing something? Also is it just like writing Java apps but sending the output to a web page? Is JSP faster than PHP or better on resources?


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Is it worth switching from PHP to JSP

    Hello there, this is pretty interesting. First I think you might want to have a look at the requirements for running JSP's compared to PHP. You will need to have a server running the JRE together with some sort of application container (Tomcat, Resin, Jetty, JBoss, etc.). If you already have all of these things then no problem.

    Second its the pros and cons of PHP vs. Java Servlets/JSP

    I'm not up to date on the performance of PHP I'm afraid but all I can say is that JSP's can and should be precompiled into byte code to run as fast as possible in the JVM, usually this is taken care of automatically for you.

    If you also like the idea of working in a great IDE like Netbeans or Eclipse and the wonders of autocomplete then I guess Java is the way to go.

    when you say there seems to be less people using JSP then PHP I think you're wrong however there are probably more hobby developers using PHP then Java because most website hosting packages come with PHP but with Java.

    Java is in my opinion a stronger language than PHP but I've not used PHP in ages now, early version 5 is what I used to play around with. I've just gone over to using Java as its what I do at work.

    My conclusion is that if you just want something thats quick out of the box and available on most in most website hosting packages, keep using PHP, however if you're keen on trying something different and probably more powerful and you're not scared of the fact you need to install more things to get it up and running, go for Java, I dont think you will regret it anyways.

    There is of course a third option and that would be to write your frontend code using PHP and talk to a Java backend using AJAX request or whatever it is you wish todo, however its not very consistent.

    For more interesting posts see java vs php - Google Search

    // Json

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Is it worth switching from PHP to JSP

    Now I'm actually trying out Ruby on Rails with RubyMine (which can inherit Netbeans shortcuts). The reason why is because when looking for hosting packages I did notice that Ruby and Python are becoming quite common now and I've heard how nice of a language Ruby is as a language, so I decided to try it out. RubyMine actually works pretty well in giving me the powerful tasks that Netbeans offers Java so for now that's where I'm looking. PHP isn't a bad language when you use an MVC like Codeigniter, however Netbeans and other IDEs become far more limited when you use an MVC framework so I can't get the best of both worlds.

Similar Threads

  1. Replies: 1
    Last Post: March 11th, 2009, 04:41 PM