Skip to main content

Posts

Showing posts from April, 2017

Introduction to Play Framework

Play Framework makes building web applications easier with Java & Scala. It is lightweight and in a web-friendly architecture. Play is a RESTful service by default, and built targeting modern web & mobile. REST stands for REpresentational State Transfer. For a great admiration, Linkedin uses Play framework in their infrastructure. We are going to create a simple Registration & login mechanism using Play Framework to understand about it. Note that we are not going to create a database or any permanent storages, so that your registration details can be used in login only until the current run is not stopped. 1. Setting up the environment I've used the following, in developing this login form Java Development Kit 1.8.0_121 ( http://www.oracle.com/technet work/java/javase/downloads/ index-jsp-138363.html ) IntelliJ IDEA 2016.3.3 ( https://www.jetbrains.com/ide a/#chooseYourEdition ) Scala plugin 2.12.1 installed ( https://www.scala-lang.org/download/ )

MVC Design pattern

MVC stands for Model View Controller. This is a popular, and a useful design pattern. I'm coming up with simple explanations, for this very famous design pattern. What is MVC? If you breakdown any software, there will be 3 components in common : 1. Data (We are going to call it Model ) 2. Interface to view or edit the data (View ) 3. Functions that are performed on data (Controller) Why MVC? Any software is likely to be developed in a very dynamic way : in order to maintain re-usability. Your client (or lecturer - who gave you the assignment/coursework maybe) might be adding modifications to the initial requirements, so that you will have to revise the code so many times. Even if the requirement is just a minor change, improper coding style might lead you to several changes that occur like a chain.  Sometimes you might have to create the logic, whereas another person (or a team) is working on the UI. You will not know how will the UI look like until it is final