This week we are giving away 4 copies of the book "'Professional PHP4 Web Development Solutions" The good part, the Author, Bryan Waters will be on-line to answer your questions! Thanks to the good people at [http://www.wrox.com]Wrox[/url] for the books.
PHP and JSP are not entirely differently, but they exist for a different purpose. JSP is the presentation layer (to the user) of a javaservlet. A JSP page is usually created from a servlet or returns information to a servlet for processing. JSP pages do not do any 'processing' work. PHP has no formal separation of the presentation layer from processing. A PHP page can (and does) the processing, logic, etc. needed. In other ways PHP and JSP are the same. The semantics of both are close to C. They are both able to be run on any platform that supports its runtime environment (jre, php.exe). There are tons of arguments which is better to use, faster, etc. which I will not go into because I do not code enough in java. I have used PHP much more and it is very easy to learn with no training (just need internet access).
Stephen Clark
Greenhorn
Joined: Jan 07, 2003
Posts: 1
posted
0
I agree with Aaron, PHP is very easy to learn, and very fun to use. If you have at least basic understanding of programming, you will pick up PHP. PHP, mySQL, and Apache are a common trio being used together and all available online for free. Gettig mySQL and Apache up and runing can be a little tricky at first, but you can quickly start writing PHP code to run on your Apache server.
Vikrama Sanjeeva
Ranch Hand
Joined: Sep 02, 2001
Posts: 756
posted
0
Hi,
Originally posted by aaron ho: A PHP page can (and does) the processing, logic, etc. needed.
Can i use PHP on presentation layer?
They are both able to be run on any platform that supports its runtime environment (jre, php.exe).
As far as JSP is concern i agress it can run on any platform, but how PHP?.Dose it uses Java?. However its a good featurs that it is easy to learn and get hands on practice. Bye, Viki.
Can i use PHP on presentation layer? ******************************** Yes, you must use it. PHP does not formally enforce the Model-View-Controller concept the way Java does. In Java, JSP=presentation, servlet=control; in PHP the php script is the presentation and control. As far as JSP is concern i agress it can run on any platform, but how PHP?.Dose it uses Java?. ********************************** PHP can run on any platform where the php processor can be loaded. Currently both major webservers (apache & IIS) both support it. A whole slew of other webservers also support, but I have no experience with them.
Vikrama Sanjeeva
Ranch Hand
Joined: Sep 02, 2001
Posts: 756
posted
0
Hi,
Originally posted by aaron ho: Can i use PHP on presentation layer? ******************************** Yes, you must use it. PHP does not formally enforce the Model-View-Controller concept the way Java does. In Java, JSP=presentation, servlet=control; in PHP the php script is the presentation and control.
U mean in PHP Domain Layer and Presentation Layer cannot be de-coupled?.If so then does it is the good feature of PHP?. Bye, Viki.
aaron ho
Greenhorn
Joined: Jan 07, 2003
Posts: 7
posted
0
U mean in PHP Domain Layer and Presentation Layer cannot be de-coupled?.If so then does it is the good feature of PHP?. ******************************** There is no formal separation. Just as you can use a servlet for the presentation layer in java, PHP scripts are used for both presentation and logic. It is up to the programmer to 'de-couple' the layers.
Vikrama Sanjeeva
Ranch Hand
Joined: Sep 02, 2001
Posts: 756
posted
0
Hi,
Originally posted by aaron ho: There is no formal separation. Just as you can use a servlet for the presentation layer in java, PHP scripts are used for both presentation and logic. It is up to the programmer to 'de-couple' the layers.
Ok! I got it now.Thanks for explaining. Bye, Viki.
Originally posted by Leslie Chaim: How about PHP vs Perl
I believe, compared to the powerful text processing and other scripting (e.g. apxs) , php is more appropriate on the web applications. Could someone throw more light on this part? thanks and regards Ravee.
aaron ho
Greenhorn
Joined: Jan 07, 2003
Posts: 7
posted
0
I believe, compared to the powerful text processing and other scripting (e.g. apxs) , php is more appropriate on the web applications. ****************************************** Yes, php is made for web apps. There is also a movement toward true O-O language with the release of php version 5. Also there is a vb like extension called GTK. Basically the founders take what they like from other languages and implement them. Here is a good 'info' link: http://zend.com/zend/aboutphp.php aaron
shalini sharma
Greenhorn
Joined: Nov 21, 2002
Posts: 26
posted
0
The difference between JSP and PHP is I think is that JSP is Java Server Page Technology and PHP is an open source web scripting Language.Both of them allow scripting code in regular webpage to generate dynamic content. Previously PHP pages were interpreted by server when it's requested but from PHP 4 pages are compiled to improve the performance. Please correct me if am wrong
Originally posted by Jyothi kidambhi: The difference between JSP and PHP is I think is that JSP is Java Server Page Technology and PHP is an open source web scripting Language.Both of them allow scripting code in regular webpage to generate dynamic content. Previously PHP pages were interpreted by server when it's requested but from PHP 4 pages are compiled to improve the performance.
Remember there is a difference n/w three terms, Interpreted,Compiled and Parsed. I think scripts are parsed reather than interpreted. Bye, Viki.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.