Professional Scala

Aliaksandr Bedrytski

ISBN: 9788126563289

240 pages

INR 699

Description

Professional Scala provides experienced programmers with fast track coverage aimed at supporting the use of Scala in professional production applications. Skipping over the basics and fundamentals of programming, the discussion launches directly into practical Scala topics with the most up-to-date coverage of the rapidly-expanding language and related tools. Scala bridges the gap between functional and object-oriented programming, and this book details that link with clear a discussion on both Java compatibility and the read-eval-print loop used in functional programming. You'll learn the details of tooling for build and static analysis.

Introduction

 

Chapter 1: Language Features

  • Static Types and Type Inference
  • Implicit Parameters, Conversions and Their Resolution
  • Case Class, Tuples and Case Object  
  • Abstract Class, Traits and Sealed  
  • Pattern Matching
  • Statements Are Expressions
  • String Interpolation
  • Scala Collections, immutable and mutable
  • For Comprehension
  • Packages, Companion Objects, Package Objects and Scoping
  • AnyVal, AnyRef, Any and the Type Hierarchy
  • Summary

 

Chapter 2: Functional Programming

  • Immutability
  • Pure Functions
  • Recursion
  • Higher-Order Functions
  • Core Collection Methods
  • Methods Returning a Collection
  • Methods Returning a Value
  • Currying and Partially Applied Functions
  • Null Handling (Option)
  • Strict versus Non-Strict Initialization
  • Summary

 

Chapter 3: Java Compatibility

  • Scala and Java Collections
  • Interfaces and Traits
  • Scala / Java Enumerations
  • Summary

 

Chapter 4: Simple Build Tool

  • Basic Usage
  • Project Structure
  • Single Project
  • Scopes
  • Custom Tasks
  • Dependencies
  • Resolvers
  • Advanced Usage
  • Advanced Dependencies
  • Testing in the Console
  • Release Management
  • Deploying to Sonatype
  • Packaging with SBT-Native-Packager
  • Creating a Docker Image
  • Common SBT Commands
  • Useful Plugins
  • Summary

 

Chapter 5: Maven

  • Getting Started with Maven and Scala
  • Introducing scala-maven-plugin
  • Adding Library Dependencies
  • Using the REPL
  • Getting Help
  • Running Tests
  • Joint Compilation with Java
  • Accelerating Compilation with Zinc
  • Summary

 

Chapter 6: Scala Style / Lint

  • Scala with Style
  • Scaliform
  • Scapegoat
  • WartRemover
  • Scoverage
  • Summary

 

Chapter 7: Testing

  • ScalaTest
  • Unit Tests
  • Integration Testing
  • Data-Driven Tests
  • Performance Testing
  • Acceptance Testing
  • Mocks
  • Load Testing
  • Summary

 

Chapter 8: Documenting Your Code with Scaladoc

  • Why Document Your Code?
  • Revealing the Benefits
  • Bookending the Continuum
  • Choosing What to Document
  • Scaladoc Structure
  • Overall Layout
  • Index Pane
  • Content Pane
  • Invoking the Scaladoc Tool
  • Wiki Syntax
  • Formatting with Inline Wiki Syntax
  • Structuring with Block Elements
  • Linking
  • Locating Scaladoc
  • Tagging
  • Everyday Tagging
  • Tagging for Groups
  • Advanced Tagging
  • Invoking scaladoc: Additional Options
  • Integrating Scaladoc Creation with Your Project
  • Configuring Maven
  • Configuring SBT
  • Publishing Scaladoc
  • Tables and CSS
  • Summary

 

Chapter 9: Type System

  • What is a Type System?
  • Static versus Dynamic Typing
  • What Static Type Systems Are Good For
  • What Dynamic Type Systems Are Good For
  • Scala's Unified Type System
  • Value Classes
  • Polymorphism
  • Subtype Polymorphism
  • Parametric Polymorphism
  • Ad Hoc Polymorphism
  • Bounds
  • Context Bounds
  • Upper and Lower Bounds
  • Variance
  • Other Niceties
  • Self-Type Annotations
  • Self-Recursive Types
  • Abstract Type Members
  • Dynamic Programming
  • Structural Types
  • Dynamic Trait
  • Summary

 

Chapter 10: Advanced Functional Programming

  • Higher-Kinded Types
  • Functional Design Patterns
  • Functor
  • Applicative Functor
  • Monad
  • Semigroup
  • Monoid
  • Summary

 

Chapter 11: Concurrency

  • Synchronize / Atomic Variables
  • Future Composition
  • Parallel Collections
  • Reactive Streams
  • STM
  • Actors (Akka)
  • Spark
  • Summary

 

Chapter 12: Scala.Js

  • Scala.js and Its Design 20
  • Getting Started: Scala.js with SBT
  • Scala.js Peculiarities
  • Webjars and Dealing with the Frontend Ecosytem

 

Summary

Index

January Issue of Developer IQ

 


Scala