Académique Documents
Professionnel Documents
Culture Documents
0
Peter Hilton 14 February 2012
2
Peter Hilton
IPLAY
4
h t t p : / / a p p . e x a m p l e . c o m / W a r R o o t D i r e
c t o r y 1 / S e r v l e t s O n A M o F o P l a n e ? s e s s i o n
I d = x 8 1 n j 3 8 a v n g j L O L d x p a n e w q & a c t i o n
= N e x t P a g e & M y k e l = A l v i s & e n t i t y I d = 1 2 9
9 1 2 7 4 & p r o c e s s N a m e = U n l a d e n S w a l l o w
C o m p u t a t i o n & r o l e = p e o n & d a t e = 0 3 % 2 F
0 1 % 2 F 1 9 9 9 & f l a g S e t t i n g s = 0 1 0 1 0 0 0 1 1 1
& r e t u r n P a g e = % 2 F v i d e o s % 2 F r i c k r o l l . a v i
19
URL design (HTTP rouIng)
GET / controllers.Application.index()
@(products:
Seq[Product])
<ul>
@for(product
<-
products)
{
<li>@product.name</li>
}
</ul>
@summary(products)
32
@* if statements *@
@if(products.isEmpty) {
<h1>No products</h1>
} else {
<h1>@items.size products</h1>
}
33
Links (reverse rouIng) and tags
@main("Home
page")
{
<h1>Welcome</h1>
}
35
Compile-Ime checking
//
Not
a
String!
public
static
Result
details(final
Long
id)
{
return
ok();
}
}
hHp://www.ickr.com/photos/jameswragg/4688532009/
hHp://www.ickr.com/photos/etolane/489265330/
hHp://www.ickr.com/photos/aon/2196895775/
@rainbow:
-webkit-gradient(linear,
left
top,
left
bottom,
color-stop(0.00,
red),
color-stop(20%,
orange),
color-stop(25%,
yellow),
color-stop(30%,
yellow),
color-stop(45%,
green),
color-stop(65%,
blue),
color-stop(80%,
indigo),
color-stop(1.00,
violet));
45
www.lunatech.com www.playframework.org