Ngày 20/2/2013, LinkedIn đã thông báo chuyển đổi Service Infrastructure của họ sang sử dụng Play Framework. 

Play là 1 web framework chạy trên nền Java, hỗ trợ lập trình bằng cả 2 ngôn ngữ là Java và Scala. Để hiểu thêm về Play các bạn có thể tham khảo trên trang chủ: http://www.playframework.com

Sau đây mình sẽ hướng dẫn step-by-step cách cài đặt và tạo một Play Application trên Ubuntu Server

Step 1: Cài đặt Scala và JVM

sudo apt-get install default-jre
sudo apt-get install scala

Step 2: Download bản mới nhất của Play Framework (hiện tại 2.2.0 là phiển bản mới nhất của Play) và unzip

sudo apt-get install unzip
wget http://downloads.typesafe.com/play/2.2.0/play-2.2.0.zip
unzip play-2.2.0.zip

Step 3: Copy Play framework tới thư mục /opt và tạo 1 shortcut cho Play như vậy có thể type play một cách trực tiếp trên console

sudo mv play-2.2.0 /opt
sudo ln -s /opt/play-2.2.0 /opt/play
sudo ln -s /opt/play/play /usr/local/bin/play

Step 4: Chạy thử Play bằng cách type Play trong console và Enter

play

Nếu thành công console sẽ xuất hiện như sau:

       _
 _ __ | | __ _ _  _
| '_ | |/ _' | || |
|  __/|_|____|__ /
|_|            |__/

play 2.2.0 built with Scala 2.10.2 (running Java 1.7.0_21), http://www.playframework.com

This is not a play application!

Use `play new` to create a new Play application in the current directory,
or go to an existing application and launch the development console using `play`.

You can also browse the complete documentation at http://www.playframework.com.

 

Step 5: Install Java SDK

sudo apt-get install openjdk-7-jdk

Step 6: Create and run a Play Application

play new Application_Name
cd Application_Name/
play run

Step 7: Mở trình duyệt và gõ http://localhost:9000/

 

Như vậy là bạn đã tạo thành công 1 Play Application trên Ubuntu

Sau đây là một số link tham khảo thêm:

http://www.playframework.com – Trang chủ Play Framework, documentation và plugin có thể tìm thấy ở đây

http://scala-lang.org – Học ngôn ngữ Scala

http://typesafe.com – Công ty tạo ra ngôn ngữ Scala, Akka và Play Framework.

https://plus.google.com/communities/116192785110716864793 – Community Play Framework

http://www.jetbrains.com/idea/ – IDEA support Play Framework

http://www.sublimetext.com – IDEA support Play Framework