Scala Cookbook
Recipes for Object-Oriented and Functional Programming
Publisher: O'Reilly Media
Final Release Date: August 2013
Pages: 722

Save time and trouble when using Scala to build object-oriented, functional, and concurrent applications. With more than 250 ready-to-use recipes and 700 code examples, this comprehensive cookbook covers the most common problems you’ll encounter when using the Scala language, libraries, and tools. It’s ideal not only for experienced Scala developers, but also for programmers learning to use this JVM language.

Author Alvin Alexander (creator of DevDaily.com) provides solutions based on his experience using Scala for highly scalable, component-based applications that support concurrency and distribution. Packed with real-world scenarios, this book provides recipes for:

  • Strings, numeric types, and control structures
  • Classes, methods, objects, traits, and packaging
  • Functional programming in a variety of situations
  • Collections covering Scala's wealth of classes and methods
  • Concurrency, using the Akka Actors library
  • Using the Scala REPL and the Simple Build Tool (SBT)
  • Web services on both the client and server sides
  • Interacting with SQL and NoSQL databases
  • Best practices in Scala development
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyScala Cookbook
 
5.0

(based on 7 reviews)

Ratings Distribution

  • 5 Stars

     

    (7)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (7)
  • Helpful examples (7)
  • Well-written (7)
  • Accurate (6)
  • Concise (6)

Cons

    Best Uses

    • Intermediate (6)
    • Novice (5)
    • Student (4)
      • Reviewer Profile:
      • Developer (5)

    Reviewed by 7 customers

    Sort by

    Displaying reviews 1-7

    Back to top

     
    5.0

    A great read

    By Paul

    from UK

    About Me Designer

    Verified Buyer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

        Comments about oreilly Scala Cookbook:

        This book has some great examples of Scala. It is concise and easy to read.

        (2 of 2 customers found this review helpful)

         
        5.0

        Excellent collection of

        By Max

        from Germany

        About Me Developer

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate

          Comments about oreilly Scala Cookbook:

          First of all I'd like to mention that I have read "Programming in Scala" prior to reading this book and I think that you should have at least some familiarity with Scala before reading the "Cookbook".

          If you know Scala a bit this book will prove to be very valuable, because it not only shows the solution for a specific problem but also how it was solved and what could be changed for slightly different use cases. Mr. Alexander also provides you with alternatives to certain solutions and/or variations that might fit your code architecture better. For example, Scala features language constructs that a typical Java programmer is probably not familiar with, but this book provides advice to help you decide when to use a language feature and how to use it correctly.
          What I found especially helpful was the variety of topics this book covers. You will not only find information about Scala's language constructs but also about things from building web services to the Scala build system (sbt) to collections and the Scala actor library.

          Mr. Alexander expresses himself very clearly and in a concise way, even I as a non-native speaker can understand the material easily.

          (3 of 3 customers found this review helpful)

           
          5.0

          Recommended for novice and interim

          By N.K

          from Israel

          About Me Designer, Developer

          Verified Buyer

          Pros

          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

          • Not comprehensive enough

          Best Uses

          • Intermediate
          • Novice
          • Student

          Comments about oreilly Scala Cookbook:

          As a novice in scala I had two options
          1) Read a scala book from the beginning
          2) Jump to the cold water and start coding
          Since I prefer second option, I find it more useful for me to go over this book thoroughly due to the many examples and the explanation behind each receipt.
          It enabled me to start coding in scala faster, and it is less boring than first option ...
          Note that this books lacks some topics that need to be completed elsewhere.

          (5 of 5 customers found this review helpful)

           
          5.0

          Fantastic Scala book

          By Markus

          from Germany

          About Me Developer

          Verified Reviewer

          Pros

          • Accurate
          • Concise
          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

            Best Uses

            • Intermediate
            • Novice

            Comments about oreilly Scala Cookbook:

            Since O'Reilly published the Perl Cookbook many years ago I have become a huge fan of that style of books. Back then – when I was still using Perl – this book was a tremendous help for all kind of things I wanted to do with Perl. Later the Ruby, Python and Java cookbooks were equally helpful.
            Now O'Reilly has pubished a Scala cookbook and I am extremely happy with the result. The book is pretty big with more than 700 pages (and an extra chapter on Play is available from the author's website because it didn't make it into the book).

            The book covers many things you will encounter daily in your Scala projects from creating classes, using Scala's amazing collections, reading files to working with actors (using Akka).

            Each recipe has a problem, shows and solution and then goes into detail explaining the solution. If you already know other O'Reilly cookbooks, you will be very familiar with the book's style.

            My favorite chapters are the ones on functional programming and the Scala collection library.

            The chapters on functional programming are very pragmatic without much theory. You won't find advanced discussions on Monads (there are other books for this and many websites) but many very useful tips on how to create your own functions and use them (as well as the existing ones from the Scala standard library) effectively in everyday projects.

            The two chapters on the Scala collection library are about 130 pages long and explain in great detail the amazing features of what I consider the best collection library for any programming language out there.

            The writing is clear and very easy to follow and the sample code is easy to read. Because it is all in small recipes you don't need to read through lot's of theory to figure out how to open a file or write a partial function.

            Summary:
            If you are a beginning or intermediate Scala developer the Scala Cookbook is a must have. Even advanced Scala developers should save time looking up solutions from the book – you just can't have everything in your head :-)
            This book would also make a very good second Scala book to deepen your knowledge after you've read an introductionary book (Scala for the Impatient by Cay Horstmann is my favorite)

            (2 of 2 customers found this review helpful)

             
            5.0

            Scala in examples

            By Przemysław

            from Kraków

            About Me Developer

            Verified Reviewer

            Pros

            • Accurate
            • Concise
            • Easy to understand
            • Helpful examples
            • Well-written

            Cons

              Best Uses

              • Expert
              • Intermediate
              • Novice
              • Student

              Comments about oreilly Scala Cookbook:

              Scala Cookbook is very practical book. Author presents every small example as problem to solve and possible solutions with discussion. I learned syntax for some concepts (like pattern matching, auxiliary constructors, executing external commands, lazy collections) I've seen in other programming languages. The book helped me better understand how implicits work.

              Moreover, there are available bonus chapters providing recipes about XML, XPath, testing, debugging and Play framework.

              Scala Cookbook is comprehensive book. It provides practical solution for typical developer's problem and I recommend this book everybody interested in Scala.

              (2 of 2 customers found this review helpful)

               
              5.0

              Highly recommended

              By Eric Loots

              from Antwerp, Belgium

              Verified Reviewer

              Pros

              • Accurate
              • Concise
              • Easy to understand
              • Helpful examples
              • Sbt Scripting Types Xml
              • Well-written

              Cons

                Best Uses

                • Expert
                • Intermediate
                • Novice
                • Student

                Comments about oreilly Scala Cookbook:

                Extremely useful book which I devoured in less than 2 weeks !

                I got my introduction to Scala when I followed the Coursera training course, "Functional Programming Principles in Scala" a little under a year ago.

                Since then, I read quite a few books on specific Scala topics, and many of these have the problem that they start with an introduction of the language using a "1 + 1" example in the REPL and a few tens of pages further have jumped to the most advanced features of Scala without any proper introduction leaving one puzzled...

                This book fills a gap: it covers everything from the basics to the most important and sophisticated language features (and useful libraries) with clear and concise recipes. At the same time, I think that even more advanced Scala users will benefit from consulting this book

                (4 of 5 customers found this review helpful)

                 
                5.0

                Excellent purchase

                By tjfb

                from S.C.

                About Me Developer

                Verified Reviewer

                Pros

                • Accurate
                • Concise
                • Easy to understand
                • Helpful examples
                • Well-written

                Cons

                  Best Uses

                  • Intermediate
                  • Novice
                  • Student

                  Comments about oreilly Scala Cookbook:

                  I downloaded the mobi version and I am only about 4% into the book, but my impression so far is that I made a great choice. I own quite a number of good scala books but I can see where I will be able to pick up more day to day scala programming solutions from this book than any of the others.

                  Displaying reviews 1-7

                  Back to top

                   
                  Buy 2 Get 1 Free Free Shipping Guarantee
                  Buying Options
                  Immediate Access - Go Digital what's this?
                  Ebook: $46.99
                  Formats:  DAISY, ePub, Mobi, PDF
                  Print & Ebook: $60.49
                  Print: $54.99