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
I am both a PHP and Java dev, and have found that PHP is far faster, leaner and more maintainable for websites than Java is.<p>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.<p>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.<p>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.<p>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.
That is the thing, PHP has a whole lot more projects that require a small amount of tweaking and customizing to get a small business up and running. Where Java has far more middleware and integration libraries for developers that are building custom systems. We do both at our company and I would say this, if you are doing something custom you will be much happier with Java, it will take longer to get to market but that is where Java shines, in custom business apps. If you are just doing a ecommerce site or a simple website then get Magento or Wordpress and use PHP, What we tend to do for small clients that we think will become big clients is that we back their front end technology like Wordpress with and ESB like Mule and do any custom logic in Java behind mule. This way the get the benefits of both.
I'm not sure I would describe <i>either</i> PHP or Java as for "hard core" programmers.<p>As far as I am concerned PHP is used by self-taught teenagers in the early 00's, while Java is as you mention popular in "enterprise".<p>"Enterprise" you should probably be aware is generally not considered to be praise.