Mastering Play Framework for Scala
eBook - ePub

Mastering Play Framework for Scala

Shiti Saxena

Buch teilen
  1. 274 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Mastering Play Framework for Scala

Shiti Saxena

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Mastering Play Framework for Scala als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Mastering Play Framework for Scala von Shiti Saxena im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Application Development. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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...

Inhaltsverzeichnis