Skip to Main Content
1 Million Project for 50k
How to get software projects done at a fraction of the cost.
  • RSS feeds
Home :: java php technologies Web Technologies Explained

Topics

  • 1M Project for 50K
  • Web Technologies Explained
  • Working with Web Developers

Site Links

  • About Magic Web Solutions (UK)
  • About this blog

Java versus PHP

Posted October 3rd, 2007 by Vladimir
in
  • java
  • php
  • technologies
  • Web Technologies Explained

Let’s cut to the chase: these are the reasons we moved away from PHP and focused on Java, as we developed more complex applications:

1.PHP is an interpreted language (the same is true of Python and Ruby, incidentally), Java is a compiled one. The nature of Java allows us to find many of the errors at an early stage, which makes an application more stable. Some simple errors in PHP code can be found only during application testing or even after release.

2. The PHP language specification is not very solid and it is possible to implement the same things in many (developer-specific) ways. It makes it difficult to support other developers’ code. Java language is much more standardised. The specifications are publicly available from various sources. There are many books, online resources and tutorials on how to develop on it.

3. The Java platform is enterprise-oriented, whereas PHP (short for 'Personal Home Page') was originally conceived otherwise, although it has evolved to a point where it can now be used to build enterprise applications. Java contains many modules, which are essential for business applications - features such as security control and multi-threading.

4. It is not as mature as the Java platform. It is mature, both in terms of
implementation, as well as APIs. There is less risk of some bug in the platform that poses security risks or has some intrinsic flaw in its architecture.

5. PHP started life as a procedure based programming language, while Java is purely object-oriented. OOP has been a feature of PHP for the past three years, so it does not have the stability of Java's OOP and the focus has been on addressing bugs.. OOP is a concept and it is risky to use a concept realisation in business-crtical software development. There is a high probability that different version of the realisation in this case would be incompatible. The Java programming language is a real programming language complete with well-defined syntax and grammar. Developers can actually write complex logic in it as expected from any programming language. They aren't just limited to working with a canned set of widgets that you provided script wrappers for. They can actually add their own enhancements or custom widgets when needed.

The real-world view:

Our development team started with a few core Java C++ programmers. When PHP became popular and we were asked to program in it, we developed our own framework similar to that of Java core classes.
But, as a fledgling company, we had the following requirements:

  • To be able to teach new staff members good development practices in a short time;
  • To add new team members to the project without a large overhead for our clients;
  • To painlessly pass the project over to an in-house team or another provider as required.

And we found that PHP just could not satisfy those requirements so easily and we were being asked to develop ever more complicated applications.
We switched to Java and stopped working on our own framework, as many open-source frameworks started to appear. We watched them develop, but did not use any of them for commercial projects. (We used CMS systems and some off-the-shelf packages, both paid and open source).

A PHP developer is actually hard to find, as many of them are self-taught, non-technical people who start with cutting & pasting the code from Zend portal. You can actually achieve a lot with cutting and pasting, but the real value of technical knowledge comes in knowing what to do if the code is broken or does not run as expected. A pool of good developers is split between dozens of frameworks and CMS platforms. So to continue something designed on joomla, for example, you would not need just a PHP developer, but one acquainted with that framework. If not, you would have to pay for him to learn it.
Having one good vendor for a technology makes things centralised and directed. For java there is only one set of core classes, and a couple of MVC frameworks: we use Struts as the most popular one.

When all is said and done, the debate about what is the best platform or language can go for ever. The fact is this: a tool is only as good as the team using it.
If the company who offered to develop in PHP have an experience in building and supporting complex applications using the framework they suggest, and they can ensure continuity of their service, then their approach is as valid as any other one.

  • Vladimir's blog

Post new comment

The content of this field is kept private and will not be shown publicly.
Input format
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

Recent comments

  • Very helpful
    15 weeks 2 days ago
  • Martin, thanks for your
    32 weeks 1 day ago
  • Recording your VoIP Conversations is also a great feature!
    32 weeks 3 days ago