Thursday, March 4, 2010

Adventures in coding

For those of you who haven't heard, I'm working on writing the Pray with Friends Facebook app that I blogged about months ago.

I have installed all of this on my Windows desktop:
MySQL
Apache
PHP
PEAR
About a dozen PHP-PEAR extensions for things like connecting to Facebook and Paypal.

I have a little test database going.  I have an HTML (PHP) file that lets you enter records into the database.  It validates that you filled in all of the fields and that what you entered isn't too big for the database fields.  If you made an error it leaves what you entered in the fields.  And after the data passes the validator, it gets posted to the database.  The page also shows you all of the records in the database.

I have actually spent more time troubleshooting craziness with PHP and PEAR on Windows 7 than anything else.  The newest release of PHP simply would not run--after I installed it Apache would not start.  I opened a defect with the PHP crew over that, and it seems that others can reproduce my problems.

I also found that Windows 7 is more picky than previous versions of Windows about case sensitivity and file/folder permissions.  I had to hack Windows some and then hack PEAR's configuration some in order to get PEAR to operate without constantly throwing errors.  And I had to move all of the PEAR-PHP extensions out of their normal directories and into a new directory structure that I created--and then go through every file to re-path all of the connections between files.

I feel like I've made a ton of progress in my first 3 days of learning PHP.  I understand enough, and have gotten enough of other people's code to work, that I am confident that I can actually code this app.  I can't promise that it will be any good.  But I can code up my idea and make it work basically the way that I want.

Next up is updating records in the database (calling them up into editable fields in the form and then chancing what is in the database.  After that is adding another layer of validation to ensure that hostile code is not getting saved to the database.  After that I start converting my page from full page submissions into discrete AJAX calls.

Once I have those three steps mastered I will build my first version of the PwF database structure and start building the prototype pages for the actual application.

I have already employed Christy to write some of the content for the application--the prayer prompts.  I've looked over what she is doing, and it looks great.  I'm really excited.

No comments:

Post a Comment