Learning Play! Framework 2


Learning Play! Framework 2
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • 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 : English
Paperback : 290 pages [ 235mm x 191mm ]
Release Date : March 2013
ISBN : 1782160124
ISBN 13 : 9781782160120
Author(s) : Andy Petrella
Topics and Technologies : All Books, Web Development, Open Source, Web Development

Table of Contents

Preface
Chapter 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
                    • 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

                        Andy Petrella

                        Andy Petrella is first and foremost a Belgian mathematician who tried to find a way to apply his skills to the concrete world. One of them was programming. So, after graduating in Mathematics, he continued his study in Informatics at the University of Liège.

                        He quickly became interested in Geomatics because of the heterogeneous needs of this discipline, which led him to mainly work in the GIS field. Over there, he got the opportunity to sharpen his skills on distributed architecture for interoperable solutions.

                        After spending time developing in Java and integrating scripting languages such as Python and JavaScript, he slowly moved back to functional programming. Although working with JVM was a constraint, he tried his hand at Scala and took the opportunity to use Play! 2 while it was still in development.

                        Having found a new way to enjoy mathematics along with programming, he joined one of his friends and they decided to create NextLab (http://www.nextlab.be/), a company that offers the perfect context to push Play! 2 and Scala to the foreground through projects and customers.

                        Andy also loves to share his experiences, his enjoyment, and his discoveries through the co-creation of a user group called WAJUG (http://wajug.be/) dedicated to help Walloons to meet together and share ideas about information technology. In order to ensure a constant flow of information, he also writes his thoughts on his blog, SKA LA (http://ska-la.blogspot.be/).

                        Sorry, we don't have any reviews for this title yet.

                        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.


                        Errata

                        - 2 submitted: last submission 24 Oct 2013

                        Errata type: Code| Page number: 38 | Errata date: 24 June 2013

                        plays.libs.Json should be play.libs.Json

                         

                        Errata type: Typo | Page number: 21 | Errata date: October 24, 2013

                        The sentence:

                        Sublime Text 2 comes with features than an IDE.

                        Should be:

                        Sublime Text 2 comes with features other than an IDE.

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Learning Play! Framework 2 +    SQL Server Analysis Services 2012 Cube Development Cookbook =
                        50% Off
                        the second eBook
                        Price for both: €34.95

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • 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

                         

                        In Detail

                        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.

                        Approach

                        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.

                        Who this book is for

                        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.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software