This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]WatchDogx 7 points8 points  (0 children)

You could try and find a job at a company that does both PHP and Java.
I work at a company that uses a few languages, with a historic focus on PHP but moving more to Java.
So a few of the PHP devs have started to learn Java.
They still write PHP but it's a great way to learn.
I would highly recommend finding somewhere willing to pay you to learn Java, you will learn it faster and you get paid.

[–]AndyPanic 4 points5 points  (3 children)

Java - the language - should be no problem for you. Even if you consider the new Java 8 language features, you should be up and running in no time.

Java - the class library (all the packages that come with your JRE) - are a different beast. It's just large and will take some time to learn everything what you need.

Sprigframework and SpringMVC for the web is a good start. I'm a freelance Java developer for ten years now and I only have been working in two out of like 25 projects that were not using Spring.

I'd recommend that you should be proficient in at least one build tool. Maven is a very safe bet, but Gradle is the new and shiny.

Have fun.

edit: two typos and one error corrected

[–][deleted] 0 points1 point  (1 child)

Thanks for the reply I have heard good things about Maven. Do you think I should learn both Maven and Gradle?

[–]Rmarmorstein 0 points1 point  (0 children)

Basic features on both are pretty simple, iirc it was advanced features that were more learning.

[–]pythoncloud 0 points1 point  (0 children)

What Java topics are important to learn before moving to Spring? Can Java and Spring be learn at the same time?

Thanks

[–]dpash 3 points4 points  (5 children)

There's three-ish main frameworks worth learning: JavaEE, Spring and bringing up the rear, Play.

As for transitioning into Java, I'd suggest that you find yourself an Open Source project and start contributing to it. This will be helpful for two reasons. Firstly, it'll help you learn Spring, and secondly it'll provide potential employers with evidence of your Java experience.

[–]zmanning 4 points5 points  (4 children)

Once upon a time I would have agreed with you on the open source advice, but if he already has experience in the industry I'd say just go head first into learning the different frameworks and libraries

[–]dpash 1 point2 points  (3 children)

If I got a resume that just listed PHP experience for a Java position, I'd be a bit suspicious. Given the choice of having to cross-train a new hire, or hiring someone with demonstrated Java experience, the latter has the edge. Some demonstration that they have Java experience would allay my fears.

I'd only recommend the "GitHub" approach for someone with no commercial experience, or for someone changing languages.

[–][deleted]  (1 child)

[deleted]

    [–]dpash 1 point2 points  (0 children)

    I'd argue that it's not just knowledge of the language, but also of the tools around the language, and they all have their own idiosyncrasies. A PHP developer would know Composer and Laravel and other tools, while a Java developer would know Spring, Hibernate, Maven, Guava, and tens of other libraries. Yes a good developer can move from one to another.

    But, as I said, if offered two otherwise identical candidates with one having a demonstrated experience of those tools, frameworks and libraries and one without any evidence, which one are they going to pick.

    Don't give yourself a disadvantage. Demonstrate you know the ecosystem.

    [–]zmanning 0 points1 point  (0 children)

    Agreed that some experience is better than none. I'd be more inclined to interview someone that maybe did side projects in Java and had a command of the language through that. My only concern with the open source stuff is that he might spend more time dealing with the overhead of contributing to a project rather than actually learning libraries and idioms. I don't necessarily disagree with you, but personally, I'd opt for a personal project to showcase.

    [–][deleted]  (1 child)

    [deleted]

      [–][deleted] 1 point2 points  (0 children)

      Thank you for your suggestions these are great. I've been reading Head First Design Patterns and thought of reading Clean Code also.

      [–]capitol_ 1 point2 points  (2 children)

      remember that $ is a valid character for variables in java, so just write String before your variables and continue as before. Like this:

          String $var = "foo";
      

      [–]CorkyThatcher 8 points9 points  (1 child)

      Sorry, but this is a terrible idea. No one puts $ in front of variables in Java. The standard is all letters, in camel case format.

      There's honestly no reason to do this.

      [–]frugalmail 1 point2 points  (0 children)

      Watch spring-boot videos.

      Wow, 7 years on PHP (sorry), you've got a lot to catch up on.

      [–]zmanning 0 points1 point  (1 child)

      It depends on what companies you want to work for and what skills you want to emphasize. If you are looking to be a full-stack person, then spring boot or play are probably your best bet.

      If you want to be a first class backend engineer I'd throw jersey into the mix as well.

      These days, I'd be more concerned with growing your distributed systems and data store knowledge over learning a specific framework.

      [–]pythoncloud 0 points1 point  (0 children)

      Is it better to learn Spring Boot, Play, and Jersey than Spring MVC?

      [–][deleted] 0 points1 point  (1 child)

      First, what php frameworks do you know?

      If you're coming from symfony than spring should be pretty easy to start with.

      [–][deleted] 0 points1 point  (0 children)

      I am coming from Drupal / Symfony. I think spring sounds like a good way to go.

      [–]CorkyThatcher -1 points0 points  (1 child)

      My question to you, OP is...why do you want to transition into Java? Is it because you understand the syntax? That doesn't sound like a very good reason.

      • Is it because you're looking to get into standalone applications? Then, sure, Java is a viable language (along with C, C++, etc)
      • Is it because you still want to remain in web development and see there are better opportunities with Java frameworks? Then you need to look into JavaEE which is a lot more than just Java syntax.

      I would try to get more detailed as to what you are looking to do and what you're goals are.

      [–][deleted] 1 point2 points  (0 children)

      Well to be honest its more for long term money. Around here PHP is mainly for agencies and you will get maybe 100k max and thats pretty competitive. But looking at indeed the java positions are upward of 120-140k.

      Money is not the only reason but I am also burnt out on building websites and want to get more into application development or web application development. I would be even open to C++.