So, it all began with Abhinav asking me to put up last year’s ‘yearbook’ site online for the current graduating batch of IITK. He also told me that the site was so heavily used last time that the server it was hosted on had crashed! Consequently CC deleted all the hosted data and now is glaringly empty. I handle the Navya server ever since Praneeth graduated, it is an ideal server to host such an app. I had recommended the same to Abhay, the Student Gymkhana President few weeks back, so it was now upto me to configure the app and host it online. Out of curiosity, I just took a peep into the code, it was literally a mess!
After seeing through for few minutes, I clearly understood why the CC server had crashed! It was a very badly designed software, may be it was never ‘designed’ at all[ I don’t know the guys who designed it, but not to consider it an offense, its just that its very bad]!
I had about a days time to either fix it up or come up with an alternative. I quickly counted the number of lines of code:
➜ web_nostalgia find . -name \*.php | xargs wc -l
It’s a whooping mess of 83K+ lines! What the hell? Surely, I couldn’t have fixed it up. I started exploring my options, started with search on Google ofcourse, searched for “free opensource alumni networking” and was searching for next hour or so, ended up with some quality links on sourceforge.net site, which was neatly categorized, but none of them seemed very promising, I went through few blog posts and finally decided that a ‘Social networking’ solution would be more elegant, I quickly recalled elgg, which seemed to fit my use case neatly! I started out with elgg and installing few custom plugins to personalize it, I did not code a single line, straight out of the box it seemed really well. The problems weren’t too far, I was working on the latest version of elgg and found that the Album & tagging plugin didn’t play nice, I thought now its time to put in my ninja skills of php’s into action, I started to look out for documentation of elgg , initially it seems nice but quickly turned into a nightmare as I started out with its API reference, before I continued anymore into it, I wanted to have a look at others opinion on elgg, and ended up on this SO question : http://stackoverflow.com/questions/1564096/how-flexible-is-elgg , now, that felt satisfying, I wasn’t alone!
It was now time to get back to exploration of other frameworks, I had like 6hrs left before the initially scheduled launch time. I started searching frantically for all the alternatives, of all the options, one clearly stood out and also had a good reviews at most places. Enter BuddyPress, a plugin on top of WordPress, it seemed really promising, just to make sure that I was looking at the right thing, I pinged Gautam and described my use-case and asked for his suggestion on using BuddyPress for this. He has previously worked on bbpress during his Google Code-In stint, so it was assuring when he said, “Yup, all that’s there :)”. Now it was time to get the hands dirty, started off with the latest installation of WordPress and installed all the necessary plugins. Here’s a list of the installed plugins:
- BP Photos+tags
- BuddyPress Activity Stream Bar
- Buddypress Friends
- BuddyPress Like
- BuddyPress Mobile
- BuddyPress Moderation
- Private BuddyPress
- W3 Total Cache
- Frisco for BuddyPress [Theme]
I had to do a lot of customization, I had to create every users profile with pre-filled details available through the office automation portal, I also needed to hook the authentication mechanism so that CC login and password would get accepted, in doing so, I learnt so much about wordpress in 6hours that I hadn’t known for 4years! By the time the first prototype was ready, it was already couple of hours off the target, there were few more minor requirements, but since I was not-so-familiar with APIs of wordpress, it took me some time to get the thing up and running. The next major concern for me was the performance and stability of the site, Jay was the first to test the site and after his initial approval, I committed the changes and kick started caching mechanism with help of W3 Total Cache, a must have plugin for any busy site with limited computing resources.
It was a total hackday-ish experience while building & customizing the whole thing, I was continuously awake for more than 40hrs! All the while whenever the phone rang, I thought, oh no, not Kratika again, she is one of the batch co-ordinators who is officially responsible for this site, her continuous nagging is one of the reasons why this thing went online in such a short period, or else I would have got her call once in every 15mins :P. So all in all, at the end of the day, I have built a social-networking site with using all the opensource tools and packages with a bit of hack here and there for customization :). Hope this would help anyone wanting to do the same!
Ah, It just occurred to me that I don’t have much time left here now :(. Gonna miss IITK and my fabulous friends over here! Gosh!