Home Page Icon
Home Page
Table of Contents for
Index
Close
Index
by Andy Petrella
Learning Play! Framework 2
Learning Play! Framework 2
Table of Contents
Learning Play! Framework 2
Credits
About the Author
Acknowledgement
About the Reviewers
www.packtpub.com
Support files, e-books, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Play! Framework 2
Preparing your machine
Downloading the package
Installing
Microsoft Windows
Mac OS X
Ubuntu
The Typesafe Stack
Checking if it's okay in your terminal
Creating your first project
Keeping your habits
Using Eclipse
Eclipse Juno
Using Scala IDE
IntelliJ IDEA
Sublime Text 2
Simple Build Tool
Adding a third-party dependency
Repositories
It's alive and not empty!
Browsing the Java API
Understanding the core pieces
Routing
Action
Similarities between the Java and Scala action code
Differences between the Java and Scala action code
Templates
Practicing
Modifying the template
Modifying the controller
Modifying the content type to JSON
Browsing our errors
Summary
2. Scala – Taking the First Step
Introducing Scala
Expressing your code
If-else
Switch/Pattern matching
Generic types
Iterating over a sequence
Function – foreach
Function – map
Function – filter
Function – exists
Function – find
Function – apply
Other interesting functions
Partial application
Summary
3. Templating Easily with Scala
Shape it, compose it, re-use it
Creating our first template
Structuring it
Adding content
Composing templates
Passing data structures
Playing around
Laying out
Using domain models
Re-using our code
Skinning with LESS pain
Summary
4. Handling Data on the Server Side
Feeding some data
Forming a (server) form
Ingesting data
Extracting the data
Enhancing your data
Validating our data
Persisting them
Activating a database
Accessing the database
Object-relational mapping
Storing and fetching – a simple story
Porting to Scala
Models
Parsing the DB result
Speaking with the browser
Summary
5. Dealing with Content
Body parsing for better reactivity
Creating a forum
Reorganizing and logging in
Chatting
Handling multipart content types
Rendering contents
Imaging all of the chat
Atomizing the chats
Summary
6. Moving to Real-time Web Applications
Ready, JSON, poll
Configuring a dashboard
Some sugar with your Coffee(Script)
Words about CoffeeScript's syntax
Explaining CoffeeScript in action
Rendering the dashboard
Updating the dashboard in live mode
Dynamic maintains form
Real time (advanced)
Adding WebSocket
Receiving messages
Multiplexing events to the browser
Live multichatting
Summary
7. Web Services – At Your Disposal
Accessing third parties
Interacting with Twitter
Using the Twitter API
Integrating chatrum with Twitter search
Long tasks won't block
Summary
8. Smashing All Test Layers
Testing atomically
Running our atomic tests
Writing applicative tests
Testing workflows
Summary
9. Code Once, Deploy Everywhere
Continuous Integration (CloudBees)
Deployment (Heroku)
Monitoring (Typesafe Console)
Summary
A. Introducing Play! Framework 2
Why do we need Play! Framework?
Framework for the Web
Not JEE-based, but JVM
Underlying ideas and concepts
Reactive
NIO server
Asynchronous
Iteratee
Wrap up
What's new?
Scala
Simple Build Tool
Templates
Assets
Amazing goodies
HTML5
External services
Form validation
Hot reloading
Only two tools – IDE and browser
Summary
B. Moving Forward
More features
Plugin
Global
Session, cache, and i18n
Frontend languages
Scala-specific
Ecosystem
C. Materials
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
C. Materials
Index
A
action
about /
Action
Scala action code /
Similarities between the Java and Scala action code
,
Differences between the Java and Scala action code
Java action code /
Similarities between the Java and Scala action code
,
Differences between the Java and Scala action code
/
Body parsing for better reactivity
Actor Model /
Multiplexing events to the browser
Akka library /
Multiplexing events to the browser
Anorm /
Porting to Scala
app folder /
Creating your first project
Application controller
modifying /
Modifying the controller
applicative test
writing /
Writing applicative tests
apply method /
Function – apply
arguments
Any* /
Function – apply
async method /
Long tasks won't block
at method /
Routing
atomic /
Testing atomically
Attach an image form /
Handling multipart content types
B
bind method /
Forming a (server) form
body /
Body parsing for better reactivity
body parser
about /
Body parsing for better reactivity
Browse menu /
It's alive and not empty!
Build | Execute Shell command /
Continuous Integration (CloudBees)
C
case class /
Switch/Pattern matching
chat /
Re-using our code
class /
Words about CoffeeScript's syntax
ClickStarts /
Continuous Integration (CloudBees)
client-side router /
Dynamic maintains form
closures /
Words about CoffeeScript's syntax
CloudBees
about /
Continuous Integration (CloudBees)
DEV@cloud /
Continuous Integration (CloudBees)
RUN@cloud /
Continuous Integration (CloudBees)
code
re-using /
Re-using our code
code expression, Scala
about /
Expressing your code
if-else statement /
If-else
pattern matching /
Switch/Pattern matching
CoffeeScript
defining /
Ready, JSON, poll
using /
Some sugar with your Coffee(Script)
syntax /
Words about CoffeeScript's syntax
in action /
Explaining CoffeeScript in action
dashboard, rendering /
Rendering the dashboard
CoffeeScript syntax
spaces /
Words about CoffeeScript's syntax
parenthesis /
Words about CoffeeScript's syntax
class /
Words about CoffeeScript's syntax
variable /
Words about CoffeeScript's syntax
function /
Words about CoffeeScript's syntax
collect function /
Other interesting functions
Comet /
Real time (advanced)
comparison.Sequence /
Testing atomically
conf folder /
Creating your first project
container /
Action
content-type
modifying, to JSON /
Modifying the content type to JSON
content-type header /
Body parsing for better reactivity
contents
rendering /
Rendering contents
examples /
Rendering contents
chats, imaging /
Imaging all of the chat
chats, atomizing /
Atomizing the chats
continuous command /
Writing applicative tests
contract /
Testing atomically
controller /
Action
Controller /
Using domain models
CTRL + P /
Writing applicative tests
currying /
Passing data structures
D
dashboard
about /
Ready, JSON, poll
configuring /
Configuring a dashboard
updating, in live mode /
Updating the dashboard in live mode
Dashboard controller /
Configuring a dashboard
data
dealing with /
Feeding some data
extracting /
Extracting the data
enhancing /
Enhancing your data
validating /
Validating our data
database
activating /
Activating a database
accessing /
Accessing the database
/
Writing applicative tests
DEV@cloud /
Continuous Integration (CloudBees)
distraction-zero notation /
Function – exists
documentation folder
manual /
Downloading the package
api /
Downloading the package
domain models
using /
Using domain models
dynamic form
maintaining /
Dynamic maintains form
dyno /
Deployment (Heroku)
E
Eclipse
using /
Using Eclipse
Juno /
Eclipse Juno
Scala IDE, using /
Using Scala IDE
Eclipse Juno /
Eclipse Juno
ecosystem /
Ecosystem
errors
browsing /
Browsing our errors
,
Summary
events
multiplexing, to browser /
Multiplexing events to the browser
evolutions /
Object-relational mapping
,
Deployment (Heroku)
exists method /
Function – exists
expression /
Expressing your code
F
fill method /
Testing workflows
filter method /
Function – filter
first project
creating, play command used /
Creating your first project
application, entering in terminal /
Keeping your habits
FluentLenium /
Testing workflows
foreach method /
Function – foreach
Form class
application user, creating /
Forming a (server) form
test action, tasks /
Forming a (server) form
form tag /
Writing applicative tests
forum
creating /
Creating a forum
log in /
Reorganizing and logging in
reorganizing /
Reorganizing and logging in
chatting /
Chatting
function /
Words about CoffeeScript's syntax
,
Testing workflows
functor /
Generic types
Functors /
Using the Twitter API
Future /
Accessing third parties
G
g function /
Words about CoffeeScript's syntax
global object feature /
Re-using our code
global settings /
Global
groupBy function /
Other interesting functions
H
Heroku
about /
Deployment (Heroku)
Heroku provider /
Deployment (Heroku)
HTML5
about /
HTML5
examples /
HTML5
external services /
External services
form validation /
Form validation
hot reloading /
Hot reloading
IDE /
Only two tools – IDE and browser
I
IaaS
about /
Continuous Integration (CloudBees)
if-else statement /
If-else
in parameter /
Adding WebSocket
IntelliJ IDEA
about /
IntelliJ IDEA
Iteratee /
Iteratee
,
Scala-specific
J
Java API
browsing /
Browsing the Java API
JavaScript reverse router /
Dynamic maintains form
Java syntax
differentiating, with Scala syntax /
Generic types
JSON
using /
Ready, JSON, poll
json method /
Testing workflows
L
layouting
about /
Laying out
lazy load /
Object-relational mapping
length function /
Other interesting functions
LESS
using /
Skinning with LESS pain
styling rules, defining /
Skinning with LESS pain
level parameter /
Adding content
live multichatting /
Live multichatting
M
Mac OS X /
Checking if it's okay in your terminal
mainExtended template /
Writing applicative tests
map method /
Function – map
,
Using the Twitter API
matchers /
Testing atomically
messages
receiving /
Receiving messages
Microsoft Windows /
Checking if it's okay in your terminal
model /
Using domain models
multipart content types
handling /
Handling multipart content types
MVC /
Using domain models
N
@* *@ notation /
Enhancing your data
Netty server /
Testing workflows
New Relic
about /
Monitoring (Typesafe Console)
NIO server /
NIO server
non-blocking /
Long tasks won't block
O
ok action /
Similarities between the Java and Scala action code
Open Application button /
Continuous Integration (CloudBees)
Option /
Function – find
,
Extracting the data
ORM
about /
Object-relational mapping
using, for model retrieving /
Storing and fetching – a simple story
out parameter /
Adding WebSocket
P
parameters list /
Structuring it
parenthesis /
Words about CoffeeScript's syntax
partial application /
Partial application
partition function /
Other interesting functions
pattern matching /
Switch/Pattern matching
persistent data /
Persisting them
pic() method /
Handling multipart content types
pimp-my-library /
Testing atomically
Play! Framework
need for /
Why do we need Play! Framework?
web framework /
Framework for the Web
JVM /
Not JEE-based, but JVM
Play! Framework 2
features /
More features
Play! Framework 2, features
plugin /
Plugin
global setting /
Global
i18n /
Session, cache, and i18n
frontend languages /
Frontend languages
play command
used, for application running /
It's alive and not empty!
play command-line tool /
Installing
Play Framework 2
prerequisites /
Preparing your machine
downloading /
Downloading the package
installing /
Installing
Microsoft Windows installation /
Microsoft Windows
Mac OS X installation /
Mac OS X
Ubuntu installation /
Ubuntu
Typesafe Stack 2 /
The Typesafe Stack
terminal check /
Checking if it's okay in your terminal
plugins /
Plugin
point-less notation /
Function – exists
polling /
Ready, JSON, poll
POST /
Enhancing your data
POST-redirect-GET /
Reorganizing and logging in
Procfile file /
Deployment (Heroku)
project folder /
Creating your first project
Promise /
Accessing third parties
public folder /
Creating your first project
R
reactive framework /
Reactive
reactivity /
Body parsing for better reactivity
remote services
accessing /
Accessing third parties
repository /
Repositories
request /
Writing applicative tests
request() method /
Chatting
response action /
Similarities between the Java and Scala action code
routing
about /
Routing
columns /
Routing
RUN@cloud /
Continuous Integration (CloudBees)
S
save method /
Models
SBT
about /
Simple Build Tool
third-party dependency, adding /
Adding a third-party dependency
repositories /
Repositories
Scala
about /
Introducing Scala
code expression /
Expressing your code
porting to /
Porting to Scala
models /
Models
DB result, parsing /
Parsing the DB result
server-side forms, delaing with /
Speaking with the browser
/
Scala
Scala IDE
using /
Using Scala IDE
send flag /
Multiplexing events to the browser
sequence iteration
about /
Iterating over a sequence
foreach method /
Function – foreach
map method /
Function – map
filter method /
Function – filter
exists method /
Function – exists
find method /
Function – find
apply method /
Function – apply
partition function /
Other interesting functions
collect function /
Other interesting functions
groupBy function /
Other interesting functions
sliding function /
Other interesting functions
length function /
Other interesting functions
showMessage function /
Partial application
Slick /
Scala-specific
sliding function /
Other interesting functions
spaces /
Words about CoffeeScript's syntax
specs2 /
Testing atomically
splat parameter /
Adding WebSocket
squareSeq function /
Running our atomic tests
src attribute /
Imaging all of the chat
SSE /
Real time (advanced)
ssynchronous /
Asynchronous
String class /
Testing atomically
string parameter /
Similarities between the Java and Scala action code
style parameter /
Templates
Sublime Text 2
using /
Sublime Text 2
symbol /
Enhancing your data
T
template
about /
Creating our first template
components /
Creating our first template
creating /
Creating our first template
structuring /
Structuring it
content, adding /
Adding content
composing /
Composing templates
data structures, passing /
Passing data structures
templates
about /
Templates
modifying /
Modifying the template
test-only command /
Writing applicative tests
test command /
Running our atomic tests
test folder /
Creating your first project
tests
about /
Testing atomically
simple tests, working /
Testing atomically
atomic tests, running /
Running our atomic tests
TestServer class /
Testing workflows
third party functionality
problems /
Long tasks won't block
Toolbelt tool /
Deployment (Heroku)
trait /
Generic types
transient data /
Persisting them
Tuple2 class /
Re-using our code
Twitter
intercting with /
Interacting with Twitter
API, using /
Using the Twitter API
chatrum, integrating with /
Integrating chatrum with Twitter search
Twitter API
using /
Using the Twitter API
type inference /
Function – foreach
Typesafe Console
about /
Monitoring (Typesafe Console)
U
Ubuntu Linux /
Checking if it's okay in your terminal
V
validate method /
Handling multipart content types
variable /
Words about CoffeeScript's syntax
View /
Using domain models
W
web drivers /
Testing workflows
web process /
Deployment (Heroku)
web service /
Accessing third parties
WebSocket /
Real time (advanced)
adding /
Adding WebSocket
with method /
Testing workflows
workflows
testing /
Testing workflows
TestServer instance, creating /
Testing workflows
WS#url method /
Testing workflows
WS API /
Accessing third parties
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset