5 Best Free Scala Books
Scala is a modern, object-functional, multi-paradigm,
Java-based programming and scripting language that is released under
the BSD license. It blends the functional and object-oriented
programming models.
Scala introduces several innovative language constructs. It
improves on Java's support for object-oriented programming
by traits, which are stackable and cannot have constructor
parameters. It also offers closures, a feature that dynamic languages
like Python and Ruby have adopted.
Scala is particularly useful for building
cloud-based/deliverable Software as a Service (SaaS) online
applications, and is also proficient to develop traditional, imperative
code.
Scala helps programmers write tighter code. It uses a
number of techniques to cut down on unnecessary syntax, which helps to
make code succint. Typically, code sizes are reduced by an order of 2
or 3 compared to an equivalent Java application.
The focus of this article is to select the finest Scala
books which are available to download for free. So get reading and
learning.
|
1. Programming in Scala
|
 |
This book is a comprehensive step-by-step tutorial for
the Scala programming language, written by
people directly involved in the development of Scala. It is a
comprehensive tutorial and reference for Scala; the book covers the
entire language and important libraries.
Chapters cover:
- A Scalable Language
- First Steps in Scala - learn some Scala basics
- Next Steps in Scala - introduces some more advanced
features including lists, tuples, sets and maps
- Classes and Objects - takes a deeper look at classes
and objects with an overview of semicolon inference
- Basic Types and Operations - looks at
Scala's basic types and operations in more depth. It provides
an overview of Scala's basic types, including Strings and the
value types Int, Long, Short, Byte, Float, Double, Char, and Boolean.
Learn the operations that can be performed on these types, including
how operator precedence works in Scala expressions
- Functional Objects - classes that define
functional objects, that is, objects that do not have any mutable
state
- Built-in Control Structures - Scala has only
a handful of built-in control structures
- Functions and Closures - looks at methods, local
functions, first-class functions, short forms of function literals,
placeholder syntax, partially applied functions, closures, repeated
parameters, and tail recursion
- Control Abstraction - shows the reader how
to apply function values to create new control abstractions
- Composition and Inheritance - explores with much
greater detail into Scala's support for object-oriented programming
- Scala's Hierarchy - looks at Scala's class hierarchy
as a whole
- Traits - shows the reader how traits work
and shows two of the most common ways they are useful: widening thin
interfaces to rich ones, and defining stackable modifications
- Packages and Imports - shows several
constructs that help you program in a modular style
- Assertions and Unit Testing - shows the
reader several options to write and run assertions and unit tests
- Case Classes and Pattern Matching
- particularly helpful for tree-like recursive data
- Working with Lists - explains lists in
detail. It presents many common operations that can be performed on
lists. It also teaches some important design principles for programs
working on lists
- Collections - provides an overview of how collection
types relate to each other in the collections inheritance hierarchy
- Stateful Objects - explains what stateful
objects are, and what Scala provides in terms of syntax to express
them. The second part of this chapter introduces a larger case study on
discrete event simulation, which involves stateful objects as well as
building an internal domain specific language (DSL) for defining
digital circuits to simulate
- Type Parameterization - explains the details of type
parameterization in Scala
- Abstract Members - describes all four kinds
of abstract member: vals, vars, methods, and types. The authors also
broach pre-initialized fields, lazy vals,
path-dependent types, and enumerations
- Implicit Conversions and Parameters - shows
the reader how implicits work, and presents some of the most common
ways they are used
- Implementing Lists - explains how
lists are implemented in Scala
- For Expressions Revisited - details
the precise rules of writing for
expressions, see how they can make
combinatorial problems easier to solve, and
how for expressions are translated
- Extractors - explains what extractors are
and how you can use them to define patterns that are decoupled from an
object's representation
- Annotations - shows how to use annotations
in Scala. It shows their general syntax and how to use several
standard annotations
- Working with XML - offers a brief introduction into
Scala's support for XML
- Modular Programming Using Objects - discuss
how you can use Scala's object-oriented
features to make a program more modular
- Object Equality - looks at object equality in detail
and gives some recommendations to consider
when you design your own equality tests
- Combining Scala and Java - discusses how
Scala is translated to Java and the use of Java annotations in
Scala
- Actors and Concurrency - shows you the
basics of how to use Scala's actors library
- Combinator Parsing - introduces the language feature,
aliasing. The chapter also shows how various language elements can be
combined in the design of a very high-level library
- GUI Programming - learn how to develop in Scala
applications that use a graphical user interface (GUI)
- The SCells Spreadsheet - see how constructs play
together in the implementation of a sizable
application. The task is to write a spreadsheet application, SCells
This book has also been released in a second edition,
although that edition is not available for free.
|
|
2. Programming Scala
|
|
Programming Scala introduces a language that offers all
the benefits of a modern object model, functional programming, and an
advanced type system. This book teaches the reader how to be productive
with Scala quickly, and explains what makes this language ideal for
today's highly scalable, component-based applications that support
concurrency and distribution.
Chapters cover:
- Zero to Sixty: Introducing Scala
- Type Less, Do More - discusses uses of Scala
that promote succinct, flexible code
- Rounding Out the Essentials
- Traits
- Basic Object-Oriented Programming in Scala
- Advanced Object-Oriented Programming In Scala
- The Scala Object System
- Functional Programming in Scala
- Robust, Scalable Concurrency with Actors
- Herding XML in Scala
- Domain-Specific Languages in Scala
- The Scala Type System
- Application Design
- Scala Tools, Libraries and IDE Support
The book is part of the O'Reilly Media Open Feedback
Publishing System.
|
|
3. Exploring Lift
|
 |
| Website |
exploring.liftweb.net |
| Author |
Derek Chen-Becker, Marius Danciu and Tyler Weir
|
| Format |
PDF, HTML, HTML (Single Page) |
| Pages |
289 |
Lift is an open source web application framework that is
designed for the Scala programming language. This books seeks to
educate the reader about Lift, to create and extend
web applications.
Chapters cover:
- Build a basic expense tracker called PocketChange
- Fundamentals - covers some of the fundamental aspects
of writing a lift application, including the architecture of the Lift
library and how it processes requests, Templates, Views, Snippets, and
how requests are dispatched to a Class.method. The chapter also goes on
to a discussion about how to intercept requests and handle them
- Templates in Lift - discusses
template capabilities and syntax, including built-in tags provided by
Lift that perform special template processing. It also covers how you
can write your own View classes, Scala code that can programmatically
generate template XML, and ends with a discussion on various templating
functionality
- Snippets - a Scala method that transforms input
XML into output XML. This chapter explores the ins and outs of
snippets, looking at the snippet tag, snippet dispatch, snippet
methods, and handling XHTML attributes in snippets
- Forms in Lift - discusses the specifics of
how you generate and process forms with Lift
- SiteMap - provides a map (menu) for your site, access
control mechanisms, grouping of menu items, nested menus, request
rewriting and state-dependent computations for such things as page
titles, page-specific snippets, etc
- The Mapper and Record Frameworks
- Advanced Lift Architecture - dive
into some of the advanced guts of Lift. It includes an architectural
overview, the request/response lifecycle, lift function mapping,
LiftResponse in detail, session management, and other lift features
- Lift and JavaScript - discusses some of the
techniques that Lift provides for simplifying and abstracting access to
JavaScript on the client side
- AJAX and Comet in Lift
- JPA Integration
- Third Party Integration - shows the reader how to
integrate Lift with some well-known third party libraries and
applications including OpenID, AMQP, PayPal, Facebook, XMPP, and
Lucene/Compass
- Lift Widgets
- RESTful Web Services
This work is licensed under the Creative Commons
Attribution-No Derivative Works 3.0 Un-ported License.
|
|
4. Scala by Example
|
 |
Scala by Example introduces Scala in an informal way,
through a sequence of examples. The book examines Scala's interesting
features, introduces the language constructs, objects and classes,
lists and streams and more.
Chapters cover:
- Implementation of Quickshort in Scala
- Programming with Actors and Messages
- Expressions and simple functions
- Parameters
- Conditional Expressions
- Example: Square Roots by Newton's Method
- Nested Functions
- Tail Recursion
- First-Class Functions - introduces higher-order
functions and shows how they provide a flexible mechanism for program
composition.
- Anonymous Functions
- Currying
- Example: Finding Fixed Points of Functions
- Classes and Objects
- Case Classes and Pattern Matching
- Case Classes and Case Objects
- Pattern Matching
- Generic Types and Methods
- Type Parameter Bounds
- Variance Annotations
- Lower Bounds
- Least Types
- Tuples
- Functions
- Lists - introduces lists as a fundamental
data structure in programming
- Using Lists
- Definition of class List I: First Order Methods
- Example: Merge sort
- Definition of class List II: Higher-Order Methods
- For-Comprehensions - Scala has a special notation
which simplifies common patterns of applications of higher-order
functions
- The N-Queens Problem
- Querying with For-Comprehensions
- Translation of For-Comprehensions
- For-Loops
- Mutable State - introduces functions with side
effects and study their behavior
- Stateful Objects
- Imperative Control Structures
- Extended Example: Discrete Event Simulation
- Computing with Streams
- Iterators - the imperative version of
streams
- Iterator Methods
- Constructing Iterators
- Using Iterators
- Lazy Values - provide a way to delay initialization
of a value until the first time it is accessed
- Implicit Parameters and Conversions
- Hindley/Milner Type Inference
- Abstractions for Concurrency - reviews common
concurrent programming patterns and shows howthey can be implemented in
Scala
- Signals and Monitors
- SyncVars
- Futures
- Parallel Computations
- Sempahores
- Readers/Writers
- Asynchronous Channels
- Synchronous Channels
- Workers
- Mailboxes
- Actors
|
|
5. A Scala Tutorial for Java Programmers
|
 |
A Scala Tutorial for Java Programmers provides a quick
introduction to the Scala language and compiler. It
is intended for people who already have some programming experience and
want an overview of what they can do with Scala.
This tutorial covers the following topics:
- A first example with the standard 'Hello world'
program, demonstrating the use of the Scala tools
- Example that shows how easy it is to interface with
Java code
- Everything is an object: Numbers, functions,
Anonymous functions
- Classes - they are declared using a syntax similar to
that of Java
- Case classes and pattern matching
- Traits
- Genericity - the ability to write code parametrized
by types
|
Last Updated Sunday, April 28 2013 @ 12:12 PM EDT |