After searching and digging a lot of artciles about improving jquery performance in web apps, I decided to make a list of best common performance tips and bect practices. We’ll also reveal some of JQuery’s hidden feature and how we can use them for performance tuning.
Documentation suggests to use a global variables. So we create one with a new redis instance.
Then, we create rollout instance passsing that redis instance. We can configure rollout in many ways, here we are defining an admin group by passing a block and checking whether the user belongs to that group or not.
Complete documentation can be found here.
Next, we can now use handy rollout method like for example let’s say we need to activate chat feature for admin group only.
Objects and Classes
To create a new instance of an object new operator.
Active Record is the main tool that Rails developers use to communicate with and underlying database. Active Record does some wonderful things for a web developer looking for abstractions in database setup, SQL connections and queries. We can get a cool command line Ruby application or utility script for our daily tasks using Active Record going in about 5 minutes!
First of all, get the activerecord gem using
gem install activerecord
At the top of Ruby program we need to require the Active Record gem previously installed. Interacting with your database will be a pleasure now!