Category Archives: Scala

Writing a DSL with Scala Parser Combinators

Scala parser combinators provide a very easy way to construct your own domain specific languages (DSLs). Let’s look at a simple example. Suppose that you work on a large application which produces various report files on a scheduled basis. You … Continue reading

Posted in Scala | Tagged | 2 Comments

Practical Scala – processing XML

This is the second article in my series Practical Scala. The first article covered the basics of Scala syntax and then moved on to file IO and regular expressions. This article will show you how to read and write XML. … Continue reading

Posted in Scala | Tagged | Leave a comment

Practical Scala – file IO and regular expressions

Scala is a great language but learning it can seem like you’re battling with too many new concepts to be able to get anything done. The purpose of this article is to show that even with a few lines of … Continue reading

Posted in Scala | Tagged | Leave a comment

Lift controllers example

I’ve recently put together a basic Lift example, based on an e-Commerce theme. It contains: Product listing Basket Checkout Order confirmation It shows the following techniques: How to write forms and process the response How to submit forms using Lift’s … Continue reading

Posted in Lift, Scala | Tagged , | Leave a comment

Why Java developers should be learning Scala

Over the past fifteen years Java has been a phenomenally popular programming language, but it is starting to show its age and programmers are increasingly looking at more modern languages. The purpose of this article is to explain why Scala … Continue reading

Posted in Scala | Tagged | 4 Comments

Generating Javascript with Scala and Lift

One of the ideas that has become popular in recent years is the concept of writing complex browser GUIs entirely in your server side language, and generating the required javascript. In Java both the Google Web Toolkit and ZK allow … Continue reading

Posted in Javascript, Lift, Scala | Tagged , , | Leave a comment

Using Java to download a file that needs authentication

You can easily download files using Java by making a URLConnection. However, if you need to login before accessing the file, how can do this automatically? If you automate the login, how will the code that makes the URLConnection be … Continue reading

Posted in Java, Scala, Selenium | Tagged , , | Leave a comment

Tutorial: Building your first Lift app with sbt

The Simple Build Tool (sbt) is the standard build technology for Scala and Lift applications. However, if you are new to Scala and Lift, trying to learn sbt at the same time can be a little confusing. The aim of … Continue reading

Posted in Lift, Scala | Tagged , | 3 Comments