Rails 4 “Routing Concerns”

Today, while digging routing guides of Ruby on Rails, I spot this new feature which is available in Ruby on Rails 4. Routing Concern is a wonderful concept of re-using routing definitions. I just love how Rails try to reckon on DRY principle. I’ve worked in a project where routes.rb has about 50 lines of definition while the project was progress not more than 20%. There were many similar routing definitions in different scopes (namespaces). Routing Concerns will now enable us write less codes to define application routes.

I’m not going to show how to use it as Rails guide already did the job. I’m simply copying the codes over here.


I’ve also found this blog shared on facebook by one of my friend

Amistad – Facebook like friendship management in Ruby on Rails

Today I’ve decided to write something about the Ruby Gems that I used. So I’ve started this series (Ruby Gems). This is the first post of the series. I will try to write regularly.

When I was working on my pet project MovieMates, I needed to implement a friend relationship. Initially, I was going to do it myself. However, later I thought I should, at least, google a bit to check if there is already some similar solutions. Then I found Amistad.

The current version of Amistad supports ActiveRecord 3.0.x, Mongoid 3.0.x and MongoMapper 0.12.0.


Add following line to your Gemfile

gem 'amistad'

Continue reading →

My experience with phpXperts seminar 2010

phpXperts Seminar 2010, is my third program with phpXperts. Other than phpXperts programs, I have also joined in other programs like Facebook Developer Garage, SQABD Lightning Talks etc. However, this one is exceptional to me as I was one of the speakers in this session.

My initial gratitude goes to Hasin Hayder, who tried hard for first speakers like me. He even advised me about my topic “HTML5 – Web is getting sexy”! Continue reading →

Facebook Like button for PunBB forum

Facebook likeFacebook like button is a component of its social plugins. It is a great tool of driving traffic to your site. Mashable has a report of increasing referral traffics by 50% by using this Like button.

Considering it as a good tool to drive traffic, I have developed a tiny extension for PunBB bulletin board. When you install this extension, you will find a Like button at the top of Topic View (viewtopic.php). It will also show number of persons liked the topic. Continue reading →

“Reply to email…” most idiot feature of Facebook.com

Few days ago Facebook.com introduces a new feature “Reply to this email….”. To me this is the most stupid type feature of Facebook. Usually I get two types of email, i. when someone comments in my photo ii. when someone replies in my status.

1. Comments in my photo

Facebook sends me the comment as email and I can read it right from inbox rather than visiting the facebook. So, facilitate the conversation, Facebook now allows us to reply the comment by simply replying this email. This is the template of email

Foisal commented on a photo of you:

“some member is missing….sorry…. ;o( ”

New Feature: Reply to this email to comment on this photo.

To see the comment thread, follow the link below:

LINK TO PHOTO (Removed for Privacy)

The Facebook Team

Isn’t it a nice feature? But how do I know which photo is this? Suppose, someone asked me place of the photo like:

“Nice shot, where it is?”

Can you now tell me how you can answer without visiting the site? I don’t know which image, s/he commented on. So, I can’t reply without visiting the site and seeing the photo.

Suggestion: They should include image name and description in the photo and a thumbnail of image.

2. Comments on my status

When someone comments on my status, I also receive an email alert (as per my mail preference). But again, I don’t know on which status s/he commented. This is the template:

Sajjad Hossain commented on your status:

“Allah shohay hok!”

New Feature: Reply to this email to comment on this status.

To see the comment thread, follow the link below:

The Facebook Team

I don’t know what was my actual status and can’t comment by simply replying email.

Suggestion: Facebook should include original status in email.

Technical session on ‘Facebook Application Development’

Yesterday evening, I have participated in a technical session titled “Facebook Application Development” at BASIS SoftExpo 2010. The session was taken by legendary PHP engineer and founder of Leevio, an Social Networking RnD startup, Hasin Hayder.

During the session, the speaker has tried to elaborate the fundamental steps of facebook application development that will show the light to the novices those are interested about facebook application. He also showed ,step by step, a sample facebook application development process.

The whole session was entertaining and useful.

The presentation slide can be downloaded from his blog or directly by clicking here.

Facebook Developer Garage Dhaka

Yesterday, I have participated in an event titled ‘Facebook Developer Garage Dhaka’ which was organized by Infra Blue Technology and powered by Intel. That was an awesome event. About six speakers presented their speech on various topics related to facebook development. The presentations include ‘Introduction to Facebook Platform’, ‘Facebook Connect – experience on iphone’, ‘Facebook Open Stream API’, ‘Building scalable application in facebook platform’, ‘Monetizing facebook application’.

Building scalable facebook application and monetizing facebook application captured most attentions of the audience. I have enjoyed the session very much.

Thanks the organizer for such a wonderful session and for the gift pack and the delicious dinnar ;).

Best contacts importing script written in PHP

All you know letting visitors/users invite their contacts is one of the cheapest but proven way of marketing. We can get it by placing a contact importer script in our site and requesting users to invite his/her friends by providing email address and password. The script will then contact the server and download contacts from the address book and finally will send a custom or preformatted email to bring them to our site.

But problem is the cost of such importer script. More than one year ago I have purchased such a script most probably at US$30. It can import from popular email services like Yahoo, Gmail, MSN etc. Later I have found some other scripts that can download contacts from a few more sites.

But throwing all them behind, lately I found the most fabulous, most fantastic, most robust and cheapest contact importing script titled “OpenInvite”. If may not believe the previous sentence until you visit their website. It can import contacts from nearly all major email services and social networking sites. I have counted about 48.  Continue reading →