|
|
|
Ask HN: Why PHP over Java?
|
|
2 points
by manasnutcase
5214 days ago
|
|
Hi,
Why are most Webapps developed in PHP while enterprise apps use Java?
I am asking this because I want to build a team for our next web app. We were recruiting PHP guys but I realize that most PHP guys have only done work on customizing OSCommerce, Wordpress, Drupal or Joomla, etc.. no hard core programming. Java people seem to be more "hard core" programmers.
Can you tell me why I shouldnt use Java? Thanks |
|
The last hard-core (ie. expensive) Java dev we had working on one of our back-end projects turned in code that was so abstracted and made such heavy use of dependency injection, it was not only difficult to read through, but took over 30ms to respond to requests. Maintainability was a nightmare, mainly because by abstracting things so thoroughly he effectively (and inadvertently) made the platform so tightly coupled that changing low-level code became very difficult.
Our current hard-core (ie. affordable) PHP dev spent almost exactly the same number of hours re-implementing the Java system, retained the extensibility requirements, and the framework returns responses in about 1ms. We have extendable objects for everything (models, controller, extensions, etc.), but without the 5 to 10 layers of abstraction.
As an added benefit, with PHP we don't have to worry about recompiling every time a change is made (during development, at least), we aren't running any memory-hog VMs, and it's far easier to find good devs when we need them.
That said, PHP takes a lot of crap because of its low barriers to entry. It's easy to learn the basics, it's very easy to learn bad habits, and it's too easy to write insecure code. A good PHP dev knows how to write fast, secure code, but it is hard to figure out who is a "good" PHP dev and who is a "copy/paste" PHP dev.