Course Outline
Scala (see http://www.scala-lang.org/) is a new Functional OO language available for the Java world and the .NET world. The latest version of Scala is most aligned with the Java world (as it compiles to the same byte codes as java) and can interoperate with Java. This course aligns with this version of Scala.
Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive.
Hands-on Exercises
The completed exercises and solutions provide useful skeletons which can be used as a basis for the development of purpose built applications, including:
1. Code for database access
2. Code for a network client and server
3. Code for a graphical text editor
Untitled Document
Day 1:
1. Introduction
2. Overview of Scala
Scala, Functional Programming and OO
3. Scala Tooling and Basic application
Installing Scala, and the Scala IDE, Hello World in Scala. Main method, application trait, variations, val and var. Basic definition, long form, nested packages
Practical 1
4. Basic language structures
5. Scala type System and type inference, mutability and immutability
Scala types, Infering types, Literals, Symbols in Scala
Practical 2
Day 2
6. Basic Classes, Objects and Singletons
Defining classes, Objects and Singeltons, implicit constructors, Object equality v. referential equality. Methods and fields
Practical 3
7. Arrays and Tuples
8. Collections (Sets and Maps)
Practical 4
9. Control Structures
while, if, For-expressions and -loops
10. Inheritence
Inheritance, method overriding, sealed classes, abstract members
Practical 5
Day 3
11. Scala Functions and Functional programming Concepts
Practical 6
12. Testing in Scala
Practical 7
13. Generic Types and Annotations
14. Traits and Mixing in traits and stacking traits
Practical 8
Day 4
15. Java Interoperation
Practical 9
16. Actors
Practical 10
17. Scala and XML
Practical 11
18. Implicit Conversions and Parameters & Annotations