I was invited to present a short introduction to Scala, to the Johannesburg Java Users Group last night. The presentation covered some basic language syntax and features of Scala.
Category Archives: Scala
I’m on a gamble here, guys. I’m hedging my bets that Scala will take over from Java in the next 3 years as the mainstream programming language of choice. Why? Well, it has some really great programming features that aims to be concise and is able to run on a JVM.
So, the only way that I’m going to learn Scala is to get may hands dirty and develop a couple of Scala applications.
To begin I’ll need to fire up the Ubuntu machine and install Eclipse (Helios) since I’m familiar with the IDE in my Java development and the latest Scala plugin (Scala IDE 2.9) works with Helios only. Helios isn’t in the Ubuntu repository so I’ll need to download the install (a tarball) from Eclipse. I extracted Eclipse in to:
My workspace is set as:
Installing Scala IDE Plugin
To install the Scala IDE plugin, add the following line to “Help > Install New Software …” list
You may have to do a weird “Refresh” if plugin *appears* to fails to install.
Installing Lift (the Scala MVC framework)
Lift is a Scala web framework. At the time of writing this, I will be using Lift 2.3. I extracted package in to:
~/workspace/ to become ~/workspace/lift-lift_23_sbt-cf313e1
I then downloaded and installed Simple-Build-Tool (SBT) to help build the Lift framework. This requires Maven and Jetty…just follow the instructions on the SBT wiki.
Once SBT was installed, I Maven and Jetty installed:
$ sudo apt-get install maven2 jetty
Once that was complete, I ran my SBT script from the lift_basic/ folder in the Lift folder (as per the SBT install instructions) to launch Lift (browse to http://localhost:8080 for the Lift app).