Building Applications with Scala

Write modern, scalable, and reactive applications with the power of Scala
Preview in Mapt

Building Applications with Scala

Diego Pacheco

1 customer reviews
Write modern, scalable, and reactive applications with the power of Scala

Quick links: > What will you learn?> Table of content> Product reviews

eBook
$5.00
RRP $39.99
Save 87%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$5.00
$49.99
RRP $39.99
RRP $49.99
eBook
Print + eBook

Frequently bought together


Building Applications with Scala Book Cover
Building Applications with Scala
$ 39.99
$ 5.00
Scala Test-Driven Development Book Cover
Scala Test-Driven Development
$ 31.99
$ 5.00
Buy 2 for $10.00
Save $61.98
Add to Cart

Book Details

ISBN 139781786461483
Paperback344 pages

Book Description

Scala is known for incorporating both object-oriented and functional programming into a concise and extremely powerful package. However, creating an app in Scala can get a little tricky because of the complexity the language has. This book will help you dive straight into app development by creating a real, reactive, and functional application. We will provide you with practical examples and instructions using a hands-on approach that will give you a firm grounding in reactive functional principles.

The book will take you through all the fundamentals of app development within Scala as you build an application piece by piece. We’ve made sure to incorporate everything you need from setting up to building reports and scaling architecture. This book also covers the most useful tools available in the Scala ecosystem, such as Slick, Play, and Akka, and a whole lot more. It will help you unlock the secrets of building your own up-to-date Scala application while maximizing performance and scalability.

Table of Contents

Chapter 1: Introduction to FP, Reactive, and Scala
Functional programming
Principles of functional programming
Installing Java 8 and Scala 2.11
Read Eval Print and Loop - REPL
Scala Hello World using the REPL
Scala language - the basics
Scala variables - var and val
Creating immutable variables
Scala conditional and loops statements
For comprehensions
Scala collections
Monads
Scala class, traits, and OO programming
Traits and inheritance
Case classes
Pattern Matcher
Partial functions
Package objects
Functions
Partial application
Curried functions
Operator overloading
Implicits
Futures
Reactive Programing and RxScala
Summary
Chapter 2: Creating Your App Architecture and Bootstrapping with SBT
Introducing SBT
Installing SBT on Ubuntu Linux
Getting started with SBT
Adding dependencies
Generating Eclipse project files from SBT
Application distribution
Hello world SBT / Scala App
Bootstrapping our Play framework app with Activator
Activator shell
Activator - compiling, testing, and running
Summary
Chapter 3: Developing the UI with Play Framework
Getting started
Creating our models
Creating routes
Creating our controllers
Working with services
Configuring the Guice module
Working with views(UI)
Summary
Chapter 4: Developing Reactive Backing Services
Getting started with reactive programming
Play framework and high CPU usage
Summary
Chapter 5: Testing Your Application
Unit testing principles
Testing with Junit
Behavior-Driven Development - BDD
MyFirstPlaySpec.scala - First BDD with ScalaTest and the Play framework
Testing with Play framework support
Testing routes
Controller testing
Summary
Chapter 6: Persistence with Slick
Introducing the Slick framework
MySQL setup
Configuring Slick in our Play framework app
FPM Mapping
Slick evolutions
Refactoring services
Refactoring controllers
Configuring DAO packages in Guice
Refactoring tests
Generic mocks
Service tests
Controller tests
Running the application
Summary
Chapter 7: Creating Reports
Introducing JasperReports
JasperReports workflow
Jasper sessions
Installing Jaspersoft Studio 6
Configuring MySQL Data Adapter in Jaspersoft Studio
Creating a product report
Creating a review report
Creating an image report
Integrating JasperReports with Play framework
Routes - adding new report routes
New centralized reports UI
Summary
Chapter 8: Developing a Chat with Akka
Adding the new UI introduction to Akka
Introduction to the Actor model
Message exchange and mailboxes
Coding actors with Akka
Actor routing
Persistence
Creating our chat application
The chat protocol
The chat controller
Configuring the routes
Working on the UI
Adding Akka tests
Summary
Chapter 9: Design Your REST API
Introduction to REST
REST API design
Creating our API with REST and JSON
Creating a Scala client
Creating our REST client proxies
Summary
Chapter 10: Scaling up
Standalone deploy
Reports folder
Changing report builder
Defining the secret
Running the standalone deploy
Architecture principles
Scalability principles
Mid-Tier load balancer, timeouts, Back pressure, and caching
Scaling up microservices with an Akka cluster
Scaling up the infrastructure with Docker and AWS cloud
Summary

What You Will Learn

  • Use Akka to create a chat service for your app
  • Equip yourself with the techniques and tools to build reports and build database persistence with Scala and Slick
  • Develop a customer-facing Rest API that makes use of Scala and Spray
  • Make use of the Scala web development principles and scale up the architecture of your application
  • Get familiar with the core principles and concepts of Functional Programming
  • Use the Play framework to create models, controllers, and views
  • Develop reactive backing frameworks by writing code with RxScala
  • Discover what proper testing entails with Scala using behavior-driven development

Authors

Table of Contents

Chapter 1: Introduction to FP, Reactive, and Scala
Functional programming
Principles of functional programming
Installing Java 8 and Scala 2.11
Read Eval Print and Loop - REPL
Scala Hello World using the REPL
Scala language - the basics
Scala variables - var and val
Creating immutable variables
Scala conditional and loops statements
For comprehensions
Scala collections
Monads
Scala class, traits, and OO programming
Traits and inheritance
Case classes
Pattern Matcher
Partial functions
Package objects
Functions
Partial application
Curried functions
Operator overloading
Implicits
Futures
Reactive Programing and RxScala
Summary
Chapter 2: Creating Your App Architecture and Bootstrapping with SBT
Introducing SBT
Installing SBT on Ubuntu Linux
Getting started with SBT
Adding dependencies
Generating Eclipse project files from SBT
Application distribution
Hello world SBT / Scala App
Bootstrapping our Play framework app with Activator
Activator shell
Activator - compiling, testing, and running
Summary
Chapter 3: Developing the UI with Play Framework
Getting started
Creating our models
Creating routes
Creating our controllers
Working with services
Configuring the Guice module
Working with views(UI)
Summary
Chapter 4: Developing Reactive Backing Services
Getting started with reactive programming
Play framework and high CPU usage
Summary
Chapter 5: Testing Your Application
Unit testing principles
Testing with Junit
Behavior-Driven Development - BDD
MyFirstPlaySpec.scala - First BDD with ScalaTest and the Play framework
Testing with Play framework support
Testing routes
Controller testing
Summary
Chapter 6: Persistence with Slick
Introducing the Slick framework
MySQL setup
Configuring Slick in our Play framework app
FPM Mapping
Slick evolutions
Refactoring services
Refactoring controllers
Configuring DAO packages in Guice
Refactoring tests
Generic mocks
Service tests
Controller tests
Running the application
Summary
Chapter 7: Creating Reports
Introducing JasperReports
JasperReports workflow
Jasper sessions
Installing Jaspersoft Studio 6
Configuring MySQL Data Adapter in Jaspersoft Studio
Creating a product report
Creating a review report
Creating an image report
Integrating JasperReports with Play framework
Routes - adding new report routes
New centralized reports UI
Summary
Chapter 8: Developing a Chat with Akka
Adding the new UI introduction to Akka
Introduction to the Actor model
Message exchange and mailboxes
Coding actors with Akka
Actor routing
Persistence
Creating our chat application
The chat protocol
The chat controller
Configuring the routes
Working on the UI
Adding Akka tests
Summary
Chapter 9: Design Your REST API
Introduction to REST
REST API design
Creating our API with REST and JSON
Creating a Scala client
Creating our REST client proxies
Summary
Chapter 10: Scaling up
Standalone deploy
Reports folder
Changing report builder
Defining the secret
Running the standalone deploy
Architecture principles
Scalability principles
Mid-Tier load balancer, timeouts, Back pressure, and caching
Scaling up microservices with an Akka cluster
Scaling up the infrastructure with Docker and AWS cloud
Summary

Book Details

ISBN 139781786461483
Paperback344 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Scala Test-Driven Development Book Cover
Scala Test-Driven Development
$ 31.99
$ 5.00
Mastering Akka Book Cover
Mastering Akka
$ 39.99
$ 5.00
Machine Learning with Spark Book Cover
Machine Learning with Spark
$ 29.99
$ 3.00
Scala: Guide for Data Science Professionals Book Cover
Scala: Guide for Data Science Professionals
$ 71.99
$ 5.00
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.00
Modern Python Cookbook Book Cover
Modern Python Cookbook
$ 39.99
$ 5.00