Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlets vs php

 
Paramita Ray
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!!
I am new to programming and trying to build a system that takes constant user input that quite frequently require validation.Front-end is being built using AJAX and back-end database is MYSQL.Its a single tier client-server architechture.I am wondering what to use for the system to interact with the database...PHP or JSP-Servlets? I've 6 months of familiarity with JSP-Servlets-Struts and 1 month and a half with PHP.At the moment, I find myself equally comfortable in both. Also, how good is it an idea to put HTML in PHP files especially for input that requires validation?
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Servlet , JSP requires application framework and application server in place to run the codes. PHP does not require the application server. You can attach the PHP plugin to the webserver with the minimal efforts. Lot of web-sites in the real world are using PHP and there is no complaints.

Both the techologies are alomost free. So depending on the application needs you have to select the technology. As for my knowledges Servlet/JSP technology will not help you in client side scripting and validations. PHP also will not do anything on the client side, But generate HTML codes for client side easisily.

Also there are lot of ready made applications are available on web in PHP. These applications are custimizable.

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Narendra Dhande:
Servlet , JSP requires application framework and application server in place to run the codes.


Not true.
There is no requirement to use a framework with Servlets/JSP.
In some cases, a framework will save you a lot of time and energy by allowing you to leverage the work of others.

There are frameworks available for both PHP and Server Side Java.
They seem to have caught on more in the Java world.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic