Clean code

AWS Services: AWS SDK on the Scala with Play Framework

Reading Time: 3 minutes playing-aws-scala The following blog and attached code represent a simple example of Amazon Web Services in the Scala way with Play Framework using AWScala but in this blog I have implemented only Amazon Simple Storage Service (Amazon S3) functionalities. AWScala: AWS SDK on the Scala REPL AWScala enables Scala developers to easily work with Amazon Web Services in the Scala way. Though AWScala objects basically Continue Reading

Playing JSONP : A basic example to integrate JSONP mechanism in Play Application with the help of play-jsonp-filter module

Reading Time: 3 minutes Playing JSONP Basic example to integrate JSONP mechanism in Play Application with the help of play-jsonp-filter module play-jsonp-filter This filter enables JSONP on your existing API: any resource that returns a JSON content will return a JavaScript fragment if there is an additional callback parameter in the query string. For example, if the resource /foo gives the following JSON result: {“foo”: “bar”}, the resource /foo?callback=f Continue Reading

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

Tutorial: AJAX calling in Play Framework 2.3.4

Reading Time: 5 minutes In this tutorial we will discuss about the following topics of AJAX calling in Play Framework 2.3.4: Generating a Javascript router Embedded router Router resource Use of Javascript router jQuery Ajax Success/Error handler for each router Single Success/Error handler for all routers

And you thought the App trait is just a convenient way of creating an executable Scala program

Reading Time: 3 minutes Ok,  Let’s start discussion about the App trait uses in our code segment. Here I will try to demonstrate some use cases for the better use of App trait in our Scala code. To read more about the App trait you can refer to the documentation here Let’s go with our daily uses of App trait 🙂 Just want to print something on console: object 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

FunHop: Understanding Referential Transparency

Reading Time: 3 minutes In this episode of FunHop, we would try to look at what is Referential Transparency, what is substitution model and how being immutable really helps. Referential transparency means that we can exchange the expression by its value or a value by the expression and nothing changes. Pure functions are referentially transparent. Any function f(a)=b is a pure function if for the same “a” we end 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

Play Framework 2.2 with WebJars client-side web libraries

Reading Time: < 1 minute WebJars are client-side web libraries (e.g. jQuery & Bootstrap) packaged into JAR (Java Archive) files. WebJars can be added as dependencies to an app by simply adding them to the build.sbt file. There is also a helper library named webjars-play that makes it easy to reference WebJar assets. Here is an example build.sbt file with webjars-play and the bootstrap WebJar as dependencies. Do the following Continue Reading

Employee-Self-Service: Reactive and Non-Blocking Database Access using Play Framework and Anorm – (Part-4)

Reading Time: 2 minutes Last week, We have added Database Access as Reactive and Non-Blocking behaviour in Employee-Self-Service  application. Now we have added some more features. These are following: Achieving, Futures to use more idiomatic error handling. Replaced the embedded JS & CSS libraries with WebJars. Achieving, table pagination and sorting functionality. Before: def list() = Action.async { implicit request => val futureEmpList = scala.concurrent.Future { Employee.list } val timeoutFuture = Promise.timeout("Oops", Continue Reading

Knoldus Pune Careers - Hiring Freshers

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