Java doesn’t allow multiple inheritance for the fear of Deadly Diamond of Death. And to circumvent this Java introduced interfaces where in a class can extend only one other class, but implement multiple interfaces. These interfaces don’t contain any implementations. (This is going to change with Defender Methods in Java 8). Lot of other languages [...]
Archive | Web Frameworks RSS feed for this section
Inheritance and Overriding in Scala
July 4, 2012
Inheritance in Scala is quite similar to the way it is in Java. The overriding aspects are a bit more detailed because in Scala there are not just methods to override but also vals, vars. There are a few restrictions added in Scala like: Overriding classes must use the “override” modifier. In Java one can [...]
Primary and Auxiliary Constructors in Scala
June 29, 2012
Constructors in Scala are a bit different than in Java. Scala has 2 types of constructors: Primary Constructor Auxiliary Constructor Primary Constructor In Java we have a no-args default constructor which is provided for every class which doesn’t provide its own constructor methods. On a similar lines Primary Constructor in Scala is the kind-of default [...]
Package Objects in Scala
June 28, 2012
Package Objects in Scala was introduced as part of Scala 2.8. With this feature a package in scala can contain field declarations, methods along with the classes, objects and traits. The methods and variable declarations are put into the package object and are accessible in the package for which the package object was declared. Lets [...]
Fields which satisfy JavaBean specification – BeanProperties in Scala
June 26, 2012
We have seen previously about declaring fields in classes in Scala and also saw the kind of bytecode created for each of the cases. But lot of Java tools out there expect the fields in classes to follow the JavaBeans specification and in order to support that Scala provides @BeanProperty annotation. BeanProperties in Scala Lets [...]
Understanding Classes and its Fields in Scala
June 25, 2012
For those moving from Java to Scala would find it a bit different to see how the classes and their fields are treated in Scala. Most of you in the Java world always complain about the verbosity of adding fields and then to add their getters and setters. Lets look at how the Classes and [...]
Creating JSON using Groovy
June 22, 2012
I wrote previously about parsing JSON in Groovy. In this article I show a simple example of creating JSON using Groovy. I had to learn about creating JSON using Groovy as I would be using JSON as the response format in the REST API which might be developed sometime in future. Creating JSON using Groovy [...]
Java HelloWorld vs Scala HelloWorld
June 17, 2012
As a first step into learning Scala and as one who is familiar with Java, let us compare the customary Helloworld programs in Java and Scala. You might already know that to run a Java program, there must be a public class with a main method that takes one parameter, a String[], and has a void return [...]
A simple Location and Weather mashup using Gaelyk Framework
June 12, 2012
In our sample Gaelyk application here we stopped at just obtaining the location information. In this post lets update that application to fetch the Weather information as well. For the weather information we make use of the Weather Underground API which provides a lot of features like geolocation information, current weather conditions, forecast weather conditions [...]
Developing Groovy based web application and deploying to Google App Engine
June 5, 2012
We have seen how to develop a ZK based application and deploy it to OpenShift. Google has also a Paas offering called Google App Engine(GAE) which supports Java, Python and Dart applications. Gaelyk is a simple Groovy based toolkit to develop and deploy application to GAE. In this article lets build a simple Gaelyk based [...]






July 5, 2012
1 Comment