Code Quality

Google reCAPTCHA: Basic example to integrate Google reCAPTCHA in Play Application with the help of play-recaptcha module

Reading Time: 2 minutes Playing with Google reCAPTCHA Basic example to integrate Google reCAPTCHA in Play Application with the help of play-recaptcha module Play reCAPTCHA Module This is a Play Framework module, for Scala and Play 2.x, to provide integration with Google reCAPTCHA (version 1 or 2) in a reactive (non-blocking) manner. Used Play reCAPTCHA module to integrate Google reCAPTCHA API Embedded JS & CSS libraries with WebJars. Integrating Continue Reading

Tutorial #2: Using WebJars, jQuery, Bootstrap & Bootswatch with Play application

Reading Time: 2 minutes We have already discussed about the Play development environment in Tutorial #1. So, In this blog we would set up the WebJars, jQuery, Bootstrap & Bootswatch with Play Framework which would drive us through rest of the tutorial series. We would be running this blog as a series and we would be looking at various aspects of play with this blog. In this tutorial we Continue Reading

Playing MultipartFormData: A basic example to handle and test MultipartFormData request in Play Framework 2.3.8

Reading Time: 2 minutes Playing MultipartFormData The following blog and attached code represent an example to upload file using MultipartFormData request and Testing it into Play Application. A basic example to handle and test MultipartFormData request in Play Framework 2.3.8 The standard way to upload files in a web application is to use a form with a special multipart/form-data encoding, which lets you mix standard form data with file attachment Continue Reading

Dribbling with Filter.js: client-side JS filtering of JSON objects

Reading Time: 1 minute Dribbling Filter.js Play framework with client-side JS filtering of JSON objects and rendering HTML snippets via jQuery. Big chunk to display? Interactive filtering? Most importantly it has to be really fast. Isn’t it like dribbling against Netherland! Big ground, lots of hooting and most importantly have to be fast and win   UI programming is an exciting ground to play, That’s why i chose reactive platform Continue Reading

A simple CRUD application in Play! Framework using Kundera and Cassandra as a Database.

Reading Time: 1 minute playing-kundera-cassandra: This is a classic CRUD application, backed by Play 2.3.0, Kundera & Cassandra. It demonstrates: Accessing a Cassandra database, using Kundera. Achieving, Futures to use more idiomatic error handling. Accessing JS & CSS libraries by WebJars. Bootswatch-United with Twitter Bootstrap 3.1.1 to improve the look and feel of the application Instructions :- The Github code for the project is at : playing-kundera-cassandra Clone the project Continue Reading

Classic CRUD application in Play Framework 2.3.0 with ReactiveMongo, WebJars and Bootswatch-United

Reading Time: 1 minute Play 2.3.0 application with ReactiveMongo – reactive, asynchronous and non-blocking Scala driver for MongoDB. This is a classic CRUD application, backed by a MongoDB database. It demonstrates: Achieving, Futures to use more idiomatic error handling. Accessing a MongoDB database, using ReactiveMongo. Achieving, table pagination and sorting functionality. Replaced the embedded JS & CSS libraries with WebJars. Play and Scala-based template engine implementation Bootswatch-United with Twitter Continue Reading

Knolx Session : Static Analysis of Scala Programs

Reading Time: 1 minute This presentation talks about Static Analysis of Scala Programs using Soot. Talking about Soot, it is a java library which is used for static code analysis. This helps developers to add quality to their codes. Here you get an idea of what Soot is and the very importance of Static Analysis.

Building Quality into Scala Development

Reading Time: 3 minutes The argument and debates regarding writing quality code have mostly rested in the favour of writing clean code. Cleanliness fosters quality. Clean code is straightforward, direct, reads like a story and makes it very understandable. As a rule that we have at Knoldus, if your code does not read like a story and we have to interrupt in between to understand wtf is going around Continue Reading

Code Smell : Primitive Obsession

Reading Time: 2 minutes Primitive Obsession is when the code relies too much on primitives. What this means is that a primitive value controls the logic in a class and this primitive value is not type safe. For example, there are multiple situations in which we might consider the use of String for comparison and driving the logic even though we are fully aware that it might result in Continue Reading

Respecting Open Closed Principle with Visitor Pattern

Reading Time: 3 minutes One of the common principles in the bouquet of SOLID principles is the Open Closed Principle (OCP) which states that software entities should be open for extension but closed for modification. This means that if we have to add any new functionality then ideally, we should be able to extend the current set of software entities by adding a new entity rather than creating a Continue Reading

Long Method? Move Accumulation to a Collecting Parameter

Reading Time: 2 minutes You would have definitely come across long bulky methods which accumulate information to a local variable and pass back that information. Here the local variable goes through a lot of changes throughout the logic of the method before it is finally returned back. Let us see how the combination of compose method, that we covered in the last post, and moving accumulation to a collecting Continue Reading

Long Methods? Try Compose Methods

Reading Time: 2 minutes We all have seen long winding code that goes on and on. By the time you have hit page down a couple of times, you forget what the method was doing. You forget because the method is doing a lot. It is failing the SRP principle and needs to be broken down into smaller pieces. According to me if you are looking at a method Continue Reading

What is the Correct Caching Strategy?

Reading Time: 3 minutes While uncovering ways to speed up our application on the Google App Engine, we decided to use Memcache. This led us to an interesting discussion which I am reproducing here to get your inputs. As you would observe, if you are following our blog, that there are 2 potential ways to cache, invasive and non-invasive. May be there is a third way which you would Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!