Click the table of contents to start reading.
The code examples are complete and well-explained ... this book fits the needs of both novices and experts.
Play for Scala shows you how to build Scala-based web applications using the Play 2 framework. This book starts by introducing Play through a comprehensive overview example. Then, you'll look at each facet of a typical Play application both by exploring simple code snippets and by adding to a larger running example. Along the way, you'll deepen your knowledge of Scala as a programming language and work with tools like Akka.
about this book
about the cover illustration
Part 1 Getting started
1. Introduction to Play 2
1.1. What Play is
1.2. High-productivity web development
1.3. Why Scala needs Play
1.4. Type-safe web development—why Play needs Scala
1.5. Hello Play!
1.6. The console
2. Your first Play application
2.1. The product list page
2.2. Details page
2.3. Adding a new product
Part 2 Core functionality
3. Deconstructing Play application architecture
3.1. Drawing the architectural big picture
3.2. Application configuration—enabling features and changing defaults
3.3. The model—adding data structures and business logic
3.4. Controllers—handling HTTP requests and responses
3.5. View templates—formatting output
3.6. Static and compiled assets
3.7. Jobs—starting processes
3.8. Modules—structuring your application
4. Defining the application’s HTTP interface
4.1. Designing your application’s URL scheme
4.2. Controllers—the interface between HTTP and Scala
4.3. Routing HTTP requests to controller actions
4.4. Binding HTTP data to Scala objects
4.5. Generating HTTP calls for actions with reverse routing
4.6. Generating a response
5. Storing data—the persistence layer
5.1. Talking to a database
5.2. Creating the schema
5.3. Using Anorm
5.4. Using Squeryl
5.5. Caching data
6. Building a user interface with view templates
6.1. The why of a template engine
6.2. Type safety of a template engine
6.3. Template basics and common structures
6.4. Structuring pages: template composition
6.5. Reducing repetition with implicit parameters
6.6. Using LESS and CoffeeScript: the asset pipeline
7. Validating and processing input with the forms API
7.1. Forms—the concept
7.2. Forms basics
7.3. Creating and processing HTML forms
7.4. Validation and advanced mappings
Part 3 Advanced concepts
8.1. Creating the single-page Play application
8.3. Sending JSON data to the server
8.4. Validating JSON
8.5. Authenticating JSON web service requests
9. Play and more
9.3. Deploying to production
10. Web services, iteratees, and WebSockets
10.1. Accessing web services
10.2. Dealing with streams using the iteratee library
10.3. WebSockets: Bidirectional communication with the browser
10.4. Using body parsers to deal with HTTP request bodies
10.5. Another way to look at iteratees
© 2014 Manning Publications Co.
About the book
Play is a Scala web framework with built-in advantages: Scala's strong type system helps deliver bug-free code, and the Akka framework helps achieve hassle-free concurrency and peak performance. Play builds on the web's stateless nature for excellent scalability, and because it is event-based and nonblocking, you'll find it to be great for near real-time applications.
Play for Scala teaches you to build Scala-based web applications using Play 2. It gets you going with a comprehensive overview example. It then explores each facet of a typical Play application by walking through sample code snippets and adding features to a running example. Along the way, you'll deepen your knowledge of Scala and learn to work with tools like Akka.
Written for readers familiar with Scala and web-based application architectures. No knowledge of Play is assumed.
- Intro to Play 2
- Play's MVC structure
- Mastering Scala templates and forms
- Persisting data and using web services
- Using Play's advanced features
About the readerWritten for readers familiar with Scala and web-based application architecture. No previous experience with Play! required.
placing your order...Don't refresh or navigate away from the page.