I spoke at Agile India 2015 in March. Excellent conference but I was a quite disappointed that the videos are not publicly published. So, I decided to write about it here in detail. The slide deck has been published at on slideshare But here goes the picto-blog. This is an experience report - the story of … Continue reading Don’t test your code
blog
Things To Remember While Working With Uniqueness In Rails
validation_uniqueness_of does not guarantee uniqueness. Interesting write-up by Yogesh about things to remember while working with uniqueness in Rails.
How The Use Of Service Classes Enhances Code-quality
Good post from Rishi on how to refactor code into Service Objects to improve code maintainability and quality.
Learning shall never stop..!!!
ServiceClasses are nothing but plain old ruby classes. But they go a long way to keep your controllers thin and models thin. To show what I mean by this, lets look at some code. This is the code in controller to download data following some set of rules.
This is bad. The controller should not look like this. Comes in Service classes.
The ideology behind service classes is that it should have only one purpose to serve and nothing else.
And I can clearly see a purpose which our new service class should serve and that is to provide the data for our template download and nothing else. I keep the service classes under app/services folder. Also I do not think I need to iterate much on the importance of the name of the service class you choose. It goes without saying that the name should tell the purpose it…
View original post 237 more words
