Learning Scala programming object-oriented programming meets functional reactive to create scalable and concurrent programs

You will learn to write highly scalable, concurrent, and testable programs to meet everyday software requirements. We will begin by understanding the language basics, syntax, core data types, literals, variables, and more. From here you will be introduced to data structures with Scala and you will l...

Full description

Bibliographic Details
Main Author: Sharma, Vikash
Format: eBook
Language:English
Published: Birmingham, UK Packt Publishing 2018
Subjects:
Online Access:
Collection: O'Reilly - Collection details see MPG.ReNa
LEADER 10592nmm a2200409 u 4500
001 EB001930943
003 EBX01000000000000001093845
005 00000000000000.0
007 cr|||||||||||||||||||||
008 210123 ||| eng
020 |a 9781788391610 
020 |a 1788392825 
020 |a 1788391616 
050 4 |a QA76.73.S28 
100 1 |a Sharma, Vikash 
245 0 0 |a Learning Scala programming  |b object-oriented programming meets functional reactive to create scalable and concurrent programs  |c Vikash Sharma 
260 |a Birmingham, UK  |b Packt Publishing  |c 2018 
300 |a 1 volume  |b illustrations 
505 0 |a Calling a function -- Passing a variable number of arguments -- Calling a function with a default parameter value -- Calling a function while passing named arguments -- Function literals -- Evaluation strategies -- Call by name -- Call by value -- Partial functions -- Summary -- Chapter 5: Getting Familiar with Scala Collections -- Motivation -- Immutable and mutable collections -- Differences between the root and immutable collections -- Hierarchy of collections in Scala -- Traversable -- Iterable -- Seq -- Sequences -- Map -- Set -- Commonly used collections in Scala -- List -- Map -- SortedSet -- Streams -- Vector -- Immutable stack -- Immutable queue -- Ranges -- ArrayBuffer -- ListBuffer -- StringBuilder -- Array -- Rich operations performed on collections -- Parallel collections in Scala -- ParArray -- ParVector -- Converting a Java collection into a Scala collection -- Choosing a collection -- Collection performance -- Summary -- Chapter 6: Object-Oriented Scala Basics -- Classes -- Abstract classes -- Abstract classes and traits -- The final classes -- Objects as singletons -- Companion objects -- Case classes -- Summary -- Chapter 7: Next Steps in Object-Oriented Scala -- Composition and inheritance -- Class inheritance -- Extending classes -- Subtyping versus subclassing -- Overriding data and behavior -- Restricting inheritance -- final keyword -- Dynamic binding in function invocation -- Misusing inheritance -- Default and parameterized constructors -- Traits -- Traits as mix-ins -- Traits as composable mix-ins -- Traits as stackable modifications -- Linearization -- Packaging and importing -- Package statements -- Multiple package statements in a file -- Nested package statements -- Chaining package statements -- Importing packages -- Visibility rules -- Sealed traits -- Summary -- Chapter 8: More on Functions -- Function literals 
505 0 |a Methods -- Functions versus methods -- Methods or functions? -- What are closures? -- Higher-order functions -- Currying -- Converting a function with multiple parameters to curried form -- Partially applied functions -- Summary -- Chapter 9: Using Powerful Functional Constructs -- For expressions -- Pattern matching -- Different ways we can pattern match -- Matching a variable -- Matching a constant -- Matching a constructor -- Option type -- Lazy declaration -- Tail call optimization -- Combinators -- Type parameterization -- Summary -- Chapter 10: Advanced Functional Programming -- Why so serious about types? -- Here comes type parameterization -- Another way around -- generic classes and traits -- Type parameter names -- Container types -- Type erasure -- Variance under inheritance -- When to use what type of variance relation -- Abstract types -- Type bounds -- Abstract versus parameterized types -- Type-classes -- Summary -- Chapter 11: Working with Implicits and Exceptions -- Exception handling -- the old way -- Using the Option way -- Either left or right -- Implicits -- what and why -- Implicit parameters -- The implicitly method -- Implicit conversions -- Looking for implicits -- Type-classes ahead! -- Summary -- Chapter 12: Introduction to Akka -- Why do we care about Akka? -- What's up with the Actor Model? -- Understanding the Actor system -- Props -- Actor references and paths -- Selecting existing actorRefs via actorSelection -- How the Actor life cycle works -- Hello world in Akka -- Setting up the environment -- Writing our first Actor -- The tell versus ask versus forward method -- Stopping Actors -- The preStart and postStop hooks -- Actor communication via messages and its semantics -- Supervising fault in our actors -- OneForOne versus AllForOne strategy -- Default supervision strategy -- Applying the supervision strategy 
505 0 |a Testing actors -- Summary -- Chapter 13: Concurrent Programming in Scala -- Concurrent programming -- Building blocks of concurrency -- Understanding processes and threads -- Locks and synchronization -- Executor and ExecutionContext -- Asynchronous programming -- Working with Futures -- What if Future computations go wrong? -- Why not compose two or more Futures? -- Working with Promises -- Parallel collections -- Summary -- Chapter 14: Programming with Reactive Extensions -- Reactive programming -- Reactive extensions -- React to RxScala -- Creating Observables -- Summary -- Chapter 15: Testing in Scala -- The why and what of TDD -- The process of TDD -- Step 1 -- write a test that will fail -- Step 2 -- write code to pass the failing test -- Step 3 -- refactor the code to improve the quality -- Step 4 -- repeat steps 1 to 3 -- Scenario -- Behavior driven development (BDD) -- ScalaTest -- Setting up for testing -- Testing in style using ScalaTest -- Assertions -- Matchers -- ScalaMock -- a native library to mock objects -- Summary -- Other Books You May Enjoy -- Index 
505 0 |a Cover -- Title Page -- Copyright and Credits -- Packt Upsell -- Contributors -- Table of Contents -- Preface -- Chapter 1: Getting Started with Scala Programming -- Introduction to Scala -- A programming paradigm -- Object-oriented versus functional paradigms -- Scala is multi-paradigm -- Scala advantages -- Runs on JVM -- Super smart syntax -- Best of both worlds -- Type is the core -- Concurrency made easy -- Asynchronous code -- Asynchronous versus parallel versus concurrent programming -- Now available for the frontend -- Smart IDEs -- Extensive language -- Online support -- Working with Scala -- Java installation -- SBT installation -- Scala REPL -- Scala IDEs -- Running our first program -- Summary -- Chapter 2: Building Blocks of Scala -- What is underneath a Scala program? -- Vals and vars -- Literals -- Integer literals -- Floating point literals -- Boolean literals -- Character literals -- String literals -- Symbol literals -- Tuple literals -- Function literals -- Data types -- Scala's class hierarchy -- Any -- AnyVal and AnyRef -- AnyRef -- AnyVal -- Unit -- Boolean -- Null and Nothing -- Type inference -- Operators in Scala -- Arithmetic operators -- Relational operators -- Logical operators -- Bitwise operators -- Operator precedence -- Wrapper classes -- String Interpolators -- The s interpolator -- f Interpolator -- The raw interpolator -- Summary -- Chapter 3: Shaping our Scala Program -- Looping -- The for loop -- The while Loop -- The do while loop -- The for expressions -- The for yield expressions -- Recursion -- Why recursion over iteration? -- Limitations of recursion -- The ideal way to write recursive functions -- Conditional statements -- The if else conditional expression -- Pattern matching -- Summary -- Chapter 4: Giving Meaning to Programs with Functions -- Function syntax -- Nesting of functions 
653 |a Scala (Computer program language) / fast 
653 |a Scala (Computer program language) / http://id.loc.gov/authorities/subjects/sh2010013203 
653 |a Object-oriented programming (Computer science) / http://id.loc.gov/authorities/subjects/sh87007503 
653 |a Programmation orientée objet (Informatique) 
653 |a Scala (Langage de programmation) 
653 |a Object-oriented programming (Computer science) / fast 
041 0 7 |a eng  |2 ISO 639-2 
989 |b OREILLY  |a O'Reilly 
776 |z 9781788392822 
856 4 0 |u https://learning.oreilly.com/library/view/~/9781788392822/?ar  |x Verlag  |3 Volltext 
082 0 |a 500 
082 0 |a 005.114 
520 |a You will learn to write highly scalable, concurrent, and testable programs to meet everyday software requirements. We will begin by understanding the language basics, syntax, core data types, literals, variables, and more. From here you will be introduced to data structures with Scala and you will learn to work with higher-order functions. Scala's powerful collections framework will help you get the best out of immutable data structures and utilize them effectively. You will then be introduced to concepts such as pattern matching, case classes, and functional programming features. From here, you will learn to work with Scala's object-oriented features. Going forward, you will learn about asynchronous and reactive programming with Scala, where you will be introduced to the Akka framework. Finally, you will learn the.. 
520 |a What You Will Learn Get to know the reasons for choosing Scala: its use and the advantages it provides over other languages Bring together functional and object-oriented programming constructs to make a manageable application Master basic to advanced Scala constructs Test your applications using advanced testing methodologies such as TDD Select preferred language constructs from the wide variety of constructs provided by Scala Make the transition from the object-oriented paradigm to the functional programming paradigm Write clean, concise, and powerful code with a functional mindset Create concurrent, scalable, and reactive applications utilizing the advantages of Scala In Detail Scala is a general-purpose programming language that supports both functional and object-oriented programming paradigms. Due to its concise design and versatility, Scala's applications have been extended to a wide variety of fields such as data science and cluster computing.  
520 |a Learn how to write scalable and concurrent programs in Scala, a language that grows with you. About This Book Get a grip on the functional features of the Scala programming language Understand and develop optimal applications using object-oriented and functional Scala constructs Learn reactive principles with Scala and work with the Akka framework Who This Book Is For This book is for programmers who choose to get a grip over Scala to write concurrent, scalable, and reactive programs. No prior experience with any programming language is required to learn the concepts explained in this book. Knowledge of any programming language would help the reader understanding concepts faster though.