I am creating a web app that involves a lot of DB access and parsing and analysing data , Java is the language i am most comfortable with but recently have been told that I should consider to use PHP as it makes DB access protocols a lot simpler.
I dont have any great knowledge of PHP but would be willing to learn for use if it was going to be the better option as far as functionality , portability ect is concerned.
The Web app will run against an Oracle DB and use Flex for the GUI, Please any experiences of similar projects and what made your chosen approach better would help or just opinions of any sort.
There is a huge amount of difference between the syntax, phuilosophy and implementation of the 2 languages. I would suggest that "makes DB access protocols a lot simpler" is not a particularly good reason in isolation for choosing one language over another.
My background is as a PHP programmer, but I currently support several large Java web applications. If you were starting from the same point with both languages then I'd definitely favour PHP over Java - but a full discussion of the reasons why would take a lot more time and space than are available here. However if you already have strong Java skills, then you have to weigh up the costs of acquiring the right level of skill in PHP - due to the differences in the way these systems work, you're going to find your knowledge of Java as much of a hindrance as a benefit in achieving proficiency in PHP.
Other factors I would suggest you have a look at are:
1) architecture - PHP requires far better understanding of the underlying protocols than Java (where a lot of functionality is provided by libs/ frameworks)
2) ease of deployment
3) performance considerations - using an opcode cache means the difference between simple programs written in Java and PHP is small, since the former are usually written inside very complex frameworks, PHP can often have the edge. It certainly does not have the same complexity for memory mngmnt
4) TCO - PHPs ease of use is a double edged sword - you need to know a lot about Java just to get a program running, but the world and his dog think they can write good code in PHP. IME its more difficult to find competent PHP programmers than Java programmers.
If you're comfortable with Java, I don't see the need to learn/use PHP. There is nothing that PHP can do that Java can't.
It's true that by and large, PHP is a much more permissive language, and some tasks can be fulfilled more quickly and with less code. PHP certainly has less built-in abstraction than Java has. But if you're comfortable with Java, I'd say stick with it.
(I'm saying this as a PHP developer.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With