Get the Blog Updates

Scroll to Top

To Top

Introduction to Sidekiq
Sidekiq gem is used to move long running jobs to background for asynchronous processing.
It is more efficient, with respect to memory usage, than delayed_job and Resque as it uses threads instead of forks.

Need of background process
For example, in a mailing application you need to send emails to a large list of recipients. It will take large time to process with the large list of recipients, which is too long for a User to wait for a response after clicking a link. So, it's better to move the long running task as the background process by using Sidekiq gem.

Backbone.js is a popular open source JavaScriptframework that allows us to develop single page web application. It offers a MVC framework for organizing Javascript application.
What is Backbone.js?
Building single-page web apps or complicated user interfaces will get extremely difficult by simply using JQuery alone. Because JavaScript libraries are great at what they do, without realizing it you can build an entire application without any formal structure. Whereas Backbone.js is a lightweight framework that allows us to create single page applications in a structured manner. Backbone.js enforces that communication to the server should be done entirely through a RESTful API. The web is currently trending such that all data will be exposed through an API, because the browser is no longer the only client, now we have mobile devices, tablets and electronic fridges etc.

"The journey of a thousand miles beginswith a single step ” - by the Chinese philosopher Laozi

Most of the people have heard about the data warehousing but they donot have fair idea about what exactly is achieved by doing this. As a business owner, whether you need it. You can be in a better position to take a decision once you know the power of Business Intelligence & Dataware-housing.

Let's say you are a small/mid-sized organization, and you want to have some reports to have in-depth view about how your business is doing. There may be any or some of the reasons below:

Sometimes we are unaware of unknown complexitiesin our Rails code and it gets messy. Moreover, it reduces application performance, scalability and maintainability.

Metric_fu is a set of rake tasks and compilation of several different tools that provides reports. This show which parts of your rails code might need extra work. It uses the following built-in tasks to create a series of reports. Rcov – Measures test coverage Flog – Measures code complexity Saikuro – Measures cyclomatic complexity Flay – Finds duplication (both copy/paste and structural) Reek – Spots code smells Roodi – Finds lots of general problems Churn – Identifies files that changes too often Rails best practices - code matric tool Cane - code quality threshold violations HotSpot - Meta analysis of your metrics to find hotspots in the code

“Rails” is an amazing framework to developweb apps quickly with its inbuilt helper libraries. However, there are certain best practices that should be followed for better app performance.

Most developers love to place the logics inside the controller and use the model for the Active Record operation only.

You should do minimum security checks beforereleasing the rails app to the public. The possible threats could be hijacking user accounts, manipulate access control, accessing sensitive data, doctoring with garbage contents. You should act proactively to protect your valuable information. Here you go with some useful security tips which you cannot ignore. Courtsey,:Ruby on Rails Security Guide. Don't trust logged in users (Authentication != Authorization) Always check whether the current logged in user is allowed to perform operation like create, update, delete and view. Devise, a library which handles authentication, to verify that you can only get to the destroy action if you’re logged in. However, Devise does not handle authorization. Apart from authentication authorization must be checked prior to allow any data sensitive operation.

Finally, the most awaited Rails 4.0 versionhas been released by the Rails team on 25th of June. Rails 4 has got huge changes.

There are tons of new features available, which can make your life as a Rails developer a lot easier. We will talk about the most exciting features in Rails 4 and why you should upgrade.

Most start-ups and established enterpriseshave evidently landed to the conclusion that, Ruby on Rails is the best option for rapid and cost efficient web app development.

‘Rails’ is an open-source, multilevel web app framework that implements MVC development architecture, for the Ruby programming.

Puma is a multi-threaded high performanceweb server written in Ruby. Currently it is very popular in market as a ruby application server.

We can use it for any ruby web app that supports rack. Here, I have mentioned detailed steps to help you configure Rails application with Puma and Nginx on CentOS.

A feed is a data format which is used toprovide frequent updates and latest contents to the users.

A feed has no particular type; it could be news, latest technology, game, gadgets, sports etc. These feeds can be easily parsed into your Rails application to make it more useful for the users.

How to create dynamic sitemap in Rails?
By Srikant M.

Ideally a website should have all the pageslisted in the sitemap. However, in some cases, developers missed out to add newly created page links to the sitemap.

For this reason the sitemap is inconsistent and leads to the most common “404-not found” error in Rails app.

Devise is an authentication solution forRails application development. Since devise is an engine and all the files created by it are packaged inside the gem.

We need to invoke some generators in order to customize it.

‘Bullet’ is a ruby gem which facilitatesthe developers by alerting when an application performs an inefficient database query, such as an N+1 query.

It is one of the most efficient tool to optimize a Rails application. This example illustrates method of optimizing a query.

“Kaminari” is a clean, powerful, customizableand sophisticated pagination for the modern web applications.

Here we have to bundle the gem and the models that are ready to be paginated and no extra configuration is required for the process.

Backbone.js is a great way to organize clientJavaScript code into MVC pattern that Rails server application uses.

Just like in Rails, It has models to represent data, views to render the data and controllers to coordinate between the two. It also has an object called "collection" which manages a list of models.

“delayed_job” is a ruby gem which isused to run the tasks as a background process in Rails environment.

Delayed::Job (or DJ) is used to asynchronously execute longer tasks in the background. For example, a mailing application needs to send emails to a huge list of recipients and it is obvious to take a longer time while processing such large lists. Is background process really that important! Let’s consider a scenario where a mailing application needs to send emails to a huge list of recipients. In such cases it is obvious to take a longer time while processing such huge lists. This way, the processing time gets too long, which is annoying for the users. Hence, it would be wise to move the long running tasks as a background process by using “delayed_job” gem.

How to install Devise in Rails 3.x
By JayDee

Devise is a flexible authentication solutionfor Rails based on Warden. Devise handles authentication across the entire stack.

It is composed of 12 modules. Here are the steps to install Devise in Rails 3.X

Amazon S3 provides a simple web servicesinterface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.

While uploading a file to S3 we need to check whether the file exists to avoid any data duplication. Here are the following steps to check the presence of a file.

In 18th March, Ruby on Rail released fournew versions along with fixes for a number of vulnerabilities, which could have lead to denial of service attacks and XSS injections.

According to a post in company’s blog a total of 4 vulnerabilities were addressed in version 3.2.13, 3.1.12 and 2.3.18 of Rails.

Rails is an innovation in development framework. It encompasses all the necessary elements to boost a web application’s performance.

This framework is designed to address agile development and deliver productivity as well as flexibility to RoR developers.

Copyright © 2009-2014 Andolasoft. All rights reserved.