well I’m trying to understand which could be the benefits in the development a web application using java ee or using php.why a programmer should choose java ee or php? I usually develop web application in php working with some framework.what are the difference in terms not of language (that obviously are totally different) but in terms of project aspects.
Share
The two most significant distinctions are deployment models and hosting options.
Regarding deployment models, since PHP is (mostly) a language that’s interpreted at request time, the turn around during development can be quite fast — you readily make your change “in place” behind the server, and your changes are instantly available as soon as you refresh your browser. In contrast, Java can get caught in a change – deploy cycle which can take longer, and also be more invasive (the deploy could, perhaps, log out of your session as an example).
A lot of that can be mitigated with Java using different techniques, different containers, 3rd party extension (such as JRebel), but you don’t get that capability “out of the box” or from the off the shelf tutorials. I also don’t want to overplay it, the process is manageable, it’s not that awful. But it is a noted difference between the two platforms.
Hosting options come in to play since just about any random web host out there can host PHP applications at some level. PHP can be deployed as lowly CGI on over saturated super cheap hosts to larger, more complicated configurations.
Java CAN be deployed as a simple WAR to a shared host, and that works “OK”, but shared Java environments CAN be less stable as the different applications within the shared environment can unfriendly to each other and have undue impact. This is less of a concern in a PHP deployment.
Therefore, most semi-serious Java deployments instead go with a VM instance as a standalone deployment. The game there would be to contrast costs and such between the different options.
On the whole, I think that Java deployments, as a rule, are easier to manage and work with because of the packaging nature and the nice tools that Java servers come with, but that’s a matter of taste and experience. Someone with a lot of PHP hosting and deployment experience would, rightly, shrug that issue off. But out of the box, for someone coming new to it all, I think Java is much easier to work with.