Learning Play! Framework 2
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
- While driving in Java, tasks are also presented in Scala – a great way to be introduced to this amazing language
- Create a fully-fledged, collaborative web application – starting from ground zero; all layers are presented in a pragmatic way
- Gain the advantages associated with developing a fully integrated web framework
Book Details
Language : EnglishPaperback : 290 pages [ 235mm x 191mm ]
Release Date : March 2013
ISBN : 1782160124
ISBN 13 : 9781782160120
Author(s) : Andy Petrella
Topics and Technologies : All Books, Open Source, Web Development
Table of Contents
PrefaceChapter 1: Getting Started with Play! Framework 2
Chapter 2: Scala – Taking the First Step
Chapter 3: Templating Easily with Scala
Chapter 4: Handling Data on the Server Side
Chapter 5: Dealing with Content
Chapter 6: Moving to Real-time Web Applications
Chapter 7: Web Services – At Your Disposal
Chapter 8: Smashing All Test Layers
Chapter 9: Code Once, Deploy Everywhere
Appendix A: Introducing Play! Framework 2
Appendix B: Moving Forward
Appendix C: Materials
Index
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 8: Smashing All Test Layers
- Testing atomically
- Running our atomic tests
- Writing applicative tests
- Testing workflows
- Summary
- Chapter 9: Code Once, Deploy Everywhere
- Continuous Integration (CloudBees)
- Deployment (Heroku)
- Monitoring (Typesafe Console)
- Summary
- Appendix 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
- Appendix B: Moving Forward
- More features
- Plugin
- Global
- Session, cache, and i18n
- Frontend languages
- Scala-specific
- Ecosystem
Andy Petrella
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- What's great about the new framework and on which projects it works best
- Set up a full installation including the framework itself but also the development environment
- Build a simple site or even a webapp using the server-side and templating system
- Store data in a relational database, using Ebean in Java and Anorm in Scala
- Discover the reactive way of handling data (back and forth with a client)
- Test all layers of your application using the integration of Play! 2 with the most famous testing frameworks – even on the client-side
- Deploy your application on the cloud, choosing Heroku as an example, but also on Cloudbees which enables a continuous integration
The Learning Play! Framework 2 has been created for web developers that are building web applications. The core idea is to focus on the HTTP features and to enable them through a simplification lens. Building a web application no longer requires a configuration phase, an environment setup, or a long development lifecycle - it's integrated!
Learning Play! Framework 2 will enable any web developers to create amazing web applications taking advantage of the coolest features. It's the fastest way to dive into Play!, focusing on the capabilities by using them in a sample application. Although essentially Java based code, a Scala version is presented as well – giving an opportunity to see some Scala in action.
After setting up the machine and learning some Scala, you will construct an application which builds from static to dynamic, before introducing a database.
Then we'll focus on how data can be consumed and rendered in several ways. This will enable some real time communication through WebSocket and Server-Sent Event – on both server and client sides.
The book will end with testing and deployment, which completes any web development project.
A strong focus is placed on explanation by example; even with the amount of amazing capabilities of Play! 2, they will be gathered in a single application. At the end of this book, the reader will have a fully-fledged application using the basic and advanced features of Play! 2.
Readers must be interested in the Web in general; specifically using the HTTP between a browser and a server to create blazing projects!
Java skills are beneficial but not necessary since Learning Play! Framework 2 is not J2EE based but introduces a simple, neat, and completely integrated version; the prerequisites are almost none.

