I was called to create a Facebook Page Application to take part on contests, while an Admin panel was necessary to manage those contests. When i first heard about it, i immediately thought to give a try a new PHP framework i was working on lately. It’s based on MVC principles.
So, the main idea was that i would keep separate Controllers, one to serve the Facebook app through Facebook’s iframe, that would answer only to POSTs, etc, etc; and one that would serve users wanting to access the Admin panel from anywhere. I created separate Views on the Controller, that was serving the Facebook Page app, one that would determine if the user has liked our page or not, if the contest was currently drawed and would redirect the Facebook’s iframe on the appropriate View.
The idea was so simple, that ended up too complex. So complex that bugs out of nowhere jumped in.
The latest bug i worked on all day today was that due to too many redirects, i was doing, on the same controller, Safari and it’s ‘Blocking 3rd Party Cookies‘ policy wouldn’t allow to keep sessions, so i had to eliminate those redirects in order to create a persistent user experience.
Some times too much simplicity can drive you crazy…