Home » JVM Languages » Page 54

JVM Languages

Partial updates in an immutable World

This post was prompted by a conversation with a good friend, who is an experienced Java developer taking their first, tentative, steps towards becoming a Scala programmer. Basically, the conversation went as follows: “…Immutability seems good and like a goal I should aim for. How can I get this in my domain objects without having to provide a multiplicity of ...

Read More »

Processing JSON in Scala with Jerkson

Introduction The previous tutorial covered basic XML processing in Scala, but as I noted, XML is not the primary choice for data serialization these days. Instead, JSON (JavaScript Object Notation) is more widely used for data interchange, in part because it is less verbose and better captures the core data structures (such as lists and maps) that are used in ...

Read More »

Squealer: An Anti-ORM Influenced Scala Tool

I was reading a blog post from Prismatic the other day and it got me thinking about how we, as programmers, have diverged so much from our roots. In the beginning, we designed small tools which did one thing and did it well. Now we’re more concerned with meeting deadlines and shipping code as fast as possible. We’ve fallen in ...

Read More »

Scala Basic XML processing

Introduction Pretty much everybody knows what XML is: it is a structured, machine-readable text format for representing information that can be easily checked for the “grammaticality” of the tags, attributes, and their relationship to each other (e.g. using DTD’s). This contrasts with HTML, which can have elements that don’t close (e.g. <p>foo<p>bar rather than <p>foo</p><p>bar</p>) and still be processed. XML ...

Read More »

Publishing Play 2 modules on github

Now you’ve doubtless followed my earlier guides on writing modules for Play 2, I imagine you’re keen to show your coding chops to the world. The problem is – and this is quite a big one, I’m afraid – there is no place to publish your modules to. When I first starting writing Play modules, the repository was already set-up ...

Read More »

Binary websockets with Play 2.0 and Scala

In a recent article I showed how you can use webrtc, canvas and websockets together to create a face detection application whose frontend runs completely in the browser, without the need for plugins. In that article I used a Jetty based backend to handle the image analysis using OpenCV through the JavaCV wrapper. When I almost finished the article, I ...

Read More »

Play framework 2 quicktip: Scala console

When I first started to play with Scala, I was amazed by the Scala interactive interpreter (also known as REPL, read-evaluate-print-loop). It was one of those things that you never expected to find in a statically typed, compiled language like java or scala. What would you say if we could have it for our play applications?… In scala OR JAVA! ...

Read More »

Student Questions about Scala, Part 2

Preface This is the second post answering questions from students in my course on Applied Text Analysis. You can see the first one here. This post generally covers higher level questions, starting off with one basic question that didn’t make it into the first post. Basic Question Q. When I was working with Maps for the homework and tried to ...

Read More »