It depends on what apps and where they'll be running. Java is good for multi-platform development - write once, run many. It's useless for system programming. It's useless for most scientific apps. It's useless for apps that will run on i-devices (iPhones, iPads, etc.) It's almost totally useless for communications apps. All-in-all, it's useful for FAR fewer classes of apps than it's useless for. It's basically for situations in which you can't be bothered to have a multi-platform development team. IOW, it promotes bad programming habits.
I think Java is better than PHP, because of following points: 1.Java is more of an industry standard, whereas PHP seems to be popular among hackers and hobbyists. 2.Java provides better separation of layers - key for testability. PHP has all the code embedded in the page, so you have to run it through a browser to test if database connections work (for instance). 3.Java is more scalable. 4.More for-profit organizations use it.
Guys,you just don't know JAVA and you're trying to prove that php is safe...There is no way to make php safer and better than java. As I love to say: Haters gonna hate.
Buddy just because you know a certain programming language doesn't mean that it is superior to another. Do you even know what PHP is for? Do you?To be honest, I don't know much about Java, but saying something like "PHP is the best, nothing can beat it" is just plain and outright stupid. I think I wrote it before, but PHP and JAVA have total different applications. It's like comparing a plane and a boat. This forum is written in PHP (vBulletin) Wordpress is written in PHP MediaWiki is written in PHP (Wikipedia uses it) Facebook uses PHP
for strictly web solutions is better PHP for desktop/mobile or with combination with web is JAVA better but i mean better then JAVA is python
You should learn both because both language use for different function so don't concentrate on 1 language get knowledge about both.
If you want a web application with user interface, Java suits that idea best. PHP is best for server side manipulation of data.
PHP is built specifically to serve HTML to a browser. It became popular because it worked very well, was easy to pickup, and had excellent documentation early on. It's a very "scrappy" language focused on getting things done. And I personally work on PHP.
Java and PHP don't play in the same level PHP is for web programming Java is for everything else... JSP is the Java equivalent of PHP
Java is a lot itself without any doubt..it can be use for every type of application but PHP is used for web application only..
Except client-side web development, operating system development, embedded controller development ... IOW, there are more things Java can't be used for than there are things it can be used for. It has one specific application, it's not a universal programming language.
You will find out that for 95% of Web Development it is quite irrelevant which server side language you use. The *majority* of web sites that require programming are generally just applications that validate form data and interact with a database and that is all. Sophisticated websites will most likely use a framework or helper tools that are widely available for all programming languages. Still in the end it's a web site the merely validates and creates/retrieves/updates/deletes entries in a database. Personally I would recommend PHP for most of your web programming needs. It's easy, widely supported and gets the job done usually hassle free and quickly. But someone with a Java background may feel more comfortable using Java. If you want to easily distribute scripts PHP is the right tool for the job. If you want to develop a desktop application Java is the right tool for the job. If you need a programming language that is easy to interact with a database PHP is the right tool for the job. If you want to develop for the Android mobile phone Java is the only tool for the job. If you want to use a language that was made specifically for the web PHP is the right tool for the job. If you want to develop applets that run via your web site Java obviously has to be used.....but Flash would be more supported and acceptable.
The advantage of Java is code libraries. Chances are, someone's already done whatever it is you'd like to do with Java, and some diligent searching should turn up a code library that does what you need done. True, there are repositories of PHP, but they're far less comprehensive. Also, the IDEs for Java are more sophisticated, as the language has been around longer. True, the learning curve is steeper, but if you're building a robust application, it may be that Java is the best tool for the job. Hope this helps. Jon