Mastering Play Framework for Scala
eBook - ePub

Mastering Play Framework for Scala

Shiti Saxena

Compartir libro
  1. 274 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering Play Framework for Scala

Shiti Saxena

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering Play Framework for Scala un PDF/ePUB en línea?
Sí, puedes acceder a Mastering Play Framework for Scala de Shiti Saxena en formato PDF o ePUB, así como a otros libros populares de Computer Science y Application Development. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781783983803

Mastering Play Framework for Scala


Table of Contents

Mastering Play Framework for Scala
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, 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
Venturing into the world of Play
A sample Play app
Building a Play application using Activator
The build definition
The source code
Request handling process
Creating a TaskTracker application
Adding a new task
Deleting a task
Summary
2. Defining Actions
A dummy Artist model
Actions
Actions with parameters
Request body parsers
Extending a parser
Exploring the results
Asynchronous Actions
Content negotiation
Filters
Action composition
The need for an Action composition
Differentiating between Action composition and filters
Customized requests
The need for a user object
Troubleshooting
Summary
3. Building Routes
Introduction to Play routes
Automatic generation of routes_routing.scala
Reverse routing
JavaScript reverse routing
Assets
Client-side libraries
Configuring route definitions
Dynamic paths
Static paths
Configuring request parameters
Troubleshooting
Summary
4. Exploring Views
Diving into Scala templates
Building a view
Generating forms
Adding constraints on data
Handling errors
Form-field helpers
Internationalization
Supporting views in multiple languages
Understanding internationalization
Scala templating in Play
Understanding the working of Twirl
Troubleshooting
Summary
5. Working with Data
Introducing models
JDBC
Anorm
Slick
ReactiveMongo
The Cache API
Troubleshooting
Summary
6. Reactive Data Streams
Basics of handling data streams
Iteratees
Enumerator
Using the Concurrent object
Unicast
Broadcast
Enumeratees
Binding an Enumeratee to an Enumerator
Binding an Enumeratee to an Iteratee
Summary
7. Playing with Globals
GlobalSettings
The life cycle of an application
Meddling with an application's life cycle
The request-response life cycle
Fiddling with the request-response life cycle
Manipulating requests and their responses
Tackling errors and exceptions
Summary
8. WebSockets and Actors
An introduction to WebSockets
WebSockets in Play
Actor Model
Introducing Akka Actors
WebSocket using Iteratee
WebSocket using Actors without Iteratees
Closing a WebSocket
Using FrameFormatter
Troubleshooting
Summary
9. Testing
The setup for writing tests
Unit testing
Dissecting PlaySpecification
Unit testing a controller
Using traits for controllers
Using dependency injection
Functional testing
Using Specs2
Using ScalaTest
Summary
10. Debugging and Logging
Debugging a Play application
Configuring an IDE for debugging
Experimenting in a Scala console
Logging
Play's logging API
Log configuration in Play
Log levels
Summary
11. Web Services and Authentication
Calling web services
OpenID
OAuth
Summary
12. Play in Production
Deploying a Play application
Using the start command
Using a distribution
Universal distribution
Debian distribution
The rpm distribution
Windows distribution
Configuring for production
Enabling SSL
Using a load balancer
Apache HTTP
The nginx server
lighttpd
High Availability Proxy
Troubleshooting
Summary
13. Writing Play Plugins
Plugin definition
Plugin declaration
Exposing services through plugins
Tips for writing a plugin
Summary
Index

Mastering Play Framework for Scala

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2015
Production reference: 1260515
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-380-3
www.packtpub.com

Credits

Author
Shiti Saxena
Reviewers
Didier Bathily
Jérôme Leleu
Jon Parsons
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Subho Gupta
Content Development Editor
Sriram Neelakantan
Technical Editors
Novina Kewalramani
Manal Pednekar
Shruti Rawool
Copy Editors
Sonia Michelle Cheema
Vikrant Phadke
Project Coordinator
Vijay Kushlani
Proofreaders
Stephen Copestake
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Sheetal Aute
Disha Haria
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

Shiti Saxena is a software engineer with around 4 years of work experience. She is currently working with Imaginea (a business unit of Pramati). She has previously worked with Tata Consultancy Services Ltd. and Genpact.
A true polyglot, she's had exposure to various languages, including Scala, JavaScript, Java, Python, Perl, and C. She likes to work with Play Scala and AngularJS.
She blogs at http://eraoferrors.blogspot.in and maintains open source projects on GitHub.
She loves to travel, is a movie buff, and likes to spend time playing her piano whenever she is not programming.
She has authored Getting Started with SBT for Scala (https://www...

Índice