Tag Archives: play


Getting Started with Play Framework : Ubuntu/Linux Mint

What is Play Framework ?

Play Framework is a simple and powerful web development framework for Java/Scala. It’s very inspired from Ruby On Rails framework, so it’s like Rails, but for Java/Scala (initially it supported only Java, but now it also supports Scala (a programming language, very similar to Java, with some functional features, designed to be as a better Java)). Unlike other complicated java web development frameworks, Play is very simple and highly productive.


Play is a lightweight, fast and highly scalable web development framework, with web friendly architecture and features (stateless, low resource consumption, reactive model based on Iteratee IO etc). So if you’re a Java/Scala developer, who want to develop cool web applications – then Play is a great choice for you.

Installing Play Framework

You must have Java installed (JDK 6 or later), read this tutorial on installing JDK in Ubuntu / Linux Mint if you haven’t already done that. When you’re done setting up java development kit, open a terminal and type javac to make sure everything is setup properly.

Download Play Framework

Download the latest version of Play (currently, it’s v2.1.0) and extract it to your Home Directory (it can be anywhere, but you should have write permission).

Set Path Variable for Play

Add the play to your path variable. Suppose, you have extracted the play framework to ~/packages/play-2.1.0 directory. Then open a terminal and type :

export PATH=$PATH:~/packages/play-2.1.0/

Now, if you type play at the terminal, you should have play command available.


Creating your first app

Now, you have successfully installed the play framework – Let’s create a simple application “TestApp” (it will simply say : “Hello Play”, not any useful, but you get an overview).

play new TestApp

Now, it will prompt for few questions (Application Name, Java/Scala etc), then move into the application directory and start the application.

cd TestApp

Now, you will have the play prompt, So you can run the application –

[TestApp]$ run

Open your browser and type the address http://localhost:9000, the default page should appear.


Now, open the file App/Controllers/Application.java in your favorite text editor (Emacs, Vi, gedit etc) or IDE (geany, Eclipse etc) and replace the existing return line (in index method) with this :

return ok("Hello Play");

Now, visit the address http://localhost:9000 (or refresh if it’s slready loaded) and you should see the “Hello Play” greetings. Yeah! our first useless app is running :)


Recommended Resources For Further learning!


Play – (Web Development) Framework version 2.0 Released!

Play Framework – A Web Application Development framework for Java/Scala Programmers with the taste of Ruby on Rails. So you can easily create High performance and scalable web application in a fun way (unlike the java way which is supposed to be sophisticated and fun-less) – much like Rails. So if you are already familiar with Rails then it would be a great advantage for you, additionally, in the new version of Play (i.e Play 2.0) you can code either in Java or Scala.

So Play is recommended for Java programmers who want to be more productive while developing Web Applications, specially those who got stuck in JSP/Servelet box. It’s a whole new world, optimized for the programmers happiness (borrowed from Ruby on Rails). The deployment of Play Applications are now much easier, you can easily deploy our play applications to cloud, the official TODO list tutorial explains well about deploying a simple Play Application to Heroku.


Features of Play Framework

  • Lightweight
  • Fast
  • Stateless
  • Optimized for resource consumption
  • scalable
  • Reactive Model (Event Driven, non blocking IO)
  • Highly Productive
  • It’s Fun!

Download Play Framework 2.0

Recommended Reading(s)

  • PlayFramework.org – go to official site for more details about the API, Documentation etc.
  • Scala – Wikipedia page explaining about Scala programming language

How to Play ARF file on Ubuntu 10.04-Linux

Play ARF file by Converting them to mp4
ARF i.e Advanced Recording Format is a format recorded by NBR(Network Based Recording).For Ubuntu or other Linux versions currently no player is available which can play .arf files i.e WebEx(Player used to play and convert arf and wrf formats) is not supported on Linux based system or Ubuntu 10.04.That’s why to play arf file only one option is available and that is to convert the arf format to mp4 or swf or other simple formats.So you can use a converter tool “NBR2MP4” to generate mp4(That we can play Using VLC player) file from arf.
Playing ARF format by converting them to mp4 : Ubuntu 10.04 ,Linux based systems

NBR2MP4 is a simple tool and converter that can be used to convert arf formats to mp4 formats.You can install it from command line in few steps(It’s very simple).
Download arf converter for Ubuntu 10.04 and other Linux distros
download nbr2mp4 for ubuntu

Install ARF converter on Ubuntu 10.04 or on linux

1. After downloading the nbr2mp4.tar file,extract it to any directory e.g extra_softwares.It will create a directory nbr2_mp4 and a script file nbr2mp4.sh.

2. Then Make the file nbr2mp4.sh executable by typing this command on the terminal-
rkjha@rkjha-desktop:~/extra_softwares$ chmod +x ./nbr2mp4.sh

3. Next,Install the converter by typing the command-
rkjha@rkjha-desktop:~/extra_softwares$ ./nbr2mp4.sh
Type the directory where you want to install the software[/home/rkjha/extra_softwares]:

Extracting files…
Installation is complete.

When it will ask “Type the directory where you want to install….” then just hit enter to install in the current directory(extra_softwares).

4. That’s All…You have installed the arf to mp4 converter successfully..

Converting ARF format to MP4: Ubuntu-Linux

Now,first go to the directory nbr_2mp4 created in extra_softwares(The Directory where you installed the nbr2mp4).next,use the following command to convert format-

Where SOURCE means the name of the arf file which you want to convert and don’t forget to specify pathname if it is in the different directory.MP4-DIRECTORY stands for the output file i.e filename.mp4,it’s name will be same as arf file except the extension of .mp4(Use ./ to generate in the same directory as of input file).In FPS(Frame Per Second) field you can specify between 3 to 10(Default value is 5).The quality of the mp4 file(output file) is directly proportional to the FPS.

e.g rkjha@rkjha-desktop:~/extra_softwares/nbr2_mp4$ ./nbr2mp4 tutorial1.arf ./ 8
Converting /home/rkjha/extra_softwares/nbr2_mp4/tutorial1.arf to /home/rkjha/extra_softwares/nbr2_mp4/./tutorial1.mp4
Retrieving video data, fps=8…