Pexels Photo 247819

How to start learning Scala by Wiem Zinelabidine

Pexels Photo 247819

If you're new to Scala and looking to learn then this great article by Wiem Zinelabidine will be a good guide to start with. 

"Scala is a multi-paradigm programming language; It's a combination of functional programming and object-oriented programming. Scala is statically-typed language that compiles to Java bytecode and runs on the JVM. That means the type of a variable is known at compile time.

If you are interested in learning Scala, I would like to share my small experience - follow those steps:


Step 1:

You should firstly learn about the functional programming paradigm. To put this on practice. Haskell is a great example to help you to understand functional programming. Please read this tutorial Learn You a Haskell for Great Good. Haskell is a purely-functional, lazy, statically-typed programming language with type inference. 

Train your brain to learn functional programming paradigm faster with Haskell, in every Chapter try some examples and you will make yourself comfortable with Haskell.


Step 2:

Getting started with Scala. 
Subscribe and follow the courses in Coursera and do the exercices for every Chapter. 
There are a videos of Martin Odersky. Martin will teach you the main functionality of Scala and how to make them on practice, with a detailed explanation. You will learn about: recursion, the difference between functional and imperative programming, how to create and use a partial function in a particular value, method, classes, design your data structure, how to organize your classes and traits, polymorphism, how to use types and pattern matching and finally how to play with lists and collections (vectors, maps, ranges, arrays...).

There are also cool assignments to familiarize yourself with Scala.


Step 3:

Learn about the interesting libraries like:

  • AKKA: you should thinking about concurrent programming. You can distribute your application with Akka. Akka uses the actor model to make it easier to write your concurrent, parallel and distributed systems. The Akka Actors are objects which encapsulate state and behavior. Instead of calling methods and using threads, you can just send a message to the actor in question and it will process the message.
  • Akka HTTP:  to provide and consume your HTTP-based services.
  • Argonaut: is a JSON library for Scala for parsing, printing and manipulation as well as convenient codecs for translation to and from scala data types.
  • Slick: makes it easy to work with relational database.
  • Phantom: is the leading tool for integrating Cassandra and makes it easy to manage your Cassandra DB.
  • scalaz: provides purely functional data structures.

And then you will be able to create a client/server application, and you can easly connect to your database and manage your data with ORM libraries.



When you use a library and you're interested to learn more about it and you want to get a quick answer to your questions, you can join chatrooms on Gitter for most libraries. You can improve your knowledge about Scala when you watch videos of conferences in Youtube like: Scala WorldScala DaysSoftware Mill and a lot of interesting channels or you can attend a conferences and for sure you will be in love with Scala!"


Article originally posted on and written by Wiem Zinelabidine