Skip to content

Instantly share code, notes, and snippets.

@jdegoes
Created October 6, 2014 23:24
Show Gist options
  • Save jdegoes/83531f9bfc22578912e4 to your computer and use it in GitHub Desktop.
Save jdegoes/83531f9bfc22578912e4 to your computer and use it in GitHub Desktop.
Enterprise Scala

Enterprise Scala

A guide to writing high-performance, robust, Enterprise-grade Scala applications.

Scala is a new language for the JVM that is rapidly spreading beyond tech companies like Twitter, Netflix, and LinkedIn, and into large Enterprises. Engineering teams in companies of all types and sizes are turning to Scala for its strong type system, its extensive ecosystem (Scalaz, Shapeless, Spire), and its seamless interoperability with legacy Java code bases.

While there are many books geared at introducing developers to the Scala programming language, none specifically address the question of what it means to write idiomatic Scala in today’s modern Enterprise. As a large, complex language with many advanced features, there are many ways to write Scala apps, and not all of them were created equal.

Enterprise Scala is the first book to systematize decades of real world, production experience writing large-scale, Enterprise-grade systems in Scala. The result is a comprehensive overview of what idiomatic Enterprise Scala should look like, bringing consistency and a coherent vision to development teams who are thinking of embracing Scala.

  1. Why Scala? - Introduces Scala and points to the main reasons why Scala is enjoying growth in Enterprise organizations.
  2. Robust Code (“Functional Programming”)- Many technology and startup companies can get away with writing mutable, thread-unsafe, spaghetti code. Large Enterprises, however, cannot afford to adopt these risky practices. Instead, they must take the more conservative, proven route of insisting on purely functional code, a technique enabled by the Scala programming language. While it may not be as sexy and “cutting edge” as some of the latest techniques pioneered by languages like PHP, the conservative choice to go purely functional is correlated with tremendously fewer defects and faster time to market.
  3. Dependency Injection (“Function Application”) - Robust, large systems cannot be built in any language without a high-degree of modularity. While interfaces and dependency injection serve this role in Java, Scala introduces a superior way of creating and managing modularity that eliminates the potential for run-time errors and completely eliminates the tedious and error-prone process of writing XML-like configuration to glue together providers in dependency injection frameworks.
  4. Workflow-Oriented Computation (“Monads”) - An extremely common pattern in Enterprise Scala development is that of the sequential workflow (for example, interacting with a remote resources, reading and writing inside a file, or processing and combining multiple data sources). While such workflows are often expressed in ad hoc ways in Java that do not lend themselves to reuse, Scala has powerful mechanisms for expressing generic workflows that maximize code reuse and safety.
  5. Aspect-Oriented Programming (“Monad Transformers”) - The ability to weave different kinds of effects into an application without modifying every line of code is important to the modern Enterprise, but legacy techniques from Java that involve bytecode manipulation and which do not safely compose together different kinds of effects are extremely risky, and lead to costly and time consuming debugging and refactoring cycles. Scala introduces a superior method of weaving effects into an application that is provably safe and at least as expressive as legacy techniques.
  6. Automated Testing (“ScalaCheck”) - Most developers are familiar with the practice of unit testing the software they write. Unfortunately, many startups rely on fly-by-the-seat practice of hard coding a few cases into poorly written unit tests. These risky practices are unsuitable for the modern Enterprise, which demands something with proven rigor. Scala brings that to the table in the form of property-based verification of code, which can generate hundreds or thousands of tests and ensure that code holds to very high standards.

Other topics to cover: Scalability, Performance, Big Data Ecosystem, etc.

@aryairani
Copy link

I'd buy this book.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment