wood burning stoves*
The moose likes PHP and the fly likes Web Developers Cookbook Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » PHP
Bookmark "Web Developers Cookbook Question" Watch "Web Developers Cookbook Question" New topic
Author

Web Developers Cookbook Question

Brett Lewinski
Greenhorn

Joined: Feb 22, 2008
Posts: 19
Hello Robin -

Being a long time Java developer I am looking for a change, a new technology to add to my arsenal and I have heard some great things about PHP. How do you see the see the transition form Java to PHP? One would think it would be easier to pick up and master and it could be learned in a short amount of time. What do you vision being the most challenging thing to grasp with PHP coming form Java?

Thanks for taking the time to answer my question!

Brett
Robin Nixon
Author
Ranch Hand

Joined: Sep 20, 2011
Posts: 48

In my view if you are competent with Java you'll have little difficulty with PHP. It's also a language based on C-style syntax, and it also supports OOP.

If you are new to PHP then my cookbook could help you quickly get up to speed as it comes with thousands of lines of code you can draw on and learn from.


My latest book, The Web Developer's Cookbook, is now out: http://webdeveloperscookbook.com
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Same pinch I am also a Java/J2EE developer switched to PHP recently.

It is indeed very easy and simple You can easily learn PHP and you can do many more things in an easy way. You should NOT compare the things with Java PHP has its own concepts and syntax.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Nick Charles
Ranch Hand

Joined: Oct 09, 2011
Posts: 71

The biggest adjustment that I have is the loss of JSTL and the separation of back-end servlet code from UI JSP code. In my JSPs I have NO server-side scripting. I use only tags and pass data from the servlet to the JSP using JavaBeans. While I can somewhat simulate that in PHP, it isn't quite the same.

Then the complex data structures can get somehwat complicated. But there are tools/functions built in that let you dump such things in a semi-readable way. Makes for really ugly web pages but at least you can see that data being passed around to figure out why your code isn't working the way you expected.

Fianlly, command completion in Java IDEs has crippled me - I can no longer function without it. The PHP IDEs sometimes have a hard time at guessing the data type and thus the command completion doesn't always work.
 
wood burning stoves
 
subject: Web Developers Cookbook Question