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
This is a book that is full of simple examples that could give you a kick start in the Scala world, specially if you are coming from Java. What I liked about this book is that the explanations of most of the recipes are simple and clear, on the other hand, being Scala mainly a functional programming language, there are just few recipes that approach a solution in a functional way. In conclusion, I would recommend this book to Scala beginners, though if you jumped to the Scala world because you like or want to learn functional programming, you might end up disappointed.
Scala Cookbook by Alvin Alexander is a 700 pages book containing a wealth of insights regarding the Scala Programming language.
I think it is the best Scala book out there and even beats Programming in Scala which is the defacto Scala reference. This is due to multiple reasons: * It is focused very much on application and less on theory * Very concise yet precise examples * Contains information on Akka
When it comes to O'Reilly cookbooks there are pretty much two different types of cookbooks: 1. They assume that you are already pretty familiar with the language/tool and teach you some pretty advanced stuff (like the SQL or Python cookbook). 2. They assume you had some prior exposure to the language and give you a solid understanding of the entire language (like the R cookbook).
This book definitely belongs to the second category. However, I probably wouldn't recommend it to a total beginner since A Beginner's Guide to Scala, Object Orientation and Functional Programming is a better choice for that in my opinion. However, I'd definitely suggest reading those two books in a row.
A small notice on the edition. The first edition has some outdated stuff (like the MongoDB driver or some Akka functionality) and a second edition is coming up. If you are not in a hurry, you might want to wait for the second edition to be released.
My boss recommended this book to me as a good introduction to Scala since my new job has me writing in it. I read this bit by bit almost every work morning and evening on the train, which worked well with the small recipe format. Coming from a Java background, this book spoke well to me since Alexander assumes this. It's helped me tremendously with my new job and with getting through the (in)famous `Functional Programming Principles in Scala ` course by Martin Odersky on Coursera. The course has been quite difficult, but the book much more approachable for me being a greenhorn with functional programming/Scala and still trying to make up for my lack of a formal CS background. I'm passing on the physical copy to another interested coworker but putting in a few dollars to get a Kindle copy for myself since I find this book valuable enough to be a resource to go back to.
I say all this even though the book is now 4 years old, though it would be nice for the author to come up with a new edition.
Don't expect a long and detailed review. The cookbook is not something you read end to end. It's there when you need it.
Although it's now dating 5 years, it was still helpful to me in majority of the parts regarding "Types", "Idioms" and "Strings".
It explains the best covariant, invariant and contravariant types in Scala which is fairly simple once you get it, but the official docs of Scala is fairly far from the point.
Where the book fell short for me - "Web Services" and "Databases and Persistence" are very library dependent and of course they're dated by now.
Not really a "Goodreads" type of book but wanted to add it here to mention that even in the days of the internet, these books are worth getting. Google results are basically going to give you the same five Stack Exchange posts over and over followed by unrelated garbage. Plus it's nice and thick so it works great to prop up my monitor at work.
Most of those recipes are easily searchable online but I have to admit Alvin has a special place in my heart with how much he helped me in my fp journey so I actually got a soft copy of this book.
Feels classy to sometimes go oldschool at work and look for a solution in a book rather than stackoverflow :)
Honestly, I have no clue who this book is for precisely.
On one side, majority of recipes are really simple, low-level usage examples of basic Scala constructs that will surely help you if you're just learning Scala (syntax & stuff). On the other side - some are a bit more interesting and provide depth beyond that (chapters about SBT, actor model and the last chapter about best practices in Scala).
It's not necessarily a bad composition, but what people are accustomed to get from cookbook-style books are quite scenario-specific recipes, that help them understand the strength of particular technology. This book doesn't really work that way, but I've still learned some things I didn't know earlier, so I find it useful anyway.
Alvin Alexander has such a nice blog that almost anyone who has a question that has something to do with Scala will definitely end up getting to his website at least once.
I've decided to give his book a try and i didn't get disappointed. First I thought I would skim through it in a couple of hours due to relatively easy concepts and redundant information that I might have known before. Unfortunately (luckily?), that didn't happen.
The book is slightly outdated (who needs Scalatra or pure lift-JSON these days?), though delivers a lot of useful concepts that I've happily put under my belt.
My score 4/5
It needs to be updated + I'd like to remove a lot of worthless water that's poured upon you here and there in the "Discussion" parts of every chapter.
Great insights & easy to use recipes. The downside that this book becomes quickly obsolete / incomplete with the dawn of newer Scala versions & libraries. Some of the Scala 2.10 stuff has been improved / changed with Scala 2.11 (as of this writing)
The book provides additional recipes, samples, details on top official documentation. As someone who is new to Scala, I sure learned a lot from this book.