Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choice of languages

Status
Not open for further replies.

oaklandar

Technical User
Feb 12, 2004
246
US

I want to create alot of dynamic database driven web sites and would like some arguments to prove PHP is better than JSP? I assume both are free and heard Java is the best way to go but would like to hear what PHP has to offer.
 
It might not be !.
JSP compiles down into bytecode so is kind of compiled, but then again same with php and the zend encoder.
I would suggest some proptypes and see how you go
 
Thanks,

I see so many more JSP jobs available compared to PHP jobs so I assumed JSP was better. Is PHP an object oriented language like JSP??
 
Java, C and PHP look the same in syntax. They have some small differences, but I think you will learn how to port your applications fairly easy.

one example:
In PHP, you do not define a variable-type for string, etc.
You simply do:
$string = "blah";

then it figures out that this is a string.

anyways, I've programmed some in Java ( some in ASP, VB, C, etc. and I must say that I think PHP is quite easy to program in, and also there is a lot of documentation on codes. php.net itself is SUPERB, if you know what you are looking for. You also have google, which is always a nice friend.

When I try to find something about MS Access, google finds squat. I only seem to find stupid forums where I have to pay $$$ to see the supposedly answer.

I think this went a bit offtopic, but:
There are some limits to PHP VS JSP.
You need to refresh the page each time you want the content to change

that is actually all I can think of "on the go".
I think that it's much more code to perform simple tasks in JSP than in PHP. Also the client must have JSP supported SW to run the JSP pages. There is no such limit on PHP, as all is serverside.

JSP might be better for realtime gaming, security, etc. But I think that PHP is better for CMS, forums, web-log, etc etc.

Olav Alexander Mjelde
Admin & Webmaster
 
jsp is server side, you write pages with embedded java (a bit like asp and vbscript). The server parses the pages into java and compiles it.
You'll see a lot of java jobs for a number of reasons:
Companies like it and invest in platforms like websphere or the opensource jboss product
and
it was the language for a few years.
I'm not a great java fan but it does have its place.
Essentialy the jsp/asp/php model is the same browser->webserver
 
>>the client needs to download java runtime?

nope, all server side languages send back plain old HTML to the browser...

Known is handfull, Unknown is worldfull
 
My 2 cents on this:

Of course in this forum you'll get opinions biased towards PHP, since this is a PHP forum.

My background is totally different. I use Tek-Tips for quite a short period and have joined here now with this reply to the PHP forum, because I began using a CMS system, which is called Mambo (see which is a free open source CMS system like there are many. I've decided for Mambo by making comparisons of CMS systems with And although I didn't narrow the search by choosing PHP I soon came down to 4 CMS systems, which were all based on PHP, not JSP/Java. Amongthem of course mambo, for which I know an expert, Typo3, ezPublish and Tiki Wiki.

So that is definately a plus for PHP if its mostly CMS you need to do. On the other side Java is still one of the best languages for OOP programming, which makes very much of the OOP theory practically available. With Apache/Tomcat/Struts and some add ons you have a very good, stable and structured framework for web applications in general. With NetBeans or Forte/Sun One you have a very sophisticated IDE for Java development of both Desktop and Web Applications or even Mobile Phone/Handheld/PDA Applications. So Java is still the way to go if you want to follow these directions,
but Java is very resource hungry and therefore may be more expensive to host compared to a PHP based web application. PHP didn't start as an OOP language but has gone that direction with it's success.

Finally, I'd suggest PHP for CMS even with a need of a strong, stable Database Background. Via AdoDb you are able to access other databases besides MySQL. Java is good for platform independency, not just concerning Windows and/or Unix servers, but also those Mobile mini computers, and if you plan something like a Webservice.

Bye, Olaf.
 
Bottom line: Java sucks bigtime. PHP sucks in many ways but is sucks way less than Java and JSP.

I am adept at both and I only write Java and JSP when someone is paying hellabucks because it sucks so much and takes 3 times as long to write and debug the same functionality.

Please let the flaming begin.
 
DaButcher
I think your thinking of Java applets which do need the java virtual machine (jvm)
 
ingresman: yeah true..
I thought of making WYSIWYG java editor, as it might be easier to ftp, etc. via it. but I think I'll just use htmlarea and modify it :p

Olav Alexander Mjelde
Admin & Webmaster
 
Hey, don't forget Coldfusion...It's really quite amazing. It simply makes sense to use. Help / documentation is available in great quality and quantity. been using it for years.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top