Results 1 to 5 of 5

Thread: PHP or JSP

  1. #1

    PHP or JSP


    We are about to develop a web-based application that will be part of our ERP project.

    Our ERP is developed using Powerbuilder and Oracle RDBMS server.

    I downloaded the Apache 1.3 web server and the necessary PHP modules and I manage to install the web server without problems.

    I downloaded the trial edition of CodeCharge and I manage to create my first php page that queries our database without writing any php code.

    All this took me about half day!!!

    I have some experience in Java (I developed applications before 3 years using JDK 1.1) and I was wondering if developing with JSP is “quicker” than PHP.

    So I tried to “use” my past experience and use this tool with JSP. I downloaded the latest tomcat server and then I tried to create the same application I did with php.

    It took me about 1 and a half day to learn how configure the tomcat server, download all the extra required libraries and make that application to work.

    I discovered that JSP and Servlets are very extensible, providing a well designed model in order to solve our problems easyer…

    However... Now I feel... too much about nothing!(at least for then things I want to create...)

    I liked Java. I feel that, somehow, I will have more power with it but… now I am afraid of it!

    What I would like from you is to share with me, any experiences like this and give me your advice...

  2. #2
    Join Date
    Jan 2002
    PHP development is faster if you know the language. If you know Java well, I bet that you can learn PHP in less than a week, just by reading the online manual (I did that and learned PHP in an afternoon).

    Once you learn the (simple) PHP syntax, it's a matter of using the right functions to implement virtually any web application you can think of.

    Off course, your SQL server will handle the hard work of efficiently maintaining your raw data. So you don't need any advanced language to query the SQL server, format the results in HTML and print them. That is what PHP applications typically do.

    Java will slow you down with its complexity. Even if you know the langauge, you still have to write a lot of code to achieve only a little.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  3. #3
    Join Date
    Aug 2002
    Long Island
    I agree. If you know C++ and OOP you will master PHP. I have been a C programmer for 15 years. I love C++ and how it works, PHP is more flexible than C as in you don't have to declare variables and so on.

    PHP is great! I had one bug with it but I updated to a newer version and it was fixed.

  4. #4
    Join Date
    Aug 2002
    Denver, CO, USA
    One thing to keep in mind is that PHP excels at several things. Among these are: 1) string handling; 2) array handling; 3) regular expressions. PHP gives you an incredibly rich feature set of functions and capabilities without having the need to enlist a particular package, module, or custom tag. Array handling is a thing of beauty - in Java you will write much more code to manipulate arrays. Regular expressions - for searching, replacing, and parsing strings - are very strong in PHP and weak in Java.

    In harvesting dynamic information from the web, often times we spend a lot of time gathering form variables, parsing them, and validating them. A lot of what we do is routine. If you are doing a lot of that, PHP has a lot of what you need and you may not need the elephant gun power of Java.

    Java's object-oriented capabilities far outdistance PHP. Which is not to say you can't do a few cool OOP things with PHP, however. But if you need more scalability, and you will be working a lot with distributed objects (CORBA etc.) or similar architectures, Java may be the right choice.

    PHP, unlike Java, does not straightjacket you into the OOP paradigm. With PHP you have a choice. Sometimes the good-old procedural-passing-data-into-and-out-of functions approach is the fastest and most efficient way to build an application. If you're scaling for a lot of future expansion and are modeling a lot of objects, then Java might be a better choice.

    PHP, unlike Java, is weakly typed. I've found this to be more of a blessing than a curse. That's because the PHP/Zend engine is so great at catching most of your errors anyway. I'm sure many would disagree, and prefer the strongly typed capabilities of Java.

    Whatever you choose, good luck and I wish you success in your development outcomes!

  5. #5
    Join Date
    Aug 2002
    New Zealand
    another thing to think about is how many servers offer JSP compatability?..not many, a lot more offer PHP also i think PHP is a lot more straight forward than JSP.

Posting Permissions

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