Free Sample
+ Collection

Scala for Java Developers

Progressing
Thomas Alexandre

Build reactive, scalable applications and integrate Java code with the power of Scala.
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook

Want this title & more?

$16.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783283637
Paperback282 pages

About This Book

  • Learn the syntax interactively to smoothly transition to Scala by reusing your Java code
  • Leverage the full power of modern web programming by building scalable and reactive applications
  • Easy to follow instructions and real world examples to help you integrate java code and tackle big data challenges

Who This Book Is For

If you are a Java developer or a Java architect working with Java EE-based solutions and want to start using Scala in your daily programming, then this book is ideal for you. This book will get you up and running quickly by adopting a pragmatic approach with real-world code samples. No prior knowledge of Scala is required.

Table of Contents

Chapter 1: Programming Interactively within Your Project
Advantages of using Scala for Java projects
Learning Scala through the REPL
Operations on collections
Summary
Chapter 2: Code Integration
Creating a REST API from an existing database
Adding a test in Scala
Setting up Scala within a Java Maven project
Scala and Java collaboration
Differences in style between Java and Scala code
Summary
Chapter 3: Understanding the Scala Ecosystem
Inheriting Java Integrated Development Environments (IDEs)
Building with Simple Build Tool (SBT)
Experimenting with Scala Worksheets
Working with HTTP
Taking advantage of Typesafe Activator
The REPL as a scripting engine
Summary
Chapter 4: Testing Tools
Writing tests with ScalaTest
Testing with ScalaCheck
Summary
Chapter 5: Getting Started with the Play Framework
Getting started with the classic Play distribution
Getting started with the Typesafe Activator
Architecture of a Play application
Playing with authentication
Practical tips when using Play
Summary
Chapter 6: Database Access and the Future of ORM
Integrating an existing ORM – Hibernate and JPA
Dealing with persistence in the Play Framework
Replacing ORM
Learning about Slick
Scaffolding a Play application
Summary
Chapter 7: Working with Integration and Web Services
Binding XML data in Scala
Working with XML and JSON
Handling Play requests with XML and JSON
Summary
Chapter 8: Essential Properties of Modern Applications – Asynchrony and Concurrency
The pillars of Concurrency
The Async library – SIP-22-Async
Getting started with Akka
Summary
Chapter 9: Building Reactive Web Applications
Describing reactive applications
Handling streams reactively
Experimenting with WebSockets and Iteratees in Play
Learning from activator templates
Playing with Actor Room
Summary
Chapter 10: Scala Goodies
Exploring MongoDB
Scratching the surface of Big Data
Introducing DSLs in Scala
Introducing Scala.js
Final tips
Summary

What You Will Learn

  • Apply and control the Scala Ecosystem
  • Migrate Java code to Scala
  • Discover Play Framework web development
  • Test data using Scala's testing frameworks
  • Manipulate XML and JSON in Scala
  • Learn the Scala syntax interactively
  • Integrate Java projects in Scala
  • Build reactive web apps using the Typesafe stack
  • Use new systems including the Akka framework, the Play web framework, and the emerging Slick framework
  • Tackle big data challenges

In Detail

Scala for Java Developers is a step-by-step guide full of easy-to-follow code taken from real-world examples explaining the migration and integration of Scala in a Java project.

With this book, you will first get comfortable with the Scala syntax and its Java-like ecosystem, and then dive into new ways of building reactive web apps using the Typesafe stack including the actor-based Akka framework, the Play web framework, and the emerging Slick framework for persistence. The book will then teach you how to review useful tools for unit, integration, and functional testing; demonstrate how integrating with external systems applies to the Scala world and what its benefits are.

From learning the Scala syntax interactively to writing modern, scalable, reactive applications, this book will help you to take your skills to the next level by solving complex problems in a concise and maintainable way.

Authors

Read More