Memoization is a wonderful concept in programming world. It helps in writing clean code which execute faster. Example: def slow_method @result ||= perform_slow_method end In the above code, slow_method will cache perform_slow_method in @resultvariable, therefore perform_slow_method will execute only once. So, if memoization is wonderful then why not to use it always? that’s the question I am going to answer … Continue reading Learn Where The Usage Of Memoization In Ruby On Rails Is Limited
blog
Mockito: An Unit Testing Framework
Mockito is a Java based mocking framework most preferred with the Junit testing framework. It internally uses Java Reflection and allows to create dummy objects of service. Mockito is a very useful tool that simplifies the test case creation by creating mock/dummy object of external dependencies this dummy data will later apply with mocks into … Continue reading Mockito: An Unit Testing Framework
It’s Time To Secure Your Way Of Doing OAuth For SPA & Native Apps
When clients like mobile, desktop, single page applications allow the user to sign-in using a third party application (google, facebook, twitter etc), one of the first choice is to use OAuth 2.0 standard with authorization code flow. In Authorization code flow, authorization request is made via browser and an authorization code is returned to the … Continue reading It’s Time To Secure Your Way Of Doing OAuth For SPA & Native Apps
