Sunday, May 27, 2007

Facebook Platform Development Setup

I've been playing around with the newly released developer features from Facebook. Since it's quite difficult debugging FBML from a remote server, I've come up with the following setup.

I'm using Ruby on Rails to develop a simple Poll application. Since I don't want to have to upload my work every time I'm going to test it, I've decided that during development, I'll run the server locally.

Your Facebook application needs to request information from your server. Since my IP changes once in a while, I registered it with DynDNS, and gave it a hostname. I then set up port-forwarding on port 3000 of my router to head to port 3000 of my laptop.

Now, when Facebook makes a request to http://myurl.homeunix.net:3000/, it goes to my IP, which is served to my laptop. The joy of this is that you can see the debugging output from your server instance, which is very helpful, as Facebook does not really print out debugging information.

Peace out, homies.

Wednesday, May 2, 2007

Sure. Why not?

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Tuesday, May 1, 2007

OpenLaszlo and PHP

I successfully integrated OpenLaszlo with Code Igniter tonight. I'm pretty happy. The solution is stupidly simple, yet I had to search for it. Simply run OpenLaszlo, then do a local proxy-request for certain URLS. Now, when I call for http://myserver.com/lzx/somefile.lzx, it throws me http://localhost:8080/lps-4.0.0/lzx/somefile.lzx, which causes the LZX file to be compiled (or drawn from the cache) and served up. In code, I just dump the request to http://myserver.com/lzx/somefile.lzx using file_get_contents (or curl, if you please), so I can maintain my pretty URLs (i.e., no one ever has to request an LZX file directly).

Pretty effing slick. Now, what to do with it?

The part I hate most about web-application development is creating beautiful administrative interfaces. Yes, I like them. Yes, I think they are great. The problem is I suck at it. So if I can pass OpenLaszlo my list of required fields and data URLS and have it generate a usable interface for me, more power to it.

Too bad OpenLaszlo is such a beast to run. Moreover, it's too bad I'm on shared hosting and can't run it. Guess that means I'm limited to playing around on my local machine.

Santa, for Christmas, please buy me five years of dedicated hosting. Or two. I'd even settle for one. Thank you, Santa.