Karunakaran | Introducing Play Framework | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 201 Seiten

Karunakaran Introducing Play Framework

Java Web Application Development
2. ed
ISBN: 978-1-4842-5645-9
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

Java Web Application Development

E-Book, Englisch, 201 Seiten

ISBN: 978-1-4842-5645-9
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



Enter the world of rapid web application development. This gentle introduction to Play covers all you need to know: it carefully introduces the background concepts before diving into examples, making learning Play 2 enjoyable (it includes the latest Play framework version 2.8). Introducing Play Framework is crisp, up-to-the-point, and full of valuable information. You will find chapters covering the basics of Play, the sbt build system, the Ebean ORM, web services using Play, production deployment, cache, and more with actual pragmatic code snippets for common tasks. After reading and using this book, you'll be able to build and deploy Java-based web applications with the Play framework.  What You Will Learn Use the Play framework to do rapid Java-based web application development Work with Play controllers and Play views Create web services using JSON and XML Persist data and access databases Use Play modules Carry out asynch programming Cache, deploy, and work with code snippets in Play Who This Book Is For Those with at least some prior experience with Java.    


Prem Kumar Karunakaran is an enterprise architect with around 14 years of industry experience. He holds a bachelors degree in electronics engineering and is also an Oracle Certified Java Enterprise Edition Master. He was involved in the architecture and design of many cutting-edge products used by clients around the globe. He has worked with organizations such as Infosys and IBS as an architect and has worked in many projects spanning airlines, logistics, travel and retail. He is passionate about Java and loves to learn new technologies and contributes his time to open source initiatives as well.

Karunakaran Introducing Play Framework jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Table of Contents;5
2;About the Author;10
3;About the Technical Reviewer;11
4;Preface;12
5;Chapter 1: Getting Started with Play 2;14
5.1;Getting Ready;14
5.2;Installation;14
5.2.1;Prerequisites;15
5.2.2;Installing sbt;15
5.2.3;Installing conscript;15
5.2.4;Installing Giter8;16
5.2.5;Setting Up Play;17
5.2.6;Using Play Example Projects;17
5.2.7;Using sbt;19
5.2.7.1;Installing a Java Project Using sbt;20
5.2.7.2;Installing a Scala Project Using sbt;20
5.3;Creating Your First Project;21
5.3.1;app;22
5.3.2;conf;23
5.3.3;build.sbt;24
5.3.4;project;24
5.3.5;public;24
5.3.6;lib;24
5.3.7;test;25
5.4;Configuring Play to Work with Your Preferred IDE;25
5.4.1;Setting Up in Eclipse;25
5.4.2;Setting Up in IntelliJ;28
5.5;Hello World Application;30
5.5.1;Configuration;32
5.5.2;Controller and View;35
5.5.2.1;View;37
5.5.2.2;Controller;37
5.5.2.3;Enhancing the View;39
5.6;Testing Play Applications;40
5.6.1;Testing Views;41
5.6.2;Testing Controllers;42
6;Chapter 2: Build System;45
6.1;Scala Build Tool/Simple Build Tool;45
6.2;Core Principles;45
6.3;Benefits of sbt;46
6.4;Project Structure;47
6.5;Using sbt;48
6.5.1;Setting Definition;51
6.5.2;Resolvers;54
6.5.3;Complete build.sbt;54
6.5.4;Complete plugins.sbt;55
6.6;Quick Recap of SBT Commands;55
7;Chapter 3: Play Controllers and HTTP Routing;57
7.1;MVC Programming Model;57
7.1.1;Model;58
7.1.2;View;60
7.1.3;Controller;60
7.2;HTTP Routing;60
7.2.1;Static Definition;62
7.2.2;Dynamic Parts in a URL;62
7.2.3;Passing Fixed Values;64
7.2.4;Optional Parameters;65
7.3;Application Configuration Using application.conf;65
7.4;Controllers;66
7.5;Finishing the Bookshop Controller;68
7.5.1;saveComment Method;70
7.5.2;Testing the saveComment Action;71
7.6;Models;72
7.7;Scoped Objects;73
7.7.1;Session Scope;74
7.7.2;Flash Scope;76
8;Chapter 4: Play Views and Templating with Scala;77
8.1;Composite Views;78
8.2;Designing a General Template;80
8.3;Code Snippets Templating Basics;81
8.3.1;Comments;82
8.3.2;Template Parameters;82
8.3.3;Import Statement;83
8.3.4;Iterating a List;84
8.3.5;Iterating a Map;84
8.3.6;If Blocks;85
8.3.7;Escaping Dynamic Contents;86
9;Chapter 5: Concurrency and  Asynchronous Programming;87
9.1;What Is Concurrency?;88
9.1.1;Executor;88
9.1.2;Example 1: Using Runnable;90
9.1.3;Example 2: Using Callable;92
9.2;Asynchronous Programming with Play;94
9.3;Writing an Asynchronous App;95
9.4;Configuring Asynchronous Scheduled Jobs;96
9.4.1;Akka Basics;96
10;Chapter 6: Web Services, JSON, and XML;99
10.1;Consuming Web Services;100
10.2;Processing Large Responses;103
10.3;Handling JSON;106
10.3.1;Consuming JSON Request;106
10.3.2;Producing a JSON Response;109
10.4;Handling XML;110
10.4.1;Example 1: Simple XML Parsing;111
10.4.2;Example 2: XML Parsing Using JAXB;112
11;Chapter 7: Accessing Databases;117
11.1;Configuring Database Support;117
11.2;Working with an ORM;121
11.2.1;ORM Concepts;121
11.2.2;Key Terms;123
11.2.2.1;One to Many;123
11.2.2.2;Many to One;123
11.2.2.3;Many to Many;123
11.2.3;Relationship Direction;123
11.3;Configuring JPA;125
11.4;Using Ebean in Play;130
11.4.1;Ebean Query;132
11.4.2;Common Select Query Constructs in Ebean;137
11.4.2.1;where();137
11.4.2.2;eq();137
11.4.2.3;like();137
11.4.2.4;orderBy();137
11.4.2.5;findUnique();138
11.4.2.6;findList();138
11.4.2.7;LIMIT {max rows} [ OFFSET {first row} ];138
11.4.2.8;The Query Interface;138
11.4.3;Using RawSql;140
11.4.4;Relationships in Ebean;142
12;Chapter 8: Complete Example;144
13;Chapter 9: Using Play Modules;168
13.1;Creating a Module;169
13.2;Third-Party Modules;172
14;Chapter 10: Application Settings and Error Handling;173
14.1;Filters;174
14.2;Action Composition;178
14.3;Error Handlers;180
14.3.1;Client Errors;180
14.3.2;Server Errors;180
14.4;How Global Settings Were Done Before Play 2.6.x;182
15;Chapter 11: Working with Cache;185
15.1;Configuring Caffeine;185
15.1.1;Adding Caffeine to a Project;186
15.2;Configuring EhCache;187
15.3;Using the Cache API;187
16;Chapter 12: Production Deployment;192
16.1;Configuring Apache httpd for Play;193
16.2;Load Balancing Using mod_proxy_balancer;193
16.3;Configuring Play with Nginx;194
17;Index;196



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.