Swish

Make smart shopping decisions


(Note: Swish is a private repository. Please contact me if you want more info) Screenshot of the repository can be found here

Welcome to Swish.

This is the github page for Swish and is for people who wants to know more about what I am using to create Swish. This article talks about what gems are used, what resources are used to deploy swish and my thoughts about some of them.

Resources used

The application is deployed on Heroku. Why Heroku? You get a Free account. Developers love free stuff. The default data store on heroku is PostGres. So, I have no other choice but to use it. I did not face any problems till now though. AmazonS3 is used for file storage.

Want to know how to integrate AmazonS3 with heroku for your rails app?

I am using Redis, but did not commit it to Git yet. So, I am not going to write anything on it.

Gems

Gems play a very important role in the popularity of Ruby on Rails. Ruby community is awesome. Just awesome!! The community provides so many gems for all the commonly done tasks which makes me think, if you can make some compromises, and have enough time to search, you can almost write minimal to no code to develop the commonly used features.

Gems Used

I have used so many gems in the project. I am classifying them based on the features they provide to my application. They all made my life easier and made me write code quicker. So a big THANK YOU to all the authors.

GOD OF ALL

Rails - If you are reading this, you know this gem..!

General Features

This section covers gems which can be used by majority of the Ruby on Rails apps. They are very easy to integrate and use.

  • Devise - Awesome gem for authentication. Can be used with Omniauth.
  • Omniauth - Gem to integrate Facebook/Twitter authentication into your app
  • simple-form - Same guys who wrote devise also developed simple form. As the name says, this is used for creating beautiful forms.
  • jquery-rails - Yay.!! Can use jQuery with rails
  • pg - Using PostgreSQL Database in your application. Heroku uses postgres so, I am using postgres as well. You can definitely use different dbs.

Social Features

These gems are used to develop social features in the project

  • Thumbs-up - Want to implement likes? voting? up's? +1's? this is the gem for you.
  • acts as taggable on - Create tags? This is the gem. Very easy to implement as well.
  • acts as follower - Implement follow? This gem allows you to implement any object following any other object in your application.

You must be thinking, where are comments? I wrote the whole comments module my self.

Gamification

There are so many gems for gamification. But then I used on gem especially, 'Gioco'

  • Gioco - Gamification gem. Why this? I think this is very flexible can be modified as needed and the gem suits my requirement very well.

Image Meta Data

I wanted to read the meta data of each image that is being uploaded and used it to create/manage certain records.

  • Exifr: Very good gem to read the image meta data. Suggested him on how to support open-uri (was also suggested by one more developer). But the author doesn't want to support it, as he want to maintain the essence of the gem to just read the EXIF data of JPEG and TIFF. But I got mine working to support Open-Uri, not too bad.

What to log user activity?

  • Impressionist: This gem is used to log user activity. You can set the actions that you want to log. Very useful in calculating page clicks, user activity, and whole bunch of stuff to finding trends, popularity etc.
Handle Geo Location Trends?
  • geocoder: This gem in conjunction with data from impressionist, can create some interesting data for analytics, trends etc

Others

These are bunch of other gems which are optional, but very important to make your life lot more easier

  • aws-sdk: This is the gem to install if you want to use Amazon web services. I am using this for AmazonS3 for my file storage.
  • paperclip: Awesome gem for uploading files. Any kind of files. Very easy to use. If you know what a real gem is, this thing works as a gem.
  • rails-backbone: Backbone.js in rails. This gem creates a very good folder structure for you to organize your code and adds backbone.js to your project. Not necessary, if you want to maintain your own code structure. But, this is good.
  • json: Want to handle/create custom json? This is the gem you will need
  • will-paginate: Who doesn't like automatic pagination in a shopping app. This gem helps you handle pagination in your app.
  • sass-rails: comes by default with rails. sass is cool. Helps you write better understanding css for your page. Imagine a hierarchical divs, and how cool can it be if you can write CSS in the same hierarchy style. This lets you do it.
  • bootstrap-sass: Last but not the least, this is the sass powered version of twitter's bootstrap.

Want to know more?

Please email me on n.yashodhar [at] gmail [dot] com