PHP: Objects and AJAX and Doodles – Oh My!

Screen capture of artsyCoderDoodles Web App with small canvas
Chapter six in “PHP The Good Parts” (MacIntyre, Peter B. PHP: The Good Parts. USA: O’Reilly, 2010) is about PHP objects. We visited object-oriented programming back in my posts on the ASP.NET/C# “Magic Menu” where I discussed some behind-the-scenes on object-oriented (or “oo”) concepts.

This post will be about what I programmed after reading about PHP objects – a doodle web app which started out as a simple little combination of PHP oo programming and some HTML5 canvas and turned into a wild blend of PHP, HTML5, Javascript, jQuery, CSS, AJAX and XML. The final result could have probably been accomplished with less technologies, but in the end it was fun to try out some “extras” in combination with the PHP and HTML5 and learn about those as well. You could say the code is a bit of “doodle” itself! Or I may be getting carried away with the doodle metaphor – on to the doodling app and it’s doodles (but not oodles) of code!

artsyCoderDoodles Web App

Continue reading

PHP: Daily Fortune Arrays Web App

Chapter five in “PHP The Good Parts” (MacIntyre, Peter B. PHP: The Good Parts. USA: O’Reilly, 2010) explained how those multicompartmental data holders called arrays are constructed and provided a sampling of a number of useful PHP array functions. So what shall the artsycoder do to learn how they all work? Why build another PHP web app of course! With HTML5 surrounding the PHP and a little CSS3 thrown in for good measure…

Daily Fortune Arrays Web App

Screen capture of PHP arrays  web app

Continue reading

PHP: Variables, Constants and Scope: Favorite Colors

While learning the basics of PHP variables, constants and scope from “PHP The Good Parts” (MacIntyre, Peter B. PHP: The Good Parts. USA: O’Reilly, 2010), I wrote a simple page about favorite colors. Let’s break it on down — and then take a look at the less than exciting, but educational, page in action!

First, we start with the code that must exist at the top of every PHP page.

<?php

Next, let’s write a heading on the page using echo, and throw in some comments to see how those are done in PHP. The multi-line comment style is also used in Javascript.

Continue reading

PHP: Getting to Know You

I have been working for years with client-side scripting wonder Javascript. Over that time I had dabbled in some ASP, and in some PHP even less. Server-side scripting was more of an “as-needed” item in my undertakings, but I knew in time I wanted to learn more. A short while ago I started working through a thorough book on ASP.NET. About a third in, I took a step back and started down my journey of really discovering what I should have in my coding toolkit as a Web Developer. PHP emerged as an important tool to have and I decided to journey there first instead. ASP.NET will be more intertwined into my PHP learning instead of at the forefront for the moment, but I realize their similarities and am excited to develop skills in both over time. Oh I have the plans my friend, I have the plans…

Continue reading