Part 2. Working with Scala

These five chapters in part 2 focus on working with Scala. You’ll build applications using the Simple Build Tool (SBT), connect to a database using Squeryl, build scalable and reusable components in Scala, and use actors to make concurrent programming easy.

Chapters 6 and 7 are companions, or rather, chapter 7 is an extension of chapter 6. In chapter 6 you’ll learn how to create a simple web application using the SBT and the Scalaz HTTP module. But the application you set out to build in chapter 6 won’t be complete by chapter’s end because to build a functional Kanban application, your application needs to store information such as stories and its status information into persistent storage. In chapter 7 you will complete the weKanban application and learn how to retrieve and store information in a relational database.

In chapter 8, in which you will learn how to build simple and reusable components, your focus will be on the type system—types of types. You’ll also learn about a new kind of polymorphism using type classes that allows you to express and create abstractions that are easy to extend and scale—a powerful construct to help you solve your day-to-day programming problems.

In chapter 9 Scala’s actor library takes center stage. Think of an actor as an object that processes a message (your request) and encapsulates state (state is not shared with other actors). The ability to perform action in response to an incoming message is what makes an object an actor. At a high level, actors are the way you should do OOP. The important thing to remember is that the actor model encourages no shared state architecture. I explain why that’s an important property to have for any concurrent program.

The goal in chapter 10 is to make you comfortable writing automated tests in Scala so that you can build production-quality software. The path to writing well-crafted code is the path where you write tests for your code. Another goal is to dispel the common perception that writing tests is hard. Your first steps will be getting started with practices like test-driven development (TDD) and continuous integration for your Scala project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset