Play framework

Hands-on read JSON data from any external API with Scala

Reading Time: 3 minutes Hi folks, In this blog, we will write HTTP server + client code which calls the below external API using Scala and play framework Project Setup We must install the SBT command-line tool (at least JDK 8). In this blog, we’re using SBT version 1.7.1 to install Play Framework version 2.8.1. Step 1: First, we need to add some dependencies in the build.sbt file. Step Continue Reading

Let’s Have A Look At MVC (Model View Controller) Architecture

Reading Time: 3 minutes MVC Architecture or Model View Controller Architecture is an architectural pattern where the application is separated into three important parts: The model part, the view part, and the controller part. Nowadays this Architecture is widely used to develop mobile and web applications. If you are interested in web development or mobile application development then this blog can help you to know about the basics of Continue Reading

Introduction to Play Framework in Scala

Reading Time: 3 minutes In this article, we will familiar with the Play Framework and figure out how we can use it to create a web application. Play Framework is a Light Weight, Stateless, Asynchronous, Highly Scalable, Non-Blocking, and REST API-based Modern Web applications development framework. It integrates the components and APIs we need for modern web application development. Play Framework Features Hot Reloading saves development time RESTful by Continue Reading

Kick-start to a Play Framework

Reading Time: 3 minutes Hello everyone, welcome to my blog 🙂In this blog we’ll get familiar with some basic concepts of play framework. Play is a full-stack framework with all of the components you need to build a Web Application or a REST service, including: an integrated HTTP server, form handling, Cross-Site Request Forgery (CSRF) protection, a powerful routing mechanism, I18n support, and many more. Why Play? Its Model-View-Controller Continue Reading

Ethereum Networks

Introducing Infura: Connecting DApps with Ethereum Network without setting up Ethereum Nodes

Reading Time: 3 minutes   If you’ve been working on Decentralized applications based on Ethereum, you might have come across setting up the Local Ethereum Node or your own private Ethereum node to test your application. In my case, Setting up Ethereum nodes and connecting dApps with it has been a problem for me for the following reasons: If I use any of the Ethereum clients (geth or parity) Continue Reading

Stream a file to AWS S3 using Akka Streams (via Alpakka) in Play Framework

Reading Time: 5 minutes In this blog post we’ll see how a file can be streamed from a client (eg: browser) to Amazon S3 (AWS S3) using Alpakka’s AWS S3 connector. Aplakka provides various Akka Stream connectors, integration patterns and data transformations for integration use cases. The example in this blog post uses Play Framework to provide a user interface to submit a file from a web page directly to Continue Reading

Streaming data from PostgreSQL using Akka Streams and Slick in Play Framework

Reading Time: 4 minutes In this blog post I’ll try to explain the process wherein you can stream data directly from PostgreSQL database using Scala Slick (which is Scala’s database access/query library) and Akka Streams (which is an implementation of Reactive Streams specification on top of Akka toolkit) in Play Framework. The process is going to be pretty straightforward in terms of implementation where data is read from one Continue Reading

Internationalization with Play Framework(2.6.x)

Reading Time: 2 minutes In this blog, I will demonstrate how your application can support different languages using Play Framework 2.6.0    What is Application/Website Internationalization ?   Application/Website Internationalization can be defined as a process of developing and designing an application that supports not only single language but also different languages so that it can be easily adapted by the users from any language, region, or geography. It ensures that the code base of your application is flexible enough Continue Reading

Integrating Play app with Lagom application

Reading Time: 2 minutes What is Lagom? Simply put, it is a microservices tool. Lagom is a microservices framework that guides developers in moving from monolithic to a scalable, resilient microservice based systems. It is a platform delivering you not only the microservice framework but also a whole tool set for developing applications along with creating, managing and monitoring your services. According to Lightbend the focus should not be Continue Reading

Gatling Integration with Play

Reading Time: 2 minutes I have started working on a project which require stress testing using Gatling. I Setup the sbt project on which gatling is working fine. But when I try to integrate it using play framework, it doesn’t work. The project structure for both are different so it doesn’t work for both the project in the same manner. Your build.sbt should be  like this: import _root_.io.gatling.sbt.GatlingPlugin import Continue Reading

Frontend to Backend: Everything is on Scala using Play, Scala.js and ScalaCSS

Reading Time: 2 minutes In my previous post, I tried to create a pure front-end application using Scala.js and ScalaCSS. So that we can build our front-end also in a typesafe way. But there was no server interaction. This time I have tried to make server interaction using play framework. Since this application is about Weather Information System, so I am  hitting a third party api to get weather Continue Reading

Multipart/form-data submit through javascript in Play Framework

Reading Time: 2 minutes Normally when we submit any multi-part form in Play Framework that time in the controller have to mention redirection action which  refresh the whole page and it gives an extra load on the network. It is possible to submit that form with the help of Ajax. It makes easy to submit your form and help to refresh only that particular section where you want to Continue Reading

S3Ninja an Introduction

Reading Time: 2 minutes S3Ninja is an emulator that emulates the S3API. S3Ninja provides an environment for your local system to support integration of upload a file, just as we do on S3. Currently it supports objects methods only like GET, PUT, HEAD, DELETE. S3Ninja can be used, to upload file on our local system instead of S3 to write integration tests that may integrate with upload of file Continue Reading