Typesafe Training - Fast Track to Scala
Location - Chariot - Philadelphia
Date(s) - Thu Oct 18 - Fri Oct 19
Course Description
Note: You may use one of our Mac workstations, or bring your own laptop to this course.
This two-day course, designed by Martin Odersky, the creator of the Scala programming language, and Heiko Seeberger, a recognized Scala expert, will give you an excellent grounding in Scala.
It is intended to enable developers or development managers, who are experienced programmers in Java or other production languages like C++, C# or Ruby, to confidently start programming in Scala. No previous knowledge of Scala is assumed. Although intense, the course ensures you will have a solid understanding of the fundamentals of the language, the tooling and the development process as well as a good appreciation of the more advanced features. If you already have Scala programming experience, then this course could be a useful refresher.
After having participated in this course you should
- be a competent user of Scala constructs in application code
- know and be able to apply the functional programming style in Scala
- know how to use the fundamental Scala tools
- be confident to start using Scala in production applications
The presentation will frequently be mixed with hands-on exercises that give you a good opportunity to try what you have learnt and a chance to clarify your understanding. If you bring your own machine, please make sure you have administrative access to install software and that you have already installed Java JDK 6. Eclipse, vim, emacs or another IDE/ text editor will be necessary.
Pre-requisites
Prior experience in Java, C#, C++, Ruby or other production languages.
Course Outline
Why Scala?
- Short history
- Overview of Scala’s core characteristics
Setting up the development environment
- Installing the Scala distribution
- Installing Eclipse and the Scala plugin
- Installing sbt
First steps
- Interactive programming in the REPL
- Variables and methods
- Expressions and type inference
- First glance at functions
Basic OO features
- Classes, class parameters, constructors
- Fields, class parameters as fields
- Methods
- Operators
- Named and default arguments
- Packages and imports
- Access modifiers
- Singleton objects, companions, Predef
- Case classes
Testing in Scala
- SBT managed dependencies
- Test-driven development with triggered test (~test)
- Testing with specs2
Collections and Functional Programming
- Collection hierarchy, creating instances
- Type parameters
- Tuples
- Immutability versus mutability
- Some important collection methods
- Higher-order functions and function literals
- Functions values, function types, short notation
- Important higher order functions: map, flatMap and filter
For-expressions and -loops
- Generators
- Filters
- Definitions
- Translation of for-expressions and -loops
Inheritance and traits
- Extending classes
- Final and sealed classes
- Enumerations
- Overriding members
- Abstract classes
- Implementing abstract members
- Standard type hierarchy
- Traits and mix-in composition
Pattern Matching
- Match-expressions
- Pattern types
- Pattern guards
- Patterns outside of match expressions
Dealing with optional values

