Monday, July 25, 2011

Diving into Node.js

If you are following the posts on Hacker News, you would have definitely heard about Node.js. At least one of the posts related to Node.js will be on the front page of Hacker News everyday. Node.js is an event driven server side JavaScript environment. Its a runtime which can execute JavaScript files on the server side using the JavaScript engine V8. It is intended for writing scalable applications like web servers. It was created by Ryan Dahl in 2009. I have been playing around with Node.js for about a month now and this post is a consolidation of different things I have came across in the process of learning.

Node.js resources:

  • Node.js official site. Check out the Wiki on this site.
  • The Node beginner book by Manuel Kiessling. This is an excellent book to get started with Node.js and server side JavaScript. It is a great work by the author. He has chosen to explain the concepts via “How not to” and I am really impressed with his writing style. Hats off to the author.
  • Node by example. This is an excellent series of posts to showcase some of the available features of Node.js. It is a collection of short code examples.
  • Node Modules. This is the list of modules which you can hook into your code. Its a huge list and you can find modules for almost anything you wanted to.
  • Node.js hosting. This page contains list of hosting sites where you can host your Node.js applications.

If you are from Java background, you can also go through this and this to know about Node.js from an Enterprise Java perspective.

Note: I have read through all the materials posted here and found them to be useful. If you come across any interesting links about Node.js, share them via comments.

-- Varun

Monday, July 4, 2011

Facebook Circles Importer: Import Google+ Circles into Facebook

Ever since Google announced its social product Google+ last week, hackers around the world have built some cool hacks. Here is one such hack built around Google+ and Facebook. Google+ sports a simple and neat interface and the highlight is the interface of Google+ Circles. And, few engineers from Facebook have already built “Circle Hack” and ported the interface of Circles to Facebook (Lists) in no time. This piece of work of mine is an extension to Circles hack which facilitates importing Circles into Facebook. Access it here.

Circle Hack

One of the important features of Google+ (as bragged about) is Google+ Circles which helps you to share your data with a specific group of people. A similar feature already exists (Lists) on Facebook but is hidden inside a bunch of other features and is not very user friendly. Circle Hack is an excellent piece of work done by few engineers from Facebook to provide a friendly interface to Facebook lists. Circle hack is developed as a node.js application and the backbone of the hack is the UI Kit developed by the same author. It is a very popular UI framework for building complex web apps. Again, the author has done a very good job. Source code of Circle Hack can be found here. I was hacking through Circle Hack as well as UI Kit and was quite impressed with the offerings of UI Kit. I have browserified the node modules and ported it into VServices, which I already own.

'Circle Hack' ported into VServices

Circle Hack

Circles Importer

Circles Importer is an extension to Circle Hack which facilitates importing contacts from an external source (like Google+)  into Facebook and create lists out of them. Facebook mail invite has a similar feature of importing contacts but you have to take the pain of creating the lists yourselves. That is where this tool will fit in.

Facebook Circles Importer

Steps to import Google+ Circles into Facebook?

  • Google has provided us with a handy tool (Google TakeOut) to extract our data from Google+ whenever we wanted to. Google Takeout lets you download an archive your data from various Google services including Buzz, Contacts and Circles, Picasa, etc.
  • Sign in to Google Take Out and select the service “Contacts and Circles” for archival. Download the archive (zip).
  • On extracting the archive, you will find .vcf files under contacts folder.
  • Upload the .vcf file to the Circles Importer. You can even drag-drop files from your desktop.
  • Circles Importer will parse the VCard and shows the list of Facebook friends who are part of the uploaded circle.
  • Choose an existing list from the auto-complete text box or provide a name for the list. Click on ‘Add to list’ to complete the process. 

-- Varun

google-site-verification: googlea4d68ed16ed2eea6.html