Getting Started with Scala: Object-Oriented and Functional Programming for Beginners

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Getting Started with Scala: Object-Oriented and Functional Programming for Beginners is the perfect initiation into the world of programming, emphasizing the hybrid nature of Scala as it combines both functional and object-oriented paradigms. The book takes readers on a journey from the basics, covering object orientation and Scala Swing for desktop applications to web application development and services. With a focus on functional programming, it equips beginners with the knowledge and skills needed to write clean, efficient code. Whether exploring desktop interfaces or diving into web development, this book serves as an essential guide to harnessing Scala's power for versatile and modern programming.

Author(s): Educohack Press
Publisher: Educohack Press
Year: 2023

Language: English
Pages: 1214

Getting Started with Scala: Object-Oriented and Functional Programming for Beginners
1.1 Introduction
1.2 What Is Scala?
1.3 Why Scala?
1.4 Java to Scala Quick Comparison
1.5 Scala Versions
1.6 Is This Book for You?
1.7 Approach Taken by This Book
2.1 Introduction
2.2 Terminology
2.3 Types of Hierarchy
2.4 The Move to Object Technology
2.5 Summary
2.6 Exercises
2.7 Further Reading
3.1 Introduction
3.2 The Procedural Approach
3.3 Does Object Orientation Do Better?
3.4 Summary
4.1 Introduction
4.2 The Application: Windscreen Wipe Simulation
4.3 Where Do We Start?
4.4 Identifying the Objects
4.5 Identifying the Services or Methods
4.6 Refining the Objects
4.7 Bringing It All Together
4.8 Where Is the Structure?
4.9 Summary
4.10 Exercises
4.11 Further Reading
References
5.1 Introduction
5.2 What Is Functional Programming?
5.3 Advantages to Functional Programming
5.4 Disadvantages of Functional Programming
5.5 Scala and Functional Programming
6.1 Introduction
6.2 The Class Person
6.3 Functional Programming
6.4 A Hybrid Language
7.1 Introduction
7.2 The Scala Environment
7.3 The Scala Shell
7.4 The Scala IDE
7.5 Implementing the Object
7.6 Running the Application
7.7 Scala Classpath
7.8 Compiling and Executing Scala
7.9 Memory Management
8.1 Introduction
8.2 Apps and Applications
8.3 The Basics of the Language
9.1 Introduction
9.2 Classes
9.3 Case Classes
10.1 Introduction
10.2 Method Definitions
10.3 Named Parameters
11.1 Introduction
11.2 Packages
11.3 Import Options
11.4 Additional Import Features
11.5 Package Objects
11.6 Key Scala Packages
11.7 Default Imports
11.8 Encapsulation
12.1 Introduction
12.2 Create a New Module
12.3 Create a New Package
12.4 Create a New Class
12.5 Defining the Class
12.6 Adding Behaviour
12.7 Test Application
12.8 Override Tostring
12.9 Extras
13.1 Introduction
13.2 Inheritance Between Types
13.3 Inheritance Between Classes
13.4 Restricting a Subclass
13.5 Abstract Classes
13.6 The Super Keyword
13.7 Scala Type Hierarchy
13.8 Polymorphism
14.1 Introduction
14.2 Singleton Objects
17.4 Equality
17.5 Recursion
18.1 Introduction
18.2 What Are Traits?
18.3 Defining a Trait
18.4 Using a Trait
18.5 Abstract Trait Members
18.6 Dynamic Binding of Traits
18.7 Sealed Traits
18.8 Marker Traits
18.9 Trait Dependencies
18.10 To Trait or not to Trait
19.1 Introduction
19.2 Stackable Modifications
19.3 Fat Versus Thin Traits
19.4 Universal Traits
19.5 Traits for a Data Type
19.6 Single Abstract Method (SAM) Traits
20.1 Introduction
20.2 Arrays
20.3 Creating Square Arrays
20.4 Looping Through Arrays
20.5 The Main Method Revisited
21.1 Introduction
21.2 Tuples
21.3 Tuple Characteristics
21.4 Tuple Classes
21.5 Creating a Tuple
21.6 Working with Tuples
21.7 Iterating Over a Tuple
21.8 Element Extraction
22.1 Introduction
22.2 Scala as a Functional Language
22.3 Defining Scala Functions
22.4 Class, Objects, Methods and Functions
22.5 Lifting a Method
22.6 Single Abstract Method Traits
22.7 Closure
22.8 Referential Transparency
23.1 Introduction
23.2 Higher-Order Function Concepts
23.3 Scala Higher-Order Functions
23.4 Using Higher-Order Functions
23.5 Higher-Order Functions in Scala Collections
24.1 Introduction
24.2 Partially Applied Functions
24.3 Currying
25.1 Introduction
25.2 What Are Collections?
25.3 Scala Collections
26.1 Introduction
26.2 The Immutable List Collection
26.3 The Immutable Map Type
27.1 Introduction
27.2 Package Scala.Collection.Immutable
27.3 Package Scala.Collection.Mutable
27.4 Generic Collections
27.5 Summary
28.1 Introduction
28.2 The Set Class
28.3 Adding Type Parameterisation
28.4 Variance
28.5 Lower and Upper Bounds
28.6 Combining Variance and Bounds
29.1 Introduction
29.2 Implicit Conversions
29.3 Implicit Parameters
29.4 Implicit Objects
29.5 Implicit Classes
29.6 Scala Annotations
29.7 Type Declarations
29.8 Enumerations
29.9 Lazy Evaluation
39.3 A RESTful API
39.4 Creating the RESTful Web Application
39.5 JavaScript and jQuery
39.6 The jQuery Client
40.1 Introduction
40.2 Obtaining Scalaz
40.3 Scalaz Overview
40.4 Some Useful Typeclasses
40.5 Standard Class Extensions
40.6 The Other Either
40.7 Tagging
41.1 Introduction
41.2 Windows as Objects
41.3 Windows in Scala
41.4 Scala Swing
41.5 Scala Swing Packages
41.6 Swing Scala Worked Examples
42.1 Introduction
42.2 Handling User Input
42.3 A Simple GUI Example