Empower Scala with Apache Solr

Reading Time: 3 minutes Solr is ready to use enterprise search server. Here I am going to show you how we can use both of them together to empower your scala application with solr. Solr is able to achieve fast search responses because, instead of searching the text directly, it searches an index instead. This is like retrieving pages in a book related to a keyword by scanning the index Continue Reading

Annotations in Scala

Reading Time: < 1 minute In this session, we will learn about annotations. Firstly, we will see the definition of annotation, standard annotations and then we will learn to write our own annotations. As of now, with Scala we can create compile time annotations (could we create runtime ones without resorting to Java?). For example, if you look at the @tailrec annotation in Scala then it would verify that the Continue Reading

SOLID Principles with Scala

Reading Time: < 1 minute It is quite evident what SOLID principles mean for class typed object oriented languages like Java. However, what do they mean for hybrid languages like Scala which merge the Object oriented and functional approaches. In this KnolX session, we tried to decipher what SOLID principles meant for Scala. Though much of what we know about them can be applied to Scala if we code in Continue Reading

Re Render HTML Template using Scala and Lift

Reading Time: < 1 minute In this section , I will explain how to re-render HTML Template without loading the browser . You can refresh HTML template without loading browser via AJAX using Scala and Ltft . Lift provides SHtml.memoize which memoize the NodeSeq used in apply() and then call applyAgain() in an Ajax call . You can re render a particular template part of HTML page or complete page Continue Reading

Implement Geolocation using Scala and Lift

Reading Time: < 1 minute In this section , I will explain how to implement Geolocation using Scala and Lift . You can easily fetch user’s current location or near by location by his IP address . 1) You will need API key to be able to use . To get API key , just Go to IPInfoDB . 2) Get user’s IP address var ipAddress: String = "" Continue Reading

Knolx Session: Functional Object in Scala

Reading Time: < 1 minute Welcome to another week of KnolX sessions .The emphasis in this session  is on classes that define functional objects, that is,objects that do not have any mutable state.Along the way, this session will  show you more aspects of object-oriented programming in Scala: class parameters and constructors, methods and operators, private members, overriding, checking preconditions, overloading, and self references.