background preloader

Simply Scala

Simply Scala

scala InfoQ: Scala & Spring: Combine the best of both worlds Introduction Scala is a great programming language combining a concise and legible syntax with a seamless fusion of the object-oriented and functional programming paradigm that is fully compatible with Java. The latter makes it possible to combine Scala with Java APIs and frameworks that Java developers are familiar with. By doing so, the usage of existing Java frameworks can be improved and simplified. In addition to that, the threshold to learn Scala is also lowered because it can easily easily be integrated with the “well-known world of Java”. In this article I will show how Spring, one of the most popular frameworks, can be leveraged by means of Scala. In order to demonstrate how Scala compliments Spring this article is based on a simple sample application. The domain model resembles a mini version of a social networking application. Step 1 val p1 = new Person(“Rod Johnson”) val p2 = dao.findByName(“Martin Odersky”) p1.link(p2) personDao.save(p1) Step 2 Step 3 Requirements Implementation

Planet Scala implicit.ly - Scala software, hot off the presses Scala for Java Refugees Part 1: main(String[]) 7 Jan 2008 This article is also available in Spanish and Bulgarian. You know who you are. You’re starting to to become a bit pragmatic about your language choice though. The good news is that there’s light at the end of the tunnel. The only problem you have now is figuring out where to start. Have no fear, ye refugee of Java EE grid iron, all is not lost. Introductions If you’re like me and can identify with the above, then this series is for you. Did I mention Alex’s Scala introduction series? Getting Started Nothing like getting things rolling with a little code. Notice the name of the file in question? Editors Just a brief note on your first few moments with Scala: using the right editor is key. Eclipse (using one of two shoddy and unstable Scala plugins) Emacs IntelliJ (basically just syntax highlighting support) TextMate VIM jEdit More Hello World Save this in a new file (we’ll call it “HelloWorld2.scala”), compile and run using the following commands: Scala doesn’t really have statics.

Roundup: Scala for Java Refugees - Code Commit 13 Feb 2008 To be honest, I’m somewhat kicking myself for writing this post. As I’ve said many times: roundup posts are for people who are too lazy to write real content. I can’t tell you how many blogs I’ve come across which have a roundup-to-post ratio of easily 3:1. Meta-roundups aside, I decided (after much deliberation) that a single post linking to all six parts of the series would be useful to one or two people. Of course it’s always possible that you subscribe to my way of looking at things. Part 1: main(String[]) Introductory article giving motivation for learning Scala and some first steps to “get your feet wet” in the language. Part 2: Basic OOP Looking at Scala’s syntax in a little more detail. Part 3: Methods and Statics Scala’s method syntax is far too powerful to cover in a single post. Part 4: Pattern Matching and Exceptions Pattern matching is one of the most useful constructs in the entire language. Part 5: Traits and Types Part 6: Getting Over Java

First Steps to Scala ScalazineFirst Steps to Scalaby Bill Venners, Martin Odersky, and Lex SpoonMay 9, 2007 Summary In this article, you'll follow twelve steps that are designed to help you understand and gain some basic skills in the Scala programming language. Scala is a statically typed, object-oriented programming language that blends imperative and functional programming styles. Scala was developed starting in 2003 by Martin Odersky's group at EPFL, Lausanne, Switzerland. One reason you might want to use Scala is that it allows you to increase your productivity compared to Java while leveraging JVM execution speed, your existing investments in Java code, knowledge, and the vast array of APIs available for the JVM. In Italian, Scala means staircase. To run the examples in this article, you should download Scala from the Scala Downloads page. The easiest way to get started with Scala is by using the Scala interpreter, which is an interactive “shell” for writing Scala expressions and programs. scala> 1 + 2

Programming in Scala, First Edition Programming in Scala, First Editionby Martin Odersky, Lex Spoon, and Bill VennersDecember 10, 2008 Martin Odersky made a huge impact on the Java world with his design of the Pizza language. Although Pizza itself never became popular, it demonstrated that object-oriented and functional language features, when combined with skill and taste, form a natural and powerful combination. Since that time, we at Sun tried to simplify program development by extending the language with piecemeal solutions to particular problems, like the for-each loop, enums, and autoboxing. Lately, there has been a backlash against statically typed languages. Scala is a tastefully typed language: it is statically typed, but explicit types appear in just the right places. Will Scala be the next great language? Neal Gafter San Jose, California September 3, 2008 Many people have contributed to this book and to the material it covers. Scala itself has been a collective effort of many people. Who should read this book

Scala Documentation - Scala Documentation

Related: