My Account Log in

3 options

Professional scala : combine object-oriented and functional programming to build high-performance application / Mads Hartmann, Ruslan Shevchenko.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central Academic Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Hartmann, Mads, author.
Shevchenko, Ruslan (System architect and software developer), author.
Language:
English
Subjects (All):
Scala (Computer program language).
Physical Description:
1 online resource (186 pages) : illustrations
Edition:
1st edition
Place of Publication:
Birmingham ; Mumbai : Packt, 2018.
System Details:
text file
Biography/History:
Hartmann Mads: Mads Hartmann is a software engineer with a fondness for automation and programming languages, especially statically typed functional ones. He holds a masters degree in computer science from the University of Copenhagen and he is currently working as a full-stack engineer at Family. He is active in the Copenhagen developer scene and has organized a meetup group for people interested in Scala. Shevchenko Ruslan: Ruslan Shevchenko is a system architect and a software developer who is focused on building reliable software systems. During his career patch, he was involved in projects using many languages, from Scala, Java to C++, C, Perl, and Tcl in numerous areas, such as telecommunications, OSS/billing systems, finance, code analysis, social integration, system utilities. In terms of architecture, his specialist domains are large-scale software systems and distributed processing.
Summary:
If your application source code is overly verbose, it can be a nightmare to maintain. Write concise and expressive, type-safe code in an environment that lets you build for the JVM, browser, and more. Key Features Expert guidance that shows you to efficiently use both object-oriented and functional programming techniques Understand functional programming libraries, such as Cats and Scalaz, and use them to augment your Scala development Perfectly balances theory and hands-on exercises, assessments, and activities Book Description This book teaches you how to build and contribute to Scala programs, recognizing common patterns and techniques used with the language. You'll learn how to write concise, functional code with Scala. After an introduction to core concepts, syntax, and writing example applications with scalac, you'll learn about the Scala Collections API and how the language handles type safety via static types out-of-the-box. You'll then learn about advanced functional programming patterns, and how you can write your own Domain Specific Languages (DSLs). By the end of the book, you'll be equipped with the skills you need to successfully build smart, efficient applications in Scala that can be compiled to the JVM. What you will learn Understand the key language syntax and core concepts for application development Master the type system to create scalable type-safe applications while cutting down your time spent debugging Understand how you can work with advanced data structures via built-in features such as the Collections library Use classes, objects, and traits to transform a trivial chatbot program into a useful assistant Understand what are pure functions, immutability, and higher-order functions Recognize and implement popular functional programming design patterns Who this book is for This is an ideal book for developers who are looking to learn Scala, and is particularly well suited for Java developers looking to migrate across to Scala for application development on the JVM.
Contents:
Intro
Preface
Setting up the Development Environment
Simple Program
Definitions: Packages, Imports, and Objects
Object Definition
The main Method
Inside main
Structure of a Scala Project
Basic sbt Commands
Activity: Performing Basic Operations with sbt: Build, Run, Package
IDE
Activity: Loading and Running a Sample Project in the IDE
REPL
Obtaining the Time Request from Our Chatbot Program
Base Syntax
Base Syntax for Definitions
Base Syntax for Expressions
Unit Testing
Adding a Test to Our Project
Inside Tests
Running Tests for Chatbot
Summary
Basic Language Features
Objects, Classes, and Traits
Object
Classes
Equality and Case Classes
Pattern Matching
Traits
Self-Types
Special Classes
OO in Our Chatbot
Decoupling Logic and Environment
Sealed Traits and Algebraic Datatypes
Function Calls
Syntax Goodies
Named Parameters
Default Parameters
Currying Forms (Multiple Argument Lists)
Special Magic Methods
Implementing + in CartesianPoint
Parameter-Passing Mode
By Value
By Name
By Need
Creating a Runnable Construction
Printing the log Argument to the Console and File
Functions
Function Values
Function from an OO Point of View
Conversions
Defining and Measuring the Time of a Unit Function
Syntax Sugar in a Function Definition
Partial Functions
Exploring Pattern Matching
Binding a Sequence of Variables in the Pattern Matcher
Partial Functions in Practice
Representing ChatbotMode as a Partial Function
Implementing RemindStore as a Set of Partial Functions
Using Lifting for Conversations between Total and Partial Functions
Scala Collections
Working with Lists
Constructing Lists
Operations on Lists
Pattern Matching on Lists.
First-Order Methods on List
Appending and Concatenation
Taking the Length of a List
Reversing a List
Prefixes and Suffixes
Element Selection
Display
Activity: Creating a New Mode for Chatbot Using Lists
Abstracting on Sequences
The Traversable Trait
Iterators
Streams
Activity: Implementing Fibonacci Series Using Streams and Iterators
Other Collections
Sets
Tuples
Maps
Mutable and Immutable Collections
Activity: Implementing the Tower of Hanoi Problem
Scala Type System
Type Basics and Polymorphism
A Unified Type System
Parametric Polymorphism
Type Inference
Parameterized Types
Bounds
Existential Types
Activity: Generalizing the Implementation of the Binary Tree
Variance
Covariance
Contravariance
Invariance
Activity: Implementing Covariance and the Database for Tools
Advanced Types
Abstract Type Members
Structural Types
Option
Higher Kind Types
Type Erasure
Activity: Finding an Element Based on a Given Predicate
Implicits
Implicit Parameters and Implicit Conversions
Implicit Parameters
Implicit Conversions
Implicit Resolution
Activity: Creation of Extension Methods
Ad Hoc Polymorphism and Type Classes
Types of Polymorphism
Type Classes
Context Bounds and Implicitly
Type Classes in the Standard Library
Functional Idioms
Introduction to Functional Programming Concepts
Pure Functions
Immutability
Implementing the standard library
Higher-Order Functions
Functional Design Patterns
Monoids
Using Monoids to Write Polymorphic Functions
Functor
Monads
Popular Libraries
Validating Data Using Cats
Prerequisites for Using Cats
Introduction to Cats
Validating Data
Validating Using Validated
Communicating with Databases Using Doobie.
Prerequisites for Doobie
Doobie
ConnectionIO
Transactor
Selecting Rows
Querying Using Parameters
Deleting, Inserting, and Updating Rows
A Complete Example
Activity: Adding Priority to the Todo List
Domain Specific Languages
DSLs and Types of DSLs
External DSLs
Internal DSLs
ScalaTest - A Popular DSL
Adding ScalaTest to Your Project
Overview of ScalaTest Styles
Activity: Implementing ScalaTest Styles
Language Features for Writing DSLs
Flexible Syntax for Method Invocation
By-Name Parameters
Extension Methods and Value Classes
Writing a Small DSL
Modeling Test Cases
DSL for TestCase
Activity: Creating a DSL to Specify Assertions
Beyond This Book
Various Scala Libraries
Akka
Apache Spark
Shapeless
Uncovered Language Features
Macros
Def Macros
Implicit Macros
Quasiquotes
Reflection
Resources to Keep You Updated
Scala Improvement Process
Scala Times
Index.
Notes:
Includes index.
Description based on print version record.
ISBN:
9781789534702
1789534704
OCLC:
1048788995

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account