PHP Session Sharing Among Subdomains

PHP supports sharing sessions among subdomains which can be very useful for sharing cookies and sessions among multiple web applications. I wanted my users to remain logged in while navigating from www.example.com to site1.example.com. By default PHP will treat these domains as two separate sites and users would have to login to each subdomain. All you have to do is to either set the following setting in your php.ini file:

Validating a Facebook Session Within an iFrame

Facebook takes security seriously and there are many many things a Facebook app cannot do. Sometimes it is necessary to create an iFrame and load the page in to work around Facebook’s security model. This example shows how you can continue to use the $facebook->require_login() method while you are inside an iFrame. Each Facebook request to your application contains a number of parameters that you can use to authenticate if the request really came from Facebook and if the user is actually logged in.

Building for Mobile with Device Orientation

Mozilla Firefox 3.5 and Firefox for Mobile 1.0 (Fennec) both have support for modifying a web applications look based on screen dimensions and current orientation. These abilities give web developers the power to build better web applications for mobile devices and the ability to optimize the browsing experience when screen space is constrained. CSS Orientation Properties Web applications look and feel is defined by a CSS file, so therefore the Firefox developers made it super easy to tie current orientation and screen dimensions into which CSS file to load.

The Cost of Endorsing H.264

As you’ve probably heard, both YouTube and Vimeo have released beta support to their massively popular websites to play videos using the HTML5 video tag instead of Flash. While I am glad the video sites are finally switching to the native HTML video tag, I am perplexed why they have gone with the non-free option. Firefox, Safari, Google Chrome, and soon Opera all support the HTML5 video tag with the ability to play Ogg Theora encoded videos (except Safari).

Facebook vs You!

Have you had the… how should I describe it… experience of writing a Facebook application? No? OK, here’s an introduction to what you can expect. When developing an application you must learn Rule #1 Facebook is the gatekeeper. Everything you do, be it HTML, CSS or JavaScript, is restricted by Facebook. Only the commands, functions, CSS properties, HTML tags etc. that Facebook allows are permissible. If you have an error in your HTML such as an unclosed tag or if you try to use a CSS property that does not exist, Facebook will render a very nice message saying you made an error.

UpcomingHoliday.com Now with Geolocation

UpcomingHoliday.com has been updated and now includes geolocation support. If your browser supports it your country should automatically find and select your country. If not, it will fall back to IP based country lookup. Geolocation is a HTML 5 feature that is supported by Safari on the iPhone 3.0 OS, Firefox 3.5 and Google Chrome. UpcomingHoliday.com is an application that tells you what and when your next federal holiday is. Currently it’s available for people in: Australia, Canada, France, Germany, India, Nigeria, United Kingdom and United States.

Quality Software @ Thirdi

I work at Thirdi Software, and one of the initiatives I started was a Quality Software @ Thirdi email newsletter and series of blog posts highlighting quality solutions to software problems. It’s mostly targeted at developers but there’s also some insights to be had for the quality assurance team and for project managers. The posts were originally posted on the company blog and reproduced here for archival purposes. They touch on a lot of basic information for software developers including software design, upcoming technologies and useful tips to make your life easier.

What is Quality Software

I’m a software developer and one of my major focuses and motivations is to develop quality software. I refuse to build software that is hacky, down right crummy or falls over under a bit of stress. Yes I live in the real world and sometimes deadlines demand shortcuts, but most of the time I’m very proud of the software I create. So what are the visible user centred differences between high and low quality software?

Using Ubuntu for Time Machine in Snow Leopard

Over a year ago Matthias Kretschmann posted an excellent guide on how to use Ubuntu as a Time Machine backup server. The guide is quite well written all the configuration steps worked, but I received Error 45 creating backup disk image when Time Machine ran. Some more research revealed that this is because of changes to the sparse bundle image in Snow Leopard. To make it work I had to create my own sparse bundle with a plist file in it to associate my MacBook’s unique id with the time machine image.

Learning WebGL

If you’re interested in programming graphics on the web I recommend subscribing to Planet WebGL; it has a lot of great tutorials and instructional material for learning how to program graphics in a web environment. WebGL is technically a JavaScript binding to OpenGL ES 2.0. If you already know OpenGL ES and JavaScript, you should be able to pick it up pretty quickly. If you know JavaScript but not OpenGL and are in a web development career, I encourage you to look into WebGL because it could be one key component of interactive web applications in the future.