-
Portable File Encryption with PHP and Java
Posted on June 9th, 2010 No commentsI had a client project come up recently that required HIPAA compliance which meant encryption was going to be involved. The goal was to collect patient information and then store it in encrypted pdf files so they could be downloaded, decrypted, and entered into another system. It did not sound like the most efficient system however that was the spec I was given. I had never worked with symmetric encryption before although it has always been a topic of interest so I jumped at the opportunity to expand my knowledge of cryptography.
Read Entire Article
Cryptography, Java, PHP Cryptography, decryption, encryption, Java, mcrypt, php, security, swingRelated Topics
-
Dynamic paths in external javascript and stylesheets
Posted on April 19th, 2010 No commentsBest practices dictate that unobtrusive javascript is king these days which means that all javascript should live in external js files instead of cluttering up the html. Simple enough, however, situations arise sometimes where you need to adapt your javascript for dynamic conditions of the application, most notably, the current base directory where your application lives. If your application is small enough you can just hard code paths to images, other scripts, or internal urls however if you are anything like me, you probably shudder at the thought of hard coding any thing. Take this use case into consideration: let’s say we have an external javascript file called myscript.js which houses all of our javascript for handling click events on ajax powered links throughout the site.
Read Entire Article
-
Silk CMS Progress
Posted on April 13th, 2010 No commentsI’ve gotten some inquiries regarding the status of Silk CMS, the content management system I am developing. Since there is some interest in the project I decided to announce that the google code project page has been activated and that I have committed the project to svn. I don’t want to go too much into the design philosophy here since I am planning a large article on CMS design in general however I wanted to start posting about my progress as it gets closer to a production-ready state. Thanks everyone for being patient. I actually created the google project page some time last year when I had been able to work on it and then there was a huge stint of client projects that bombarded me at eroi so I had to move the project to the back burner for a time. Suffice to say, I never had any intention of letting this project become vaporware and I can guarantee that it will not since I can certainly leverage it pretty effectively at my job.
Read Entire Article
-
Remotely Managing WordPress with PHP
Posted on April 8th, 2010 1 commentWordpress is the ubiquitious platform these days although I hope to change this with the inevitable release of Silk CMS in the next month or so. In my line of work, I tend to have to install many, many copies of wordpress all over the place. Wordpress makes a great platform for deploying niche sets especially and comes with hundreds of plugins that make creating these sites dirt simple. Anyone who has managed niche sites can attest that it becomes quite unwieldy to manage hundreds of websites. It helps to standardize on a common infrastructure for all of them (ie, themes, plugins, etc) however each site needs to be slightly customized to a particular niche. Plugin settings need to be tweaked, headers changed, sublines updated, etc. Uploading wordpress to each host and manually unzipping it and re-uploading everything that is non-stock is one way to go about it but it’s tedious and time consuming. If you happen to host on a hosting service that offers fantastico your job is a little easier but not by much.
Read Entire Article
-
Get Geo Coordinates from Google Maps in PHP
Posted on February 5th, 2010 No commentsGoogle maps offers a rich api for getting a lot of information as you are probably already aware. I’ve written a few locators in the last couple of years involving the use of google maps and doing radial searches based on zip codes. The difficult part for me was getting the geo coordinates of the queried zip code to use as a reference point for doing the radial search. I ended up writing a nice simple class to encapsulate converting zip codes into geo-coordinates.
Read Entire Article
-
Why HipHop is Hype and Facebook Looks Foolish
Posted on February 4th, 2010 1 commentThe twitterverse has been in a flurry of hype over Facebook’s latest abortion: HipHop. For those who don’t know, HipHop is Facebook’s answer to scalability problems on their platform. Since everyone and their dog (literally) is on facebook, their platform responds to millions of requests each day, meaning they need serious hardware and software that can handle this brutal, unrelenting onslaught every second of every day. Facebook is written in Php which is suitable language for most applications on the web however when you push it as hard as facebook has, it starts to split at the seems like any runtime that was not designed with enterprise in mind. You can extend its life with the use of load balancers, smart caching, and good development practices but sooner or later it will fail you.
Read Entire Article
-
jQuery.imageLoader 1.0 Released
Posted on February 3rd, 2010 9 commentsA while ago I wrote an article on how to dynamically load images using jquery. This has turned out to be one of my most popular posts and I got a lot of feedback on it. As a follow-up I decided to package it up as a real-life jquery plugin and release it into the [...]
Read Entire Article
-
Dynamically Manage Models with Zend_CodeGenerator
Posted on January 19th, 2010 2 commentsThe holidays have passed and at last I’ve gotten enough of my obligations out of the way to begin to innovate on some new code as well as play with some of the new offerings in the latest versions of the Zend Framework. I’ve been most interested in particular with Zend_CodeGenerator since I have spent a lot of time in the last year writing boilerplate code for various projects. I find that the bulk of my time is spent prototyping models so I figured it would not be hard to build a model scaffolding script not unlike the ‘rake’ command in ruby on rails and similar commandline tools offered by the many application platforms out there. Rather than killing my wrists pounding out models, their various attributes and associated mutators/accessors, I decided that my time would be more efficiently spent describing my models using a short hand format (preferably xml) and then having a script translate that into actual classes and files. The Doctrine ORM allows you do this very thing translating YAML into Doctrine Models. This was very interesting to me but I chose to take it a step further and have it build all of my Domain Model infrastructure while it was at it (This includes the models, the gateway classes, and the DAO classes).
Read Entire Article
Development, Doctrine, PHP, Zend Framework Doctrine, models, php, scaffolding, scripts, xml, Zend FrameworkRelated Topics
-
Domain Model ORM Adapters
Posted on November 24th, 2009 1 commento I’ve had a series of articles that focus on domain model programming methodologies and most of my examples have demonstrated implementations using the Doctrine ORM (Object Relational Mapper). Given the nature of domain model programming I’ve held to the assertion that models built using this method are truly ORM agnostic and it should be effortless to swap out Doctrine for the ORM of your choice. Well I like to put my money where my mouth is by showing how easily this has been done by showing off adapters that I have written, one for Doctrine, and the other for Zend_Db. The beauty of this system is that both support the same ORM agnostic query syntax demonstrated in my recent post about creating complex sql queries using associative arrays. This means that no modifications are necessary in the models, controllers or views when switching ORMs. Developer’s utopia.
Read Entire Article
Development, Doctrine, PHP, Zend Framework Design Patterns, Doctrine, Domain Model Programming, ORM, SQL, Zend FrameworkRelated Topics
-
Load Your Ads Last
Posted on November 19th, 2009 2 commentsNobody likes ads but we can all agree they are a necessary component of doing business online. I recently had some experience dealing with adify, a aggregating ad platform which pipes in banners from a multitude of sources some with questionable practices in regards to loading performance. I had just launched a beatifully crafted website that employed all the tricks in the book for quick page loads and it was snappy… until we embedded the ad code. I like to load my images asynchronously and I like to execute javascript only once the document has finished loading so imagine the pain of patiently watching little animated gif spinners swirling away for as long as 6-30 seconds because the browser is choking on javascript from the banner ads in the middle of the page. Normally the solution would be to fix the javascript, but being a third party ad network, the embedded code was far beyond my control, so clearly this needed rethinking. I needed to figure out how to load the ads asynchronously as well.
Read Entire Article


