functional programing

Spring Boot Webflux: The functional approach

With the world moving towards the reactive and functional ways of programming, Spring also turned its steps on the same path. This leads to the origin of Spring Webflux. To understand the functional approach towards it, we first need to understand, what is Spring Webflux exactly? Before Spring version 5.0, the original web framework included in the Spring Framework, Spring Web MVC, was built for Continue Reading

Monads: Are they really that complicated?

I have been working on Scala for around 2.5 years now, but still, feel that I have yet to explore a lot in this language. There are still a lot of topics unexplored. One such topic is Monads. I have heard and read about it a lot of times but never actually got a chance to explore it. Recently I came across the term and Continue Reading

Functional Interfaces In Java8

Hello readers, as you have visited here, you must be aware of Interfaces in Java. Before Java 8, all methods defined in an interface are public and abstract by default. After Java 8, there were certain enhancements in interfaces. Amongst all the enhancements in Java 8, one of them is “Functional Interface”. What are Functional Interfaces? In Java, the term functional interface refers to those Continue Reading

Back2Basics: Algebraic Data Types (ADTs)

To understand ADTs, firstly, we have to understand what is the meaning of the word “algebra“. Algebra Algebra is basically the study of mathematical symbols and the rules for manipulating these symbols. So, logically, an algebra can be thought of as consisting of two things: A set of objects The operations that can be applied to those objects to create new objects Numeric algebra Numeric algebra is the Continue Reading

Exploring the Real Power of Functional Programming

We have been programming with object-oriented technology for quite a while. But now we are moving away from it. Functional Programming is getting lot of attention nowadays. Even every mainstream language is now supporting functional style i.e Java, C++, C# etc. Basically, it is one of the paradigm of writing code where we write less code and do more. Why do we really care about Continue Reading

Getting started with ReactJS, Play 2.4.x, Scala, Anorm and WebJars

playing-reactjs This blog describes a basic example to render UI using React(A JavaScript library for building user interfaces) with Play 2.4.x, Scala, Anorm and WebJars. It also demonstrates the use of evolution in Play 2.4.x This is a classic CRUD application, backed by a JDBC database. It demonstrates: Handling asynchronous results, Handling time-outs Achieving, Futures to use more idiomatic error handling. Accessing a JDBC database, Continue Reading

Tutorial #3: Getting started with HTTP Programming in Play Framework

We have already discussed about the Play development environment in Tutorial #1 and use of WebJars, jQuery, Bootstrap & Bootswatch with Play in Tutorial #2 So, In this blog we would discuss about HTTP programming in 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 Continue Reading

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

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

FunHop: Working with Exceptions in Scala – Problem Statement

If you look at the earlier posts in the FunHop series, you would notice that Exceptions are side effects. Exceptions by their very nature also break referential transparency and are context dependent. You would have got an idea about referential transparency from our earlier post. If not, it might be a good idea to review it once. Let us consider the code sequence below def Continue Reading

ScalaKnol: Understanding Loan Pattern

Loan Pattern as the name suggests would loan a resource to your function. So if you break out the sentence. It would Create a resource which you can use Loan the resources to the function which would use it This function would be passed by the caller The resource would be destroyed As you would see, the advantages are multifold. First, I am not constrained Continue Reading

SICP Chapter 1 Solved with Scala

Ok, let us get the facts right. We have not provided solution to each exercise but the solutions that we have provided would be good for you to understand the concepts. It would also help you realize how efficiently we can use higher order functions in Scala. The Structure and Interpretation of Computer Programs (http://mitpress.mit.edu/sicp/full-text/book/book.html) is a seminal book which helps you reason and understand Continue Reading

Knoldus Pune Careers - Hiring Freshers

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