Mastering Play Framework for Scala
eBook - ePub

Mastering Play Framework for Scala

Shiti Saxena

Partager le livre
  1. 274 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering Play Framework for Scala

Shiti Saxena

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering Play Framework for Scala est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering Play Framework for Scala par Shiti Saxena en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Application Development. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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...

Table des matiĂšres