Instant Play Framework Starter
图书信息
| 作者 | Daniel Dietrich |
| 出版社 | Packt Publishing |
| ISBN | 9781782162919 |
| 出版时间 | 2013-05-23 |
| 字数 | 344.4万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks.A practical, quick, and hands-on guide to the Play Framework.This book is written for readers interested in developing web applications with Java or Scala. A basic knowledge of either Java or Scala is helpful. Prior experience with Play is not required.
目录
Instant Play Framework Starter
Instant Play Framework Starter
Credits
About the Author
About the Reviewers
www.packtpub.com
Support files, eBooks, discount offers and more
packtlib.packtpub.com
Why Subscribe?
Free Access for Packt account holders
1. Instant Play Framework Starter
So, what is Play?
Installation
Step 1 – What do I need?
Step 2 – Downloading Play
Step 3 – Setting the PATH environment variable
Step 4 – Testing the Play installation
And that's it!
Quick start – Creating your first Play application
Step 1 – Creating a new Play application
Structure of a Play application
The app/ folder
The conf/ directory
The project/ folder
The public/ folder
The test/ folder
Step 2 – Using the Play console
Starting our application
Play console commands
Closing the console
Step 3 – Modifying our application
Fast turnaround – change your code and hit reload!
Stripped down and optimized stack traces
Step 4 – Setting up your preferred IDE
IntelliJ IDEA
Eclipse
Other IDEs
Top features you need to know about
1 – Designing a Play application
Introducing our sample application
Defining the domain model
The Java model
The Scala model
Designing the HTTP interface with the routes file
Defining the application routes
Dynamic request paths and variables
Testing the routes
Handling HTTP requests by controller actions
Providing dummy implementations
URL redirection with reverse routes
Implementing controller actions
The Java code
The Scala code
What comes next
Composing the UI from view templates
Syntax of view templates
View parameters
View imports
View expressions
Composing view templates
Example
Nesting view templates
Implementing the phone book views
Prerequisites
The index view template
The list view template
The main view template
Fine-tuning the CSS style
Providing some test data
2 – Dealing with user input
Defining a form
The server side
Binding data with a Java form
Binding data with a Scala form
The client side
Validating user input
The server side
Defining constraints in Java
Defining constraints in Scala
The client side
Using form template helpers
3 – Connecting to a database
Accessing data with Ebean for Java
Customizing the configuration
Creating the database schema
Implementing the model
Running the application
Accessing data with Anorm for Scala
Customizing the configuration
Creating the database schema
Implementing the model
Running the application
Accessing data with Slick for Scala
Customizing the configuration
Implementing the model
The data access object
The data access layer
Generating the database schema
People and places you should get to know
Official sites
Articles and tutorials
Community
Blogs
- 基础会计实训 第三版 会计专业(杨蕊)
- 神秘超市(精装)(孙诗洋)
- 催化裂化装置设备维护检修案例(胡安定)
- 工业大麻生物技术研究进展(张利国)
- 白居易诗选((唐)白居易)
- (四色)世界名人非常之路.医学世家走出的医圣:李时珍(王莲凤)
- 学前儿童感觉统合训练(南姣鹏主编)
- 伍尔夫作品集夜与日(上下)((英)弗吉尼亚・伍尔夫)
