Programming Concurrency on the JVM
I’ve written this book for experienced Java programmers who are interested in learning how to manage and make use of concurrency on the JVM, using languages such as Java, Clojure, Groovy, JRuby, and Scala. If you’re new to Java, this book will not help you learn the basics of Java. There are several good books that teach the fundamentals of Java programming, and you should make use of them. If you have fairly good programming experience on the JVM but find yourself needing material that will help further your practical understanding of programming concurrency, this book is for you. If you’re interested only in the solutions directly provided in Java and the JDK—Java threading and the concurrency library—I refer you to two very good books already on the market that focus on that: Brian Goetz’s Java Concurrency in Practice [Goe06] and Doug Lea’s Concurrent Programming in Java [Lea00]. Those two books provide a wealth of information on the Java Memory Model and how to ensure thread safety and consistency. My focus in this book is to help you use, but also move beyond, the solutions provided directly in the JDK to solve some practical concurrency problems. You will learn about some third-party Java libraries that help you work easily with isolated mutability. You will also learn to use libraries that reduce complexity and error by eliminating explicit locks. My goal in this book is to help you learn the set of tools and approaches that are available to you today so you can sensibly decide which one suits you the best to solve your immediate concurrency problems.
Functional Programming Patterns in Scala and Clojure
This book is about patterns and functional programming in Scala and Clojure. It shows how to replace, or greatly simplify, many of the common patterns we use in object-oriented programming, and it introduces some patterns commonly used in the functional world. Used together, these patterns let programmers solve problems faster and in a more concise, declarative style than with object-oriented programming alone. If you’re using Java and want to see how functional programming can help you work more efficiently, or if you’ve started using Scala and Clojure and can’t quite wrap your head around functional problem-solving, this is the book for you.
Scala Cookbook
This is a cookbook of problem-solving recipes about Scala, the most interesting programming language I’ve ever used. The book contains solutions to more than 250 common problems, shown with possibly more than 700 examples. (I haven’t counted, but I suspect that’s true.) There are a few unique things about this book: • As a cookbook, it’s intended to save you time by providing solutions to the most common problems you’ll encounter. • Almost all of the examples are shown in the Scala interpreter. As a result, whether you’re sitting by a computer, on a plane, or reading in your favorite recliner, you get the benefit of seeing their exact output. (Which often leads to, “Ah, so that’s howthat works.”) • The book covers not only the Scala language, but also has large chapters on Scalatools and libraries, including SBT, actors, the collections library (more than 100pages), and JSON processing. Just prior to its release, the book was updated to cover Scala 2.10.x and SBT 0.12.3.
This book enhances the Scala language with standard test-driven development practices, highlighting the best testing tools today. This book will cover both the ScalaTest and the Specs2 testing frameworks, which help you create quick and easy tests. Testing is also often the most overlooked aspect of introductory programming language books. This book is dedicated to mending that gap.We will run all these tests using Simple Build Tool (SBT). SBT is similar to some earlier build tools and competitors: Maven, Gradle, and Buildr. What makes SBT highly attractive is its ease of use and the small size of the build file. Type a few lines of code for your build file and you’re off and running on your project. We will also cover SBT’s wonderful triggered execution feature, which complements test-driven development by building and testing code whenever a file is saved.ScalaTest and Specs2 are two of the most dominant testing frameworks for Scala around today. Each framework has a different intent and goal, but they share the some ideal of making testing concise, and they both leverage the Scala programming language to make testing easy and fun. Testing frameworks are nothing new, of course, and have been used with other programming languages for years. Those familiar with other programming languages and their testing tools will find some similarities with Scala’s current testing tools. ScalaTest and Specs2 borrowed ideas from Cucumber. But upon these shoulders of giants, Scala testing systems have also stepped out on their own and created some of the most mind-blowing testing tools found in any language. Testing in Scala will also illustrate mocking code, so as to keep our tests isolated from large subsystems and networks. Mocking is, in essence, creating a substitute for various objects to isolate tests from volatile elements of their environment (such as the contents of databases) and to help unit tests run fast. This book shows how you can use Scala with Java-based mocking frameworks that have been used for years by Java programmers, EasyMock and Mockito. We will also introduce you to a new framework, ScalaMock. Formerly known as Borachio, ScalaMock was inspired by Java’s EasyMock and Mockito but takes their work further, even offering support for mocking final classes and Scala objects.
Usted puede contribuir con Libros UCLV, es importante para nosotros su aporte..
Contribuir