Scala
=====
—–
* Course Id : PROG-SCAL
* Duration : 24 Hours
Overview
—–
* Scala is an object-oriented language that supports many traditional design patterns from previous programming languages
* Scala is also a functional language with first-class functions, libraries, and immutable data structures
* No declaration is needed for variables; the Scala compiler can infer the types of most variables
* Programmers can designate multiple traits for a class, and then combine their interface and behavior
* It supports first-class objects and anonymous functions
* Scala supports concurrent and distributed computing
Pre-Requisites
—–
* Basic knowledge of Java Programming
Training Objectives
—–
* Installation and Programming in Scala
* Understand object-orientation approach
* Understand the use of functional programming techniques
* Learn about Test-driven development using Scala
* Manipulate Pattern Matching and XML in Scala
Course Structure
—–
* We provide more focus on hands-on in our technical courses (typically 80% hands-on/20% theory)
* Students get the capability to apply the material they learn to real-world problems
Materials Provided
—–
* PDF of slides and hands-on exercises
* Access to instance with lab environment
Software Requirements
—–
* Any current internet browser
Hardware Requirements
—–
* Processor: 1.2 GHz
* RAM: 512 MB
* Disk space: 1 GB
* Network Connection with low latency (<250ms) to Internet
Course Outline
## Daywise Course Outline
—–
## Day 1
—–
* Introduction to Scala
* Key Features of the Scala Language
* Basic Programming in Scala
## Day 2
—–
* OO Development in Scala
* Functional Programming in Scala
* Pattern Matching in Depth
## Day 3
—–
* Test Driven Development in Scala
* XML Manipulating in Scala
* Writing Concurrent Apps
## Detailed Course Outline
—–
Unit 1 : Introduction to Scala
—–
* A brief history of the Java platform to date
* Distinguishing between the Java language and platform
* Pain points when using Java for software development
* Possible criteria for an improved version of Java
* How and why the Scala language was created
Unit 2 : Key Features of the Scala Language
—–
* Everything is an object
* Class declarations
* Data typing
* Operators and methods
* Pattern matching
* Functions
* Anonymous and nested functions
* Traits
Unit 3 : Basic Programming in Scala
—–
* Built in types, literals and operators
* Testing for equality of state and reference
* Conditionals, simple matching and external iteration
* Working with lists, arrays, sets and maps
* Throwing and catching exceptions
* Adding annotations to your code
* Using standard Java libraries
Unit 4 : OO Development in Scala
—–
* A minimal class declaration
* Understanding primary constructors
* Specifying alternative constructors
* Declaring and overriding methods
* Creating base classes and class hierarchies
* Creating traits and mixing them into classes
* How a Scala inheritance tree is linearized
Unit 5 : Functional Programming in Scala
—–
* Advanced uses of for expressions
* Understanding function values and closures
* Using closures to create internal iterators
* Creating and using higher order functions
* Practical examples of higher order functions
* Currying and partially applied functions
* Creating your own Domain Specific Languages(DSL’s)
Unit 6 : Pattern Matching in Depth
—–
* Using the match keyword to return a value
* Using case classes for pattern matching
* Adding pattern guards to match conditions
* Partially specifying matches with wildcards
* Deep matching using case constructors
* Matching against collections of items
* Using extractors instead of case classes
Unit 7 : Test Driven Development in Scala
—–
* Writing standard JUnit tests in Scala
* Conventional TDD using the ScalaTest tool
* Behavior Driven Development using ScalaTest
* Using functional concepts in TDD
Unit 8 : XML Manipulating in Scala
—–
* Working with XML literals in code
* Embedding XPath like expressions
* Using Pattern Matching to process XML data
* Serializing and deserializing to and from XML
Unit 9 : Writing Concurrent Apps
—–
* Issues with conventional approaches to multi-threading
* How an actor-based approach helps you write thread-safe code
* The Scala architecture for creating actor-based systems
* Different coding styles supported by the actor model
