Get up to speed on Scala, the JVM language that offers all the benefits of a modern object model, functional programming, and an advanced type system. Packed with code examples, this comprehensive book shows you how to be productive with the language and ecosystem right away, and explains why Scala is ideal for today's highly scalable, data-centric applications that support concurrency and distribution. This second edition covers recent language features, with new chapters on pattern matching, comprehensions, and advanced functional programming. You’ll also learn about Scala’s command-line tools, third-party tools, libraries, and language-aware plugins for editors and IDEs. This book is ideal for beginning and advanced Scala developers alike. Program faster with Scala’s succinct and flexible syntax Dive into basic and advanced functional programming (FP) techniques Build killer big-data apps, using Scala’s functional combinators Use traits for mixin composition and pattern matching for data extraction Learn the sophisticated type system that combines FP and object-oriented programming concepts Explore Scala-specific concurrency tools, including Akka Understand how to develop rich domain-specific languages Learn good design techniques for building scalable and robust Scala applications
A step-by-step guide in building high-performance scalable applications with the latest features of Scala. Key Features Develop a strong foundation in functional programming and Scala's Standard Library (STL) Get a detailed coverage of Lightbend Lagom—the latest microservices framework from Lightbend Understand the Akka framework and learn event-based Programming with Scala Book Description The second version of Scala has undergone multiple changes to support features and library implementations. Scala 2.13, with its main focus on modularizing the standard library and simplifying collections, brings with it a host of updates. Learn Scala Programming addresses both technical and architectural changes to the redesigned standard library and collections, along with covering in-depth type systems and first-level support for functions. You will discover how to leverage implicits as a primary mechanism for building type classes and look at different ways to test Scala code. You will also learn about abstract building blocks used in functional programming, giving you sufficient understanding to pick and use any existing functional programming library out there. In the concluding chapters, you will explore reactive programming by covering the Akka framework and reactive streams. By the end of this book, you will have built microservices and learned to implement them with the Scala and Lagom framework. What you will learn Acquaint yourself with the new standard library of Scala 2.13 Get to grips with the Grok functional paradigms Get familiar with type system to express domain constraints Understand the actor model and different Akka libraries Grasp the concept of building microservices using Lagom framework Deep dive into property-based testing and its practical applications Who this book is for This book is for beginner to intermediate level Scala developers who would like to advance and gain knowledge of the intricacies of the Scala language, expand their functional programming tools, and explore actor-based concurrency models.
Grok and perform effective functional programming in Scala About This Book Understand functional programming patterns by comparing them with the traditional object-oriented design patterns Write robust, safer, and better code using the declarative programming paradigm An illustrative guide for programmers to create functional programming patterns with Scala Who This Book Is For If you have done Java programming before and have a basic knowledge of Scala and its syntax, then this book is an ideal choice to help you to understand the context, the traditional design pattern applicable, and the Scala way. Having previous knowledge of design patterns will help, though it is not strictly necessary. What You Will Learn Get to know about functional programming and the value Scala's FP idioms bring to the table Solve day-to-day programming problems using functional programming idioms Cut down the boiler-plate and express patterns simply and elegantly using Scala's concise syntax Tame system complexity by reducing the moving parts Write easier to reason about concurrent code using the actor paradigm and the Akka library Apply recursive thinking and understand how to create solutions without mutation Reuse existing code to compose new behavior Combine the object-oriented and functional programming approaches for effective programming using Scala In Detail Scala is used to construct elegant class hierarchies for maximum code reuse and extensibility and to implement their behavior using higher-order functions. Its functional programming (FP) features are a boon to help you design “easy to reason about” systems to control the growing software complexities. Knowing how and where to apply the many Scala techniques is challenging. Looking at Scala best practices in the context of what you already know helps you grasp these concepts quickly, and helps you see where and why to use them. This book begins with the rationale behind patterns to help you understand where and why each pattern is applied. You will discover what tail recursion brings to your table and will get an understanding of how to create solutions without mutations. We then explain the concept of memorization and infinite sequences for on-demand computation. Further, the book takes you through Scala's stackable traits and dependency injection, a popular technique to produce loosely-coupled software systems. You will also explore how to currying favors to your code and how to simplify it by de-construction via pattern matching. We also show you how to do pipeline transformations using higher order functions such as the pipes and filters pattern. Then we guide you through the increasing importance of concurrent programming and the pitfalls of traditional code concurrency. Lastly, the book takes a paradigm shift to show you the different techniques that functional programming brings to your plate. This book is an invaluable source to help you understand and perform functional programming and solve common programming problems using Scala's programming patterns. Style and approach This is a hands-on guide to Scala's game-changing features for programming. It is filled with many code examples and figures that illustrate various Scala idioms and best practices.
Discover unique features and powerful capabilities of Scala Programming as you build projects in a wide range of domains Key Features Develop a range of Scala projects from web applications to big data analysis Leverage full power of modern web programming using Play Framework Build real-time data pipelines in Scala with a Bitcoin transaction analysis app Book Description Scala is a type-safe JVM language that incorporates object-oriented and functional programming (OOP and FP) aspects. This book gets you started with essentials of software development by guiding you through various aspects of Scala programming, helping you bridge the gap between learning and implementing. You will learn about the unique features of Scala through diverse applications and experience simple yet powerful approaches for software development. Scala Programming Projects will help you build a number of applications, beginning with simple projects, such as a financial independence calculator, and advancing to other projects, such as a shopping application and a Bitcoin transaction analyzer. You will be able to use various Scala features, such as its OOP and FP capabilities, and learn how to write concise, reactive, and concurrent applications in a type-safe manner. You will also learn how to use top-notch libraries such as Akka and Play and integrate Scala apps with Kafka, Spark, and Zeppelin, along with deploying applications on a cloud platform. By the end of the book, you will not only know the ins and outs of Scala, but you will also be able to apply it to solve a variety of real-world problems What you will learn Build, test, and package code using Scala Build Tool Decompose code into functions, classes, and packages for maintainability Implement the functional programming capabilities of Scala Develop a simple CRUD REST API using the Play framework Access a relational database using Slick Develop a dynamic web UI using Scala.js Source streaming data using Spark Streaming and write a Kafka producer Use Spark and Zeppelin to analyze data Who this book is for If you are an amateur programmer who wishes to learn how to use Scala, this book is for you. Knowledge of Java will be beneficial, but not necessary, to understand the concepts covered in this book.
Author: Cay S. Horstmann
Publisher: Addison-Wesley Professional
Release Date: 2015-01-30
The release of Java SE 8 introduced significant enhancements that impact the Core Java technologies and APIs at the heart of the Java platform. Many old Java idioms are no longer required and new features like lambda expressions will increase programmer productivity, but navigating these changes can be challenging. Core Java® for the Impatient is a complete but concise guide to Java SE 8. Written by Cay Horstmann—the author of Java SE 8 for the Really Impatient and Core Java™, the classic, two-volume introduction to the Java language—this indispensable new tutorial offers a faster, easier pathway for learning the language and libraries. Given the size of the language and the scope of the new features introduced in Java SE 8, there’s plenty of material to cover, but it’s presented in small chunks organized for quick access and easy understanding. If you’re an experienced programmer, Horstmann’s practical insights and sample code will help you quickly take advantage of lambda expressions (closures), streams, and other Java language and platform improvements. Horstmann covers everything developers need to know about modern Java, including Crisp and effective coverage of lambda expressions, enabling you to express actions with a concise syntax A thorough introduction to the new streams API, which makes working with data far more flexible and efficient A treatment of concurrent programming that encourages you to design your programs in terms of cooperating tasks instead of low-level threads and locks Up-to-date coverage of new libraries like Date and Time Other new features that will be especially valuable for server-side or mobile programmers Whether you are just getting started with modern Java or are an experienced developer, this guide will be invaluable for anyone who wants to write tomorrow’s most robust, efficient, and secure Java code.
Author: R. F. Schmidt
Publisher: Springer Science & Business Media
Release Date: 2013-04-17
Since the first English edition of this book appeared three years ago, the authors have received many useful comments from readers. In preparing this amended edition we have carefully examined each chapter, improving and expanding the text where necessary; in the process, we have been greatly helped by their remarks. Further commentary on this edition will be much appreciated. Again, I should like to express the gratitude of all the authors to the staff of Springer-Verlag for expediting the publication of the book. Kiel, Germany, July 1981 ROBERT F. SCHMIDT Preface to the First Edition In the field of sensory physiology we are concerned with what our sense organs and the associated central nervous structures - can do and how that perform ance is achieved. Research here is not limited to description of the physi cochemical reactions taking place in these structures; the conditions under which sensations and perceptions arise and the rules that govern them are also of fundamental interest. Sensory physiology thus demands the attention of everyone who wishes to - or must - delve into the potentialities and limitations of human experience.