Ronaldo Returns

Honestly… I didn’t forget about you. And I have not kicked the habit…

Here’s a rundown on changes to my workflow:

I’ve jumped on the NoSQL bandwagon, stopped writing mysql statements/schemas all together in the interest of designing classes more intelligently and to use less memory/resources. And I quickly realized interacting with SQL does not help a programmer think in an object oriented fashion, which would explain my pursuits with Aiki framework and myparse … both frameworks that pretend to be object oriented, but do not take advantage of half of the basic OOP principals, let alone some of syntax introduced in modern versions of PHP.

Once my Google Summer of Code internship ended, I began exploring couchdb, map/reduce, and decided to rewrite an application (mdocs) that I have been developing for 3 years, previously running on a custom version of myparse and sqlee. Also the new version was built to be easily used with jQTouch.

Also that summer I had been dealing with a ‘rouge’ hacker who was able to gain access to the mysql database through myparses’ web interface and would delete all the users groups preventing any logins. Instead of dealing with my unmanageable code I decided maybe mysql was a bit over kill for my web application and it was time for a rewrite.

Although I still have not added every feature, the new version loads much faster, uses significantly less code, and doesn’t hit a database with several overly complex sql statement every page load. While php 5.3 uses about 50% more memory just to be called (plus whatever memory your scripts use) versus php 5.1. Its also more modular, and automatically handles dynamic class loading (require($class.php) , new $class() ).

While performance wasn’t my initial goal, for me speed is always addictive, so I decided to implement memcached on nginx (also a new to me technology), and set up an intelligent way to handle secure cookies, reducing page load times by about half. All data (except the logout which uses a $_GET var) is passed via the $_POST object, and even that is validated through PHP, and again inside of the couchdb’s view before an action takes place. Since all classes are built around poform (including couchCurl), it becomes very difficult for nefarious hackers to manipulate a session state.

Well, stay tuned, as I have a lot of stuff I have written but just have not edited and published.. Good stuff…





memcached

couchCurl
couchCookie
jqtouch