Articles Tagged ‘sbt’

Creating Grammar Parsers in Java and Scala with Parboiled

Sunday, January 26th, 2014

Parboiled is a modern. lightweight and easy to use library to parse expression grammars in Java or Scala and in my humble opinion it is perfect for use cases where you need something between regular expressions and a complex parser generator like ANTLR.

In the following tutorial we’re going to create a simple grammar to specify a task list and write an implementation of a parser also as unit tests for each grammar rule in Java.

Additionally, we’re using the Scala variant of Parboiled to build up an Abstract Syntax Tree parser and analyze a given task list with it.

(more…)

Using Apache Camel with Scala and the Camel Scala DSL

Wednesday, February 13th, 2013

Whenever I encounter a situation where I have to mix a blend of different services and endpoints and apply one or more of the traditional enterprise integration patterns then Apache Camel often is my weapon of choice.

I simply love how easy it is to set up some datasources, add some routing magic, data transformers, load balancers, content enrichers and enjoy the result.

Another thing that I’m beginning to love is Scala and so this is the perfect time to write an article about using Scala and Apache Camel together.

In the following tutorial we’re setting up our environment using SBT and Scala we’ll take a look at several interesting use cases for camel.

(more…)

Lucene Snippets: Faceting Search

Tuesday, August 28th, 2012

The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets.

In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards ..

(more…)

Search
Tags
Categories