Php for Drupal

Events happening in the community are now at Drupal community events on www.drupal.org.
Branjawn's picture

So, for over a year now I've been looking off and on for Drupal related jobs. Invariably, some advanced knowledge of php is a requirement. Can I get some recommendations of resources that can teach me php? I can edit others code to a good extent, but have never written anything from scratch. I'm NOT a programmer (although I had to take Java and VB in college).

And while I'm at it, a lot of these job postings require that you've contributed a module. Any advice on the best way to do that?

If you know of any entry level or contract (FT or PT) Drupal jobs in NC, please let me know :)

THANKS!

Comments

The PHP site is a wealth of information

Screenack's picture

I'd check out the nettuts site and of course http://www.php.net/ site is an excellent resource. I'd like to ask you a question offline, can you send me a note with contact info via http://www.skrinakcreative.com/wp/contact-me/ ? It appears the drupal.org contact system is not operating.

Thanks,
Kyle

How do you get to Carnegie Hall

afreeman's picture

You might try what I did. Grab a copy of the O'Reilly guide to PHP and then budget some time to write a web application from scratch without using any 3rd party libraries or API's. This should give you a good introduction to the following:

  • Basic PHP syntax (variables, conditionals, etc)
  • Database integration. Learning how to build a db connection, query for results, parse returned results and then tear down the db connection is extremely valuable.
  • Basic file I/O: used for everything from parsing configuration files to handling file uploads, outputting reports, etc.
  • Form processing, input sanitation and persistent sessions: All necessary to handle user logins.
  • Array jiggery-pokery: PHP comes with a wealth of core functions for manipulating arrays. Learning these well will serve you greatly.
  • Regular expressions (preg_match(), preg_replace(), etc): while frequently maligned as adding a 2nd problem to your code, these are frequently the fastest way to do input validation which is absolutely necessary to keep your web application secure. In any case regex are so powerful you'd be doing yourself a disservice if you didn't learn them.

Once you've established a fundamental understanding of the language the next step is improving your understanding of Drupal's API. The best way I've found to do this quickly involves hanging out in #drupal and #drupal-support and trying to figure out the answer to most of the questions posted there in a day. The best part about this is you'll be exposed to problems you're unlikely to encounter in your own work, thereby expanding your depth of exposure rapidly.

You should also consider submitting patches to any of the contributed modules you use frequently. This is an incredibly valuable activity as it not only enhances your understanding of Drupal's core API's, it will greatly enhance your understanding of how the modules you use work. As an added benefit you'll be building notoriety within the community. This will also provide you with valuable mentoring in the form of code reviews and feedback on your patches. Expect tough love at this stage of the game.

Another oft-overlooked benefit of supplying patches is this process provides an introduction to revision control, which is invaluable (and unavoidable) in a professional setting. Learn you some git/svn/cvs.

Getting your CVS account can be tricky. The account application approval process is typically long, poorly documented and the specifics are typically dependent upon who reviews your application. Fortunately you don't have to wait until you've written a module to put in an application assuming you can find a module maintainer that is willing to take you on as a co-maintainer. Maintaining a module is a pretty weighty responsibility so I would advise not taking this step until you're ready and you can budget the time required to do it well.

Edit - Best of luck with your job search. I'm on the market myself at the moment.

Great post! This is advice

daveparrish's picture

Great post! This is advice which I'll be taking as well. I actually have never built a web application in PHP from scratch. I started with CakePHP and I think it shows, as I get a little fuzzy when working with any of the code which touches the database.

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: