When both PHP and Java hosting are free? why do we find more PHP hosting sites than java hostings??
Please help me out friends to figure it out
When both PHP and Java hosting are free? why do we find more PHP hosting sites than java hostings??
Please help me out friends to figure it out
PHP Hosting is common on the net. Although Java is also powerful it is rarely used. I think so... :P
isn't Java like a run-time applet or something? like don't you have to download the code onto your computer before you can fully use it functually..
(correct me if I am wrong)
if so then PHP is understood by the browser and not the computer...in easier sense....PHP can be used alot more and easier..
plus I don't know Java
If you're talking about Java applets, the host doesn't really play much of a part in this unless they explicitly block those file types. Java applets are executed client side, therefore don't have much of an impact on the server other than file transfer and maybe some extra transmitted info.
If you're talking about Java servlets, the host plays more of a part. Most hosts may not do Java servlets because of security reasons.
The reason PHP is so popular is because it's widely supported and maintained, and mainly an interpereted language, meaning you don't have to compile it - unlike Java.
I primarily develop in Java so maybe my perspective would be helpful here. I'm assuming this thread is referring to Java servlet and JSP hosting. Applets are run by the client so the server has nothing to do with it. I would say the main reason that PHP is more popular is because it's simpler to host. Java being a compiled language does complicate things a little but typically Java applications are uploaded to a server as a single WAR file containing already multiple compiled servlets and JSPs. I don't think security is any more of a problem with Java than it is with PHP. I don't know where Java stands in popularity compared with PHP but Java is still pretty common. Java is also certainly well supported and maintained. Another problem with Java is that some changes require the server to be bounced. Most free Java hosts I've seen typically bounce the server on a daily basis for this reason.
I guess it is because java consumes more resources and it is difficult to maintain...please correct me if I am wrong...
Difficulty to maintain I'll correct you on; technically anything's difficult depending on who coded it. If you follow the usual standards I can't see Java being any more difficult to maintain by a skilled java programmer as it is to maintain PHP if you're a skilled php programmer.
Dunno about the resources part though; I've never really used Java, so I can't really say much about system resources.
TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!
php is one of the more commonely used langues and has the most functionally and scripts. also java is nice but not as easy
No, PHP is run on the server, and the output HTML is sent to the browser ;)
that's why it's so secure, because nobody can view you PHP script, all they can see if they look at the source is the HTML output, which won't tell them anything important
also if the browser had to run the script,
they would have to have the software to run the PHP ;)
Last edited by fdbessjr; 01-04-2008 at 11:30 PM.
both php and java-jsp output the same thing - html and run on the server.
java applets are client side programs also written in java - and u dont need a java server for them - this is a java applet http://sel2in.in/prjs/aplt/go my sites on x10 so no java on server (as yet)
http://sel2in.com/ Java - Mobile, Website applications PHP, My SQL, VB6 & VBA http://www.thehungersite.com