I fairly expereinced C/C++ developer (in my mind), but have never done any PHP and certainly no CMS/Web app stuff (I have done a few static sites).

I am looking for some resources that won't try to teach me what a for loop or if statement is, but get me going on php and drupal dev (for drupal, I need to get a grasp on whether I will have to write a module or use existing ones).

I read online resources, but having a good book is nice for when i don't feel like sitting in front of the computer (weird!!).

Thanks!

link|flag

77% accept rate
"I need to get a grasp on whether I will have to write a module or use existing ones" ... sounds like material for another question. – Georg Fritzsche Dec 5 '09 at 18:56

5 Answers

up vote 4 down vote accepted

As far as learning Drupal goes, very similar questions have been posted here very recently (as close as two days ago). They have been submitted from a "newcomer" perspective rather than from an experienced programmers' point of view, but I still think you might find them useful:

As for your specific background/situation: I never professionally developed in C, but I knew the language enough to develop a few small apps for personal use. When I first got to PHP I found this language retains a lot of the logic of C in terms of syntax and built-in functions so I managed to get going by just looking at the drupal code and using the excellent online documentation of PHP. I would even say that many of the inconsistencies of PHP naming (inexistent) conventions are due to the fact it is somehow "inspired" by C and thus retains function names and arguments order. So in a nutshell: if you are an experience C/C++ developer I would be very astonished if you wouldn't pick up the basics of PHP in a matter of hours. You could find interesting to read also this thread as - although apparently unrelated - it presents a few of the distinguishing characteristics of PHP, for the good and for the bad.

If you are learning PHP just for Drupal use, I would give a low-priority to learn PHP object orientation. As you probably already know, PHP object orientation came to exist "for real" only with the 5.x series. This is the reason for which drupal core (until version 6, the present one) has not really leveraged the opportunities given by OOP and you will find that the code is mostly procedural, with objects used almost uniquely as a container for structure data to be passed around. There are a couple of widely adopted contributed modules - primarily views - which are contrarily fully OO, but expect these to be exceptions, rather than the norm. I can't compare PHP and C++ object orientation (as I know nothing about the latter), but I found this presentation very useful to have a go with my own learning on the subject.

After having got a grasp of PHP basics, I would therefore advise you to concentrate on the Drupal's API rather than on the subtleties of PHP. Drupal's API are fairly complex (and powerful) and I found learning how to develop "the drupal way" required an order of magnitude more of effort than learning PHP. To this purpose I would certainly support the suggestion on getting a copy of Pro Drupal Development, which in my opinion is for Drupal what the Kernighan & Ritchie is for C. Make sure to get the second edition of it (the first deals with the soon-to-be-obsolete Drupal 5). You can have a preview of it here.

HTH, and welcome to the Drupal community! :)

link|flag
Thanks for the great response, you have answered my question better than I asked it. I had a hunch learning pure php would not be the focal point of my efforts. – michael Dec 5 '09 at 21:57

When I started with PHP (php 3, I think), it was constantly changing. I bought a book which became outdated very very fast.

I heven't been following PHP recently, so I don't know if it's mature enough for a book to last more than 6 months, but according to my experience of long ago, you are better off with the (great) online manual.

link|flag

The best Drupal book I've read is Pro Drupal Development from Apress and John K. VanDyk. It covers Drupal from a systems level, whereas most books cover Drupal from a end-user level (building modules vs. building applications with existing modules).

As for PHP itself, I can't think of a canonical book. The language radically transforms itself every few years and style varies wildly from project to project. (Being circular, Drupal kind of reflects this. It's written in a very "use procedural code and references to mimic reference style OOP". It works well, but very few PHP projects starting today would take that approach.)

link|flag
Thanks for the book recommendation! – michael Dec 5 '09 at 21:58

Have a look at Packt publishing offerings.

Get/Invest in a decent integrated development environment (IDE) as well as a book to accelerate your learning.

Particularly, you might want to consider a PHP debugger as part of your IDE to step through the code and the code you add as drupal modules. I find this a practical way to learn how a language works. I'm about to embark on a similar journey as yourself.

I have purchased ActiveState Komodo IDE ~$300 for development and debugging Perl programs but it also supports many other languages used in web development such as PHP and there is support for developing drupal websites with this too.

Other PHP IDE tools to consider are the add-ons for Eclipse (free- but I was unsuccessful at getting the add-ons to work - not saying it can't be done, however I love Eclipse for Java development), Dreamweaver and Zend.

I know some developers are averse to spending money on tools and champion free offerings but it is worth considering getting a decent productive development environment rather than just relying on a syntax highlighted editor and printfs outputs of variables (or equivalent) to debug your work.

My experience with free offerings for Perl and PHP has been disappointing as the offerings have been one or more of: half-baked, fiddly, unstable, ambiguous or frustrating. I'm looking for something out-of-the box so I can get on with real development of new ideas rather than waste time trying to install and setup a development environment - an activity where you gain nothing as you haven't even started your development and learning but some might make a virtue out of doing ;)

By the way I don't work for any of the companies that produce the products mentioned and I would welcome anyone to say I didn't need to spend any money and inform me of a free offering that is just as simple to use.

link|flag

PHP: I also come from a C/C++ background. Since there are many PHP books on the market, my advice is to go with a recent one from a publisher known for good editing. Examples: O'Reilly, Prentice-Hall, Wiley, New Riders. I have many PHP books riddled with code errors that you wouldn't believe could make it into print.

Drupal: Like Mac, I have found that "learning how to develop 'the drupal way' requires an order of magnitude more of effort than learning PHP." This may be true for anyone coming from a C-style coding background. One reason for this, in my experience, is that you're constantly trying to circumvent behavior of core Drupal modules -- behavior that may be perfect for non-developers creating mom-and-pop websites. In addition, Drupal is, much more than PHP, a work in progress with collaborative modules that don't always play well together. In my opinion, it helps a lot to see Drupal from an expert non-developer's point of view. The two best books I've seen for that are "FrontEnd Drupal" from Prentice-Hall and "Using Drupal" from O'Reilly. On the coding side, there's only one thorough one, already mentioned by Mac and Alan Storm above. I would also recommend a couple of decent titles authored by Matt Butcher, published by Packt. These two do a nice job of rehashing material from the Drupal site, with a little extra value added.

link|flag

Your Answer

 
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.