When it comes to the network framework, Ruby's Ruby on rail and Python's Django are pretty lightweight and easy to use, but the Java framework is much heavier. Some people therefore question whether the Java language itself meets the needs of the network age. The Java gods scoff at the problem. Want a lightweight and usable frame? Just write one for you. Java programmer Guillaume Bort has created a new framework play framework on the JVM. Play has the dexterity of Ror or Django, but also the stability of Java, the JVM is a powerful platform for the operation. Devil figure, Angel face. Let's play the game.
Download and install
Play is quite simple to install. In the play website download, I downloaded the 2.2.1 version. This version of the API documentation is 2.2.1API.
Unzip the downloaded. zip file and place the uncompressed folder in a location. Like/home/vamei/util.
Unzip Play-2.2.1.zip
MV play-2.2.1/home/vamei/util/
The important thing in the folder is the executable file play. I usually create a bin folder under/home/vamei/util/and create a soft link for play in that folder.
Mkdir-p/home/vamei/util/bin
Cd/home/vamei/util/bin
Ln-s/home/vamei/util/play-2.2.1/play.
Finally, put the new Bin folder into the system path.
echo "Export path=/home/vamei/util/bin: $PATH" >>/HOME/VAMEI/.BASHRC
Source/home/vamei/.bashrc
Enter play at the command line, which will display:
_
_ __ | | __ _ _ _
| '_ \| |/ _' | || |
| __/|_|\____|\__ /
|_| | __/
Play 2.2.1 built with Scala 2.10.2 (running Java 1.7.0_51), http://www.playframework.com "This isn't"
a play Applicatio n!
Use "Play new" to "create a new play application in" current directory, or go to a
existing application and launch The development console using ' play '.
You can also browse the complete documentation at http://www.playframework.com.
Note:
Above is the installation process under Ubuntu. Linux systems are similar.
Under Mac OS, choose the right path to install play, the process is the same.
For installation under Windows, there is no exploration. Welcome to Add.
Create and run
Switch to/home/vamei, create a network application test,
Play New test