Hodges' Model: Welcome to the QUAD: Drupal musings 3: PHP, Textmate, h2cm and Forms

Hodges' model is a conceptual framework to support reflection and critical thinking. Situated, the model can help integrate all disciplines (academic and professional). Amid news items, are posts that illustrate the scope and application of the model. A bibliography and A4 template are provided in the sidebar. Welcome to the QUAD ...

Wednesday, May 12, 2010

Drupal musings 3: PHP, Textmate, h2cm and Forms


Happy International Nurses' Day!


For quite a few months I have not connected the MacBook to the external monitor. I did so last night using:

  • MAMP (server software)
  • Textmate (an editor Mac only)
  • prompted by reading - Robin Nixon's, Learning PHP, MySQL & Javascript, O'Reilly.
(Experienced programmers may at this point want to go review some political party broadcasts - coalition news as there's a lot more happening there.)

I typed in a PHP file, purposefully trying Textmate's 'Bundles' > 'HTML' > options to mix some PHP and HTML.

The file does not do a lot, but like creating, reading and writing a file it's a start. All this effort does is display four text box input fields (Chapter 11 Form Handling) with submit buttons. Previously I have mirrored the laptop screen to the external 24" Acer, that appears to be the default. ;-) Tinkering with the display options and turning off mirroring I found that I could pick up the Textmate window and move it to the big screen on my right. Meanwhile on the laptop I could preview the output in the browser. Apple's 'Spaces' is a related facility to master.

Not only that, but suitably editing the PHP file in Textmate resulted in updates on the browser (Refresh after change. Delay 0.40 s.) To me - that's Magic!

On the Drupal front - despite the title of this post - there's not much to report. The news is brief and yet kind of major in that I've bought my ticket for Drupalcon in Copenhagen. I am really gutted that this year I did not get to the Scottish Ruby Conference in March, after '08 and '09. At least getting to grips with Textmate will also help with Ruby (and Rails) too.

OK, back to Textmate to try the other PHP input types: text area, check boxes, hidden fields, select and labels.