Find online courses made by experts from around the world.
Take your courses with you and learn anywhere, anytime.
Learn and practice real-world skills and achieve your goals.
Stairway to Scala Applied, part 3 is the final part of this Scala programming language course. The course in its entirety is aimed at giving you a full, day-to-day working knowledge of Scala programming, including some of the most common core library APIs.
This part starts with a final language feature for Scala (continuing from the other language features covered in parts 1 and 2). Pattern matching, partial functions and case classes are examined, how they can be used together, and how partial functions can help you avoid certain runtime errors by validating input to a function before you call it.
Following that we look at the Futures api in the core libraries and Actors using the Akka library. Then we delve into the collections API in the core libraries (a very in-depth 2 module examination of the capabilities and performance tradeoffs of the various collection options), and finish up with a look at using Scala on Java projects, using Java libraries from Scala and how to harness build tools (particularly SBT) to build your project and even write custom settings and tasks.
This course is also a good lead-in to the Stairway to Scala Advanced 3 part course which concentrates on in-depth language features, higher level functional abstractions, common patterns and idioms, type theory and other more advanced Scala concepts that will be particularly helpful for anyone writing their own libraries and APIs in Scala.
Not for you? No problem.
30 day money back guarantee.
Learn on the go.
Desktop, iOS and Android.
Certificate of completion.
|Section 1: Course Introduction and Exercises|
Please download the exercises attached to this lecture and unzip them somewhere on your machine where you can find them later. Also, if you have not already done so, please follow the free course instructions at https://www.udemy.com/stairway-to-scala-setup-instructions/learn/#/ so that you are ready to run both the Scala REPL and the exercises.
Thanks and enjoy the course. This is part three of a three part course, the first part covers converting to Scala from other programming languages and part two covers Scala language features that might be different from other languages or perhaps even unique. This part three finishes the tour of powerful language features with case classes and pattern matching, then moves on to the most important core library features, like collections, futures, actors and also covers building and working with Java.
|Section 2: Case Classes and Pattern Matching|
Flight 12 IntroductionPreview
Flight 12 GoalsPreview
Defining case classesPreview
What you get: 1. A factory methodPreview
What you get: 2. Parametric fieldsPreview
What you get: 3. equals/hashCode/toStringPreview
What you get: 4. copyPreview
Lower case variables, upper case constants
Sequence patterns, :: style
Type check and cast (poor style)
Type erasure means more matches
Pattern guard examples
The Option type
Patterns in variable definitions
Patterns in for expressions
Exercises for Flight 12
Case Classes and Pattern Matching
|Section 3: Partial Functions and Actors|
Flight 13 Introduction
Flight 13 Goals
Conceptual partial function
Actual partial functions
Partial function literals
It really is a partial function
3-element list works, empty list does not
How it's compiled
An actor's act method
Start an actor with start()
Each actor runs independently
The actor method
Sending a message
An actor has an "inbox"
Creating an Akka Actor
Using the Actor
Back to the Future!
In the Future, everything will be better
I Never Promised You A Perfect Future
Exercises for Flight 13
Partial Functions and Actors
|Section 4: Working with Lists|
Flight 14 Introduction
Flight 14 Goals
Lists are homogeneous and covariant
Basic operations on lists
Insertion sort with head, tail, isEmpty
Insertion sort with pattern matching
First-order methods on List
length, init, last
reverse, take, drop
zip, zipWithIndex, unzip
Higher-order functions: map
filter, partition, exists
find, takeWhile, dropWhile
Fold left concept
Fold left code
Exercises for Flight 14
Working with Lists
|Section 5: Scala's Collections Library|
Flight 15 Introduction
Flight 15 Goal
Mutability modeled with types
Consistent equality continued
Consistent return types
Traversable: easy conversion
Traversable: easy conversion continued
Traversable : easy concatenation
Traversable: How do I collect elements mapped by a *partial* function?
Traversable: How do you partition into two collections according to a predicate?
Dick is a Scala Developer with over 8 years of Scala development experience, and over 6 years of Scala training experience. As well as consulting in Scala, Dick contributes to a number of open source Scala projects, libraries and tools, and is very active in the Scala developer community. He is also one of the Scalawags, a video podcast about the Scala language. Along with Bill Venners he runs Escalate Software which provides Scala training services.