I am a Java EE developer working mainly with JSPs, Servlets, and frameworks like Spring.
- Will learning PHP be a wise decision ?
- What would PHP offer me ?
I am a Java EE developer working mainly with JSPs, Servlets, and frameworks like Spring.
Learning a new language is always useful. You may never need to use it but at least you can communicate with other PHP developers on a knowledgeable level. It may be that one day you need to interface with a PHP project and having the knowledge will only help in making better design decisions.
PHP offers you a faster way to develop simple websites, but the resulting site will tend to be slower than if you used Java EE. Complex sites will tend to be less maintainable when implemented in PHP.
Whether learning PHP is "wise" is a loaded question ... but having extra development skills in your repertoire cannot do you any harm.
I am a PHP and Java developer. IMHO, PHP will open you to the world of dynamic language more smoother than other language. You will learn to careless about the object types or even objects (if you don't do OOP). This give you different way of thinking as you will not thinking about class and object bot more of primitive data, array and associated array.
With less restriction, you will code faster and after a some experience running your php program, you will begin (if you care) to review your code without the helps of compiler.
All those with little expense of unfamiliar program syntax if you goes to Python or Ruby.
Just my thought.
It's always wise to learn a new technology. Even if you run screaming from PHP, seeing how it solves certain problems might help you with your core Java EE development
PHP would offer you
A familiar object model (abstract and concrete classes, interfaces, etc.) with some weird differences
Less verbose syntax
Not having to deal with types
Having to deal with no type safety
A built in dictionary type (confusingly called array) that offers the convenience of generics without the verbosity (I think what I just said is true, but I'm not really a Java guy)
Superior string handling, including high performance mutable strings
Experience with what happens when you take a globally scoped scripting/programming language and bolt Java style OO on top of it without taking that global scoping away.
Access to a huge number of c or c++ based libraries, and the ability to expose functions for any c or c++ library if you're willing to do a little work and recompiling
Here's one way to think about the differences in the technology stack. In your world, Java came first and then JSP and servlets were developed to deal with the web/networked world. Imagine a language where JSP came first (with Apache serving the role of servlet), and then slowly a Java like syntax was developed built on top of JSP.
simplicity, php is a different way of thinking specifically because of the limited number of tools available, associative arrays are very dynamic and as a main part of the language it changes the way you design a program significantly.
there is nothing in PHP that cannot be done in Java, the reverse is not true.
but having a limited, simple way of doing things can help bring out the problem space in a different light.