Scala Programming A comprehensive beginner s guide to Scala 2nd Edition William instant download
Scala Programming A comprehensive beginner s guide to Scala 2nd Edition William instant download
https://ebookmeta.com/product/scala-programming-a-comprehensive-
beginner-s-guide-to-scala-2nd-edition-william/
https://ebookmeta.com/product/programming-in-scala-fifth-edition-
martin-odersky/
https://ebookmeta.com/product/programming-scala-scalability-
functional-programming-objects-third-edition-wampler-dean/
https://ebookmeta.com/product/learning-concurrent-programming-in-
scala-second-edition-aleksandar-prokopec-2/
https://ebookmeta.com/product/introductory-chemistry-7th-edition-
in-si-units-tro-n-j/
Style Differences in Cognition Learning and Management
1st Edition Stephen Rayner Eva Cools
https://ebookmeta.com/product/style-differences-in-cognition-
learning-and-management-1st-edition-stephen-rayner-eva-cools/
https://ebookmeta.com/product/dance-and-society-in-eastern-
africa-1890-1970-the-beni-ngoma-t-o-ranger/
https://ebookmeta.com/product/orc-me-baby-one-more-time-monster-
between-the-sheets-1st-edition-ava-ross/
https://ebookmeta.com/product/mastering-unlabeled-data-
meap-v5-1-chapters-1-to-7-of-11-edition-vaibhav-verdhan/
https://ebookmeta.com/product/radical-collaboration-2nd-edition-
five-essential-skills-to-overcome-defensiveness-and-build-
successful-relationships-james-w-tamm/
Badlands C J Box
https://ebookmeta.com/product/badlands-c-j-box/
Table of Contents
Preface
1. Introduction
1.1 What managers should know about
Scala
1.2 Java Scala integration
1.3 About this book
1.4 Typographical and other conventions
2 Setting up the work environment
2.1 The Scala shell and the command
line
2.1.1 The Scala interpreter
2.1.2 The Scala (de) compilers
2.1.3 The documentation generator
2.2 Build tools
2.2.1 The Maven Scala plugin
2.2.2 Simple Build Tool
2.3 IDE support
2.3.1 Eclipse
2.3.2 NetBeans
2.3.3 IntelliJ IDEA
3 basics
3.1 A little bit of syntax
3.2 Imperative programming
3.3 An executable program
3.4 Annotations
4 Pure object orientation
4.1 Classes and Objects
4.1.1 Fields and methods
4.1.2 What else classes can contain
4.1.3 Constructors
4.1.4 Enumerations
4.1.5 Inheritance and subtyping
4.1.6 Abstract classes
4.2 Code organization
4.2.1 Packages
4.2.2 Package Objects
4.2.3 Imports
4.3 traits
4.3.1 RichInterfaces
4.3.2 Stackable modifications
4.4 Implicits and Rich wrappers
5 Functional programming
5.1 LazyEvaluation
5.2 Functions and recursions
5.3 Higher order functions
5.4 Case classes and pattern matching
5.4.1 Case classes
5.4.2 Sealed classes
5.4.3 Partial functions
5.4.4 Variable names for (partial)
patterns
5.4.5 ExceptionHandling
5.4.6 Extractors
5.4.7 Pattern matching with regular
expressions
5.5 Currying's own control structures
5.6 For expressions
5.7 Type system
5.7.1 Standard types
5.7.2 Parametric Polymorphism and
Variance
5.7.3 Upper and Lower Bounds
5.7.4 Views and ViewBounds
5.7.5 ContextBounds
5.7.6 Arrays and @ specialized
5.7.7 GeneralizedTypeConstraints
5.7.8 Self-type annotation
5.7.9 Structural and existential types
6 The Scala Standard Library
6.1 Overview and the Predef Object
6.2 The Collection Framework
6.3 Scala and XML
6.4 Combining parsers
6.5 A little bit of GUI
7 Actors - Concurrency and
Multicore Programming
7.1 One thread is one Actor
7.2 Receive and react
7.3 Demons and Reactors
7.4 Scheduler
7.5 RemoteActors
8 Software Quality - Documenting
and Testing
8.1 Scaladoc
8.2 ScalaCheck.
8.2.1 Basics.
8.2.2 Generators.
8.2.3 Automated testing with SBT
8.3 ScalaTest
8.3.1 ScalaTestundJUnit
8.3.2 ScalaTestundTestNG
8.3.3 ScalaTestundBDD
8.3.4 Functional, integration and
acceptance tests
8.3.5 DieFunSuite
8.4 Specs
8.4.1 A Specs specification
8.4.2 Matchers
8.4.3 MockswithMockito
8.4.4 LiterateSpecifications
9 Web programming with the lift
9.1 Quick start with lift
9.2 Bootstrapping
9.3 Rendering templates and snippets
9.4 User management and SiteMap
9.5 Persistence
9.6 Implementation of the snippets
10 Lightweight web programming
with Scalatra
10.1 Quick start with Scalatra
10.2 The Final Grade Calculator
11 Akka – Actors and
SoftwareTransactionalMemory
11.1 Quick start with battery
11.2 The MovieStore
11.3 User and Session Management
Preface
Scala: A programming language that uniquely supports object-
oriented Programming merges with the functional 1 that is preparing
to move Java from To throne and to program with that is really fun.
In the summer semester of 2010, in addition to Haskell, I also
taught Scala for the reading “Advanced Functional Programming”
and many I have had good experiences. I saw how my students
medium functional concepts with Scala could be transferred very
well to the JVM. ten. From the 2010/11 winter semester, I started
using Scala instead of Java for the Use programming training of the
freshman students. In Scala there arele things have been
implemented in a simpler and cleaner way. For example, the Printout
println ("Hello World") all by itself in a file as a script or type directly
into the interactive Scala interpreter. In Scala you can Let's stay so
close to Java at first that a later switch is hardly possible Likely to
cause problems 2 . That I also distributed Scala for programming
Discussing systems goes without saying thanks to the actors and
akka. With this book I would like to bring you closer to everything
Scala has to offer, in which, in addition to the programming language
itself, I also give you the essentials I will introduce tools and
frameworks. My warmest thanks go to everyone who made this book
possible and to me in this one Supported the project: Above all my
family. Important discussions and Patrick Baumgartner, Jürgen
Dubau, Christoph Schmidt, Heiko Seeberger and Bernd Weber
contributed. Thanks a lot for this. For the good I thank Margarete on
behalf of the cooperation with the Hanser Verlag
Metzger and Irene Weilhart.
Chapter 1
introduction
Another new programming language, although: Scala is no longer
like that New. The development began in 2001 at the École
polytechnique fédérale de La- sanne (EPFL) in Switzerland by a team
led by Professor Martin Odersky. The
first release was published in 2003. Version 2.0 followed in 2006 In
2010, while this book is being written, version 2.8 will be released.
which, according to Odersky, should actually be 3.0 1 . Professor
Odersky is no stranger to the Java world. 1995 he started with Phi-
lip Wadler 2 with the development of the functional programming
language Pizza 3 , which can be translated into bytecode for the Java
Virtual Machine (JVM). These Work led to GJ 4 and finally to the new
javac compiler and the one with Java 5 introduced Java Generics 5 .
When Odersky came to EPFL in 1999, he shifted his focus a little. He
had still the goal of object-oriented and functional programming
tooconnect, but no longer wanted to be burdened with the
restrictions of Java. After developing the programming language
Funnel 6 , he took on additional goals the practicality and
interoperability with standard platforms and designed Scala 7 .
Scala is a hybrid language that uniquely combines features of
objective connects entertaining and functional programming
languages. Scala design goal is a concise, elegant and type-safe
programming. Scala isn't just inBytecode compiled for the JVM, any
Java code can also be extracted directly Use the Scala and vice
versa.
Scala is a purely object-oriented programming language. That
means, in Scala everythe value of an object. Scala uses a concept of
classes and traits. With traits Rich interfaces can be implemented,
because traits can already be implemented
mentions included. Classes are extended through inheritance, traits
are mixed into a class or an object. So as not to get into typical
problems running with multiple inheritance, traits are linearized.
Whether Scala may call itself a functional programming language
has been shortened on the web. lich first discussed in detail.
Odersky finally refers to Scala in [Ode10a]as post-functional
language. What is certain is that Scala has a number
has features that are either attributable to functional programming
or come from their environment.
In Scala, each function is a value of 8 and can be equated with other
values. th are treated. This means, for example, that a function can
ment or result of another function 9 , functions can be in lists and
functions can be nested within one another.
In addition, Scala also supports features such as Pattern Matching 10
and Cur- rysing 11 .
In contrast to many modern and trendy programming languages,
Sca- la statically typed. That is, the type of all expressions becomes
compile-time checked and not at runtime, as is the case with
dynamically typed languages
the case is. After a large number of programming errors type errors,
we believe that static typing is generally preferable.
to draw. The main disadvantage, namely the need to have types
everywheremust be specified is countered in Scala with a type
inference mechanism.net. This means that it is not necessary to
specify types in most places. At the
When translating, the type is then inferred and it is checked whether
everything fits together. Scala has a very sophisticated type system
that, in addition to generic classes and polymorphic methods also
include variance annotations, upper and lower bounds and much
more.
Another feature of Scala, which by the way stands for Scalable
Language, is the easy expandability. Scala is therefore predestined
for the creation of do- main Specific Languages (DSLs). Last but not
least, Scala can also work with support for the .NET platform. But
that's still the case not a stand that can be described as “production
ready”.
Scala on the JVM has long since grown up and can in all situations,
can also be used in a business-critical manner. The further
development of Scala is very active, from bug fix releases to new
features will be announced in the next
Expect some more time. For the coming years, the focus of the
Scala- Teams on the even better support of multicore architectures.
The Nazi conspirators were now ready to carry out the second
part of their second phase of their aggressions. Czechoslovakia was
next.