You are on page 1of 61

A new twist on Java web frameworks

I’m Dave
UI/UX Lead and
Software Engineer
Acteksoft, Inc.

I look like this


No really
Features and Benefits
Comparator<Java> Style
Play is

RESTful
http://www.myapp.com/WarRootDirec
tory1/ServletsOnAMoFoPlane?
sessionId=x81ndj38avngjLOLdxpanew
q&action=New&Mykel=Alvis&entityId
=1299124&processName=UnladenSwall
owComputation&role=peon&date=03%2
F01%2F/1999&flagSettings=01010111
0110&returnPage=/ServletsOnA...

What does it mean?


http://www.myapp.com/Users/create

Oh.
http://www.myapp.com/Users/create

You can read it


You can bookmark it
You can communicate it

Oh.
Play is

Stateless
Ok, so you get a request
And you get the session
We still good?
Ok, gimme the user
And some other stuff (dont judge)
NULL

No Milli Vanilli GREATEST HITS?!


Who missed putting it in the session?
Maybe it`s in here
Sessions fail to scale as your
codebase gets larger
Which is ok when you`re small
But it gets harder when you get bigger
Now you are solving scaling problems, not
business problems
Session Failover
Server Affinity
Sessions fail to scale as your
infrastructure increases
Play has no session
only a simple cache

EhCache out of the box,


Memcached when you need to scale

The right tool for the job.


Play is

Modular
Meet <JavaWebFramework>
It does everything you will ever need
Until this comes along
And more
And more
And more
Until this comes along
But can’t I just import a library
But can’t I just import a library
Refactor my design to support it
But can’t I just import a library
Refactor my design to support it
Maybe write some glue code
But can’t I just import a library
Refactor my design to support it
Maybe write some glue code
Throw in a few unit tests
But can’t I just import a library
Refactor my design to support it
Maybe write some glue code
Throw in a few unit tests
Add it all to my build
But can’t I just import a library
Refactor my design to support it
Maybe write some glue code
Throw in a few unit tests
Add it all to my build

How long does it take?


play install spring

How long does it take?


The presentation layer of most
applications is the piece that
changes the most often.

Speed is important,
Modularity is important.
Play is also

Pure Java
Focused on productivity
Easy to test
Great at error reporting
Built for the web
Coding Demo
import mac.osx
It`s tough in the trenches
Just gotta survive
Takeaway Lessons
Keepin it IRL
REST
Creates simplicity
Lets you think it terms
of resources, more
understandable and
readable.
Promotes
loose coupling.
Fully realizes the
meaning of HTTP as a
protocol not just a
transport.
Stateless
Scales
Remove complexity
by using a cache
instead of a session
Forces you to be
explicit, improving
visibility in your code.
State is harder to test
and can create
unreliable code.
Usability
Isn’t just for interfaces
Make your APIs
simpler to learn and to
use.
Features are nice, but
they should empower
not distract.
Don`t undervalue
things that
Just Work.
Most importantly...

Remember when you


were a kid
Everything
was
simpler
Simple let you
experiment and
have
fun
Focus on creating simplicity
Have fun out there

You might also like