Facebook Connect for WebWorks

EVENTS / 12.11.14 / timwin1

Connect for webworks

Our third UCOSP project this summer was the Facebook Connect plugin. Like our other project, the Google Analytics plugin, the Facebook Connect plugin allows interaction with a 3rd party web service, and we were able to do it in JavaScript without going to C++. Zain took on this plugin and here’ what he had to say about his experience on the project:

For as long as I can remember, I’ve been very passionate about building things. Lego and I were best of friends when I was young. In middle school I fell in love with electronics. I spent most of my weekends surrounded by batteries, motors, switches, wires, screwdrivers etc., building my ideas. Then in my first year of University, I was introduced to Software Development and being someone with a passion for building things and brining ideas to life, I instantly fell in love with it. But it wasn’t until I learned about the concept of open source development that this love really took off.

Open source software, like everything else has its pros and cons. Depending on the type of project you’re working and the situation you’re in, one may out-weigh the other. For me it has always been the most preferred way to build and collaborate on projects. Open sourcing software projects not only allow you to share your ideas to a broader audience and get their opinions and input, but it also allows other developers to contribute to and extend your ideas. And since this works both ways, you’re also able to work on and extend other people’s ideas and projects. In general, this leads to a ton of improvement, new ideas and learning.

This summer, as my computer science degree was approaching its end, I decided that I wanted to do a course that lets me focus completely on software development, preferably an open source project where I could work on building a cool idea or an app. I came across UCOSP (Undergraduate Capstone Open Source Project) program and enrolled in it via my University and chose to work with BlackBerry on developing Cordova/WebWorks plugins for BlackBerry 10.

For those of you not familiar with Cordova and BlackBerry WebWorks, in a nutshell, they are frameworks that provide mobile developers with a set of device APIs, allowing them to access native device functionality (Camera, Speakers etc.) using JavaScript. Super cool isn’t it? The beauty of this is that it allows developers to build apps completely in HTML5, CSS and JavaScript without having to write any native code at all. This also proves to be convenient because developers can now, with minimal effort, port their apps to the different platforms, without worrying about the look and feel and platform dependencies.

My project for this course was building the Facebook plugin for Cordova/WebWorks for BlackBerry 10. A WebWorks plugin generally consists of two parts, the Client which is the API interface for the developers using this plugin and the Server which takes care of invoking the native code.  Since BlackBerry wrote BlackBerry 10’s Facebook App themselves, there exists no Native SDK and therefore I had to write this complete plugin in JavaScript. I initially tried a few different approaches, using a static copy of Facebook’s JavaScript SDK etc. but finally settled on using REST calls as this would take away the headache of worrying about the changes that Facebook would be making in the future. The working copy of the plugin can be found at in the Community API repo. I plan to work on this even after the completion of this course and in the process learn and further improve my technical skills. Kudos to BlackBerry for letting me work with them and to Tim Windsor for his amazing mentorship 🙂

Zain was able to get the plugin working for BlackBerry 10 but there’s more to be done before we can upstream it to PhoneGap Build. This coming term we’ll finish that up and send it upstream. If you’re interested in following along with the student project, watch #bbucosp on twitter, and all the code will be going into the public BlackBerry repositories on GitHub. If you want to get involved yourself, contact me to get started: @timothywindsor on twitter, on GitHub.

About timwin1