Would it be fair to say learning Java would make me a better PHP OOP Developer? I've been looking into Java so I can understand OOP better. Should I continue learning Java to better understand OOP or would I be better off sticking with PHP OPP. I've just learnt about interfaces and abstract classes, will I really use these in PHP? Any advice will be useful as I want to get the most out of my time.
views:
223answers:
6I think learning a new language will make you a better developer in general so I would always encourage it, it will give you plenty of new insights. I try to learn one new language every year.
Absolutely. As mirror303 already said, learning different languages helps improving your development skills simply because there are usually not two languages that incorporate the same concepts in the same way.
If you want to improve your OOP skills Java is probably a good choice. And even if you don't use interfaces and abstract classes right away, they will make you think about your code in a more abstract way when designing it.
If you just want to learn Java's OOP to become a better OOP developer with PHP, I'm not sure if the difference between those two implementations is big enough. But frameworks like Spring will definitely show you new ways to design applications and think about the problems you want to solve, so it is IMO definitely worth it.
If you're doing it for fun and for learning, you can take a look to other languages too.
and
made the history of OOP. I like this book:
Object Oriented Software Constructions
It's about Eiffel, but it makes you a better OOP programmer. :)
OOP is universal concept across languages (that support it), if you learn it from one language, it will definitely help you in other language(s). Java is undoubtedly superb language when it comes to OOP. So, yes, it will help you to become a good PHP OOP developer.
I would probably pick a less verbose language than Java. Since you are trying to learn Concepts, you don't want to get bogged down with the nitty gritty of a language like Java/C#, in my opinion.
I would probably pick something dynamically typed that you are comfortable with. Since you already know PHP, Python might be a good choice. Or Ruby.
Like mirror303 said, though, learning any new language will make you a better programmer.
Do it. I did.
I would say it's better to learn OOP fundamentals using java than using php. Java is more strict, rigid, and finicky than php, and I personally think that's a good thing for learning purposes, even though I dislike the verbosity of java. To some extent, java will force you do things a certain way. You can still do it wrong, but I found it to be like having an extra guiding hand.
One thing that I really found useful was the immense collections of java libraries and their documentation. Most were good examples to look at, and I felt it really helped me get a solid grasp on the basics by being able to look at so many good examples. In php, finding the "good stuff" to look at isn't as easy.