Skip to main content

2017 | Buch

Programming with Scala

Language Exploration

insite
SUCHEN

Über dieses Buch

This reader-friendly textbook presents a concise and easy to follow introduction to Scala. Scala is an ideal first programming language, which permits programming in multiple paradigms, and enables developers to be more productive with modern computing infrastructures such as distributed environments.

Topics and features: provides review questions and problem-solving exercises (with solutions) in each chapter, inspired by real-world applications; addresses each topic in a self-contained manner, highlighting how Scala can be evolved and grown according to the developer’s needs; presents examples from a broad range of different application domains, including consumer electronics, online payment, retail, vehicle manufacturing, and healthcare; encourages an innovation-oriented mind-set, and the development of practical, saleable skills; draws from the author’s extensive experience in industrial software development, academic research, and university teaching.

This accessible and hands-on guide will embolden professional software engineers to make the switch to Scala. Instructors teaching introductory programming courses will also find this textbook popular among their students.

Inhaltsverzeichnis

Frontmatter
Chapter 1. Introduction to Computing
Abstract
The Oxford English Dictionary (OED) defines computing as “the use of operation of computers”; similarly, computation is defined as “the action of mathematical calculation.” In daily life, we often find these words being used interchangeably even though the scientific community makes a distinction. Let’s first analyze computation as it appeared first in human civilization, formally with the invention of numbers.
Bhim P. Upadhyaya
Chapter 2. Scala Fundamentals
Abstract
In this chapter, we will cover building blocks of the Scala programming language. As name suggests, building blocks are like alphabets of a programming language. One of the observations we made both in industry as well as in academia is that learners tend to overlook basic building blocks, thinking that the subject matter is too basic.
Bhim P. Upadhyaya
Chapter 3. Classes and Objects
Abstract
Classes and objects in Scala allow us to model real world classes and objects. Let’s recall our education system. If you went through a formal education system anywhere in the world, most likely you went through a classification system, i. e., you joined in the first level, you learnt and changed your knowledge status, and then you were promoted to the next level.
Bhim P. Upadhyaya
Chapter 4. Control Structures
Abstract
In our daily lives, we have a flow of activities. In a particular day, we do a series of things and it is fair to say that we make several choices consciously or unconsciously. Also it may not be inaccurate to say that we repeat things on a daily basis.
Bhim P. Upadhyaya
Chapter 5. Operators
Abstract
Operators provide us with mechanisms to process values. A typical computer is mostly about processing values. In isolation, operators look simple, but when combined with other building blocks of Scala, they can quickly result in a complex program.
Bhim P. Upadhyaya
Chapter 6. Data Input and Output
Abstract
Generally users interact with computers using input and output devices. That means communication is data, i.e., either they supply data to computers or they consume data from computers. From the users’ perspective data can be numbers, texts, images, graphs and other visualizations, etc.
Bhim P. Upadhyaya
Chapter 7. Inheritance and Composition
Abstract
There are numerous natural hierarchies in the real world. Also we, human beings, have created many systems that have hierarchies. In hierarchies, sometimes things flow from top to bottom, and at some other times, things propagate from bottom to top.
Bhim P. Upadhyaya
Chapter 8. Traits
Abstract
In the real world, we have different ways to interact with things. Most of the time, we can find some sort of interface for interaction. Also most human made things have interfaces.
Bhim P. Upadhyaya
Chapter 9. Functions
Abstract
Functions date back several centuries and are some of the most widely used techniques in mathematics [Hod05] [Dur88][Dur89a][Dur89b]. They provide rigorous methods for analysis and inference. The history of mathematics shows that functions were used to express thought [Boo05] [Hod05].
Bhim P. Upadhyaya
Chapter 10. Pattern Matching
Abstract
Pattern matching has a long history in computer science and mathematics [Ray65]. Ideas have manifested in different forms. In our day-to-day activities, we perform many pattern matching related thought processes.
Bhim P. Upadhyaya
Chapter 11. List Processing
Abstract
In our day-to-day lives, we need to deal with lists in a regular basis. For example, if we are going to buy groceries, we make a grocery list. Also we tend to list items for mental clarity, when we are planning.
Bhim P. Upadhyaya
Chapter 12. The Scala Collections Framework
Abstract
As indicated in Chapter 1, high level programming languages are close to natural languages whenever possible. The Scala collections represent higher level natural language constructs. In some cases, these constructs might represent some mathematical structures for preciseness.
Bhim P. Upadhyaya
Chapter 13. Actors
Abstract
The actor model of computation has a long history [HBS73]. It is an interesting model of computation in the sense that each actor is like a human agent that is capable of receiving, processing, and sending messages. Also the actor model provides a hierarchy of actors so that work can be divided or can be delegated.
Bhim P. Upadhyaya
Chapter 14. XML Processing
Abstract
XML is a common way of structuring data for Internet based applications. If you are part of a team that develops web applications, then it is highly likely that you will encounter XML in some way. It is a common requirement to convert raw data to XML and vice-versa.
Bhim P. Upadhyaya
Chapter 15. Parsing
Abstract
Parsing is a common requirement for industrial projects. It might be required for academic projects as well, depending upon the project type. Often, developers encounter situations which require them to parse special purpose languages or special purpose structures.
Bhim P. Upadhyaya
Backmatter
Metadaten
Titel
Programming with Scala
verfasst von
Prof. Dr. Bhim P. Upadhyaya
Copyright-Jahr
2017
Electronic ISBN
978-3-319-69368-2
Print ISBN
978-3-319-69367-5
DOI
https://doi.org/10.1007/978-3-319-69368-2