I'm a Java software developer, consultant and architect that focuses on enterprise applications, quality and performance. I gained interest in Java due to it's open nature and community support. Next to Java, I spend most of my time trying to stay up to date with everything that moves inside the software world like Scala and NoSQL db's. Jelle is a DZone MVB and is not an employee of DZone and has posted 12 posts at DZone. You can read more from them at their website. View Full User Profile

How I Was Convinced to Try Scala

12.22.2011
| 4097 views |
  • submit to reddit

The passion of the Scala community has been the key factor that has endeared many developers to the rising JVM language.

For over a full year now, I’ve been looking into Scala. I have heard many people talk about it passionately and it just got me interested. Also a lot of big companies are investing in this new language. I just figured I had to check it out.

In my 4 years of Java programming, I’ve learned the Java EE stack, (Spring and Java EE) and I must say, not much has changed since then. We got the long awaited release of Java 7 (with lots of features missing) and in 2009 Sun released Java EE 6.

Java EE 6 was a cool release and I have blogged about it for a few times but it is not more than just more abstraction of the same concepts. Spring hasn’t really been moving forward at all. When you look at the release which was used when I started programming professionally and the one we use in production, it is largely still the same version. There is a 3.0 release but to be honest, it is not very compelling.

newsflash_logo-e1290819421137[1]So after hearing people like Dick Wall talk about Scala for a long time, I decided to pick it up. The first thing I have tried was the Scala Koans.

Scala cones is a project on github that helps you to learn a language by correcting failing tests. At the time the Scala Koans project was still in the very early stage and I did not get them to work and gave up rather quickly.

My second attempt at Scala was when I had some spare time and I wrote a simple application which parsed some XML. This worked but in the end this only took me 5 minutes, looking back at it now, I did not use any language feature that was an added value. The only thing I did, was write Java in Scala.

In the mean time I joined the Belgian Scala Enthousiasts and I’m following the mailing list, but still, I couldn’t really write a true Scala application. I didn’t even get the feeling I was hitting it off.

At Devoxx 2011 I was determined to go and see the Scala talks and things that have to do with Scala. I ended up seeing 2 talks about the Play! framework, 3 talks about Scala and a talk about Akka. I did also talk to the guy’s at MongoDB and Typesafe.

Devoxx 2011 was a real eye opener for me to get started with Scala. There were many reasons, first of all there were the talks.

The talk about play! 2.0 showed me how to build a web application with Scala. It also demonstrated what a cool framework Play! is.

The Akka talk showed me how to create super scalable and decoupled applications. It is written in Scala and integrated with the play! framework (version2.0) which was a plus for me.


The talk from Matt Raible didn’t really show me something technical. His talk was about some technologies he wanted to learn (Scala, Play, Coffeescript, {Less}, scalate and jade). He wanted to talk on Devoxx so badly so he just submitted a talk. At the time when he submitted the talk he didn’t know any of the technologies he was going to talk about. He even waited to start learning them until his talk got accepted. Only after the approval, he started learning and blogging about these technologies and then showed what he built at Devoxx. His talk was about the same thing which I was trying to do for over a year, but never pushed through. It might sound corny, but this talk was the real boost for what I’m doing now.



On the other hand I had 2 interesting chats in the downstairs hall.

One was with a mongoDB guy. He showed me the API he had built for connecting with mongoDB from Scala. Unfortunately, I did not get his name… The other was with Henrik Engström, a developer who works at Typesafe (A company founded by Martin Odersky, the creator of the Scala language and next to Scala they also house the play! framework and akka).



We just talked about how you can use scala in web applications.

When I got back from Devoxx, I literally got home and downloaded the Scala runtime, the Typesafe stack (at the time this was only Scala, Akka and the Scala IDE) and the beta of the Play! framework. I have a small project in my head that I’ve been thinking about for some time now and I started implementing it.

Based upon the 3 Scala examples with which the Play! 2.0 beta ships, I’m learning the language bit by bit. But there were a lot of language features I didn’t really grasp. I tried to look into the scala doc but got even more confused. I knew that Typesafe is offering a free book ‘Scala for the Impatient‘, so I decided to check it out. I downloaded that book and started reading it. Things cleared up immensely. I now understand why people say Scala isn’t complex, it just looks that way. Well it’s true. It also explains the weird things you see in the Scala API documentation.
Now I’m working with Play! 2.0 and Scala. When I’m getting the hang of it, I’ll also try integrating Akka and probably deploy it on Heroku and see what it can do.
I’m going to try to keep documenting my steps into Scala, Play! and Akka. I’ll see where It takes me.

 

From http://styledideas.be/blog/2011/12/18/first-steps-into-scala/

Published at DZone with permission of Jelle Victoor, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Hussachai Purip... replied on Thu, 2011/12/22 - 1:08pm

You also show me the technologies that you want to learn. :D I wasn't interested in Play! framework until I known that it isn't built on top of servlet. http://iam.guillaume.bort.fr/ Sadly, Guillaume didn't update his blog since 2010. On the contrary, he could spend more time on Play!, that's better. Play! is a revolution in java web ecosystem and comes with Scala native support in version 2.0. Oh Man! Who can resist its affection? Not me certainly. I started learning Play! and Scala at the same time after reading Matt Raible post http://raibledesigns.com/rd/entry/play_2_0_a_web I can catch the feeling of everybody who wrote about Play! 2 from their writing, I known how cool it is instantly while I was reading.

Jelle Victoor replied on Fri, 2011/12/23 - 4:06am in response to: Hussachai Puripunpinyo

Just dive in, its a fun and new technology. I really recommend it! If you have questions or thoughs you want to share, contact me via my blog. Jelle

Ash Mughal replied on Wed, 2012/01/25 - 7:18pm

I am also an experienced Java Programmer and worked with J2SE, J2EE and almost all areas of Java. I was also struggling with Scala to get understanding of it.

Your post is really good to help me learn it. After reading your post and comments of the above people, I will be enjoying this technology.

new java

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.