Insights and perspectives to keep you updated.

PhoneGap : To build cross-platform mobile apps using HTML5, Javascript and CSS.

PhoneGap is an open source framework for quickly building cross-platform mobile apps using HTML5, Javascript and CSS. Building applications for each device–iPhone, Android, Windows Mobile and more–requires different frameworks and languages. PhoneGap solves this by using standards-based web technologies to bridge web applications and mobile devices. Since PhoneGap apps are standards compliant, they’re future-proofed to work with browsers as they evolve. The PhoneGap code was Continue Reading

ElasticSearch: How to index data in bulk in elasticsearch with scala using java Bulk API.

Elasticsearch is an open-source, restful, distributed, search engine built on top of apache-lucene.In this post, we will learn to use elasticsearch java api in Scala to index data using BulkRequest. we will begin with adding dependency of elasticsearch in the project. At the time 0.19.8 was the latest. The artifact is available on typesafe repository. Here is the snippet in build.sbt file. name := “ElasticSearchBulkproject” Continue Reading

ATDD, ScalaTest and Scala

In my last post on ATDD, we had seen how it was easy with Cucumber to write a feature file and share it with our stakeholders in order to validate our understanding of the functionality. The idea again is to build the right software right. In this post, we would learn how to do ATDD with ScalaTest but before that let us do a recap Continue Reading

Play Framework : Uploading a file to server

In order to upload a file to server we used to use the form with multipart/form-data encoding. File upload is very easy with Play. Use a multipart/form-data encoded request to post files to the server, and then use the java.io.File type to retrieve the file object. Let us see how we can handle the file upload within Play framework. Writing an HTML form: @helper.form(action = Continue Reading

Creating Scala Project With SBT 0.12

I have recently started working with scala. SBT is the tool of choice for Scala based projects. Let us see how to get it working on windows. Installing SBT for Windows Create a batch file sbt.bat which contains following script $ set SCRIPT_DIR=%~dp0 $ java -Xmx512M -jar "%SCRIPT_DIR%sbt-launch.jar" %* Now, put the sbt-launch.jar file in same directory where you put sbt.bat file.Put sbt.bat on your Continue Reading

Dependency Injection In Scala using Self Type Annotations

Dependency injection is a software design pattern that allows removing hard-coded dependencies and making it possible to change them, whether at run-time or compile-time. Dependency Injection has three kind of software components 1. Dependent or Consumer : Describe what software components, it depends on . 2. Dependencies on which consumer depends 3. Injector also known as provider : Decides what concrete classes satisfy the requirements Continue Reading

Scala LiftWeb: Upload File using AJAX

Liftweb provides AJAX functionality for all html elements except file upload using Scala . But there is a way to upload file using AJAX by binding form as AJAX form . 1) add below lines in your html . <div class="lift:FileSnippet.uploadFile"> Upload File : <input name="upload" type="file"></input> <input type="submit" name="submit" value="Upload"/> </div> 2) class FileSnippet { def uploadFile(form: NodeSeq): NodeSeq = { def handleFile():JsCmd = Continue Reading

Play With Liftweb’s AJAX Generators using Scala

AJAX is an approach for building dynamic web content on the client side . In Liftweb , we can implement this approach either by AJAX or by Comet . Comet is like AJAX , except in opposite direction . AJAX model increases the richness of the User Experience for a single client at a time, Comet can do the same for multiple users. First thing Continue Reading

Integrate Github Repo with Travis CI For Scala Play2.0 and MongoDB Project

Travis CI is a hosted, distributed  continuous integration service used to build and test projects hosted at  GitHub for the open source community. It supports building software in numerous languages, including Ruby, JavaScript, Java, Scala, PHP, Haskell and Erlang. A Travis worker comes with a good amount of services you might depend on, including MySQL, PostgreSQL, MongoDB, Redis, CouchDB, RabbitMQ, memcached and others. Hosting your project Continue Reading

Google Apps Script: Documents and Files Sharing Between the Google Apps Domain

The Google Documents List API allows client applications to view and manipulate files in a user’s Documents List. In this blog we would learn how to share documents and files between the Google Apps Domain. When our application requests non-public user data, it must include an authorization token. The token also identifies your application to Google. Requests to the Google Documents List Data API for Continue Reading

Google Apps Script : To store data on google Cloud Sorage

Google Cloud Storage is a new service for developers to store and access data in Google’s cloud. It offers developers direct access to Google’s scalable storage and networking infrastructure as well as powerful authentication and data sharing mechanisms. Developers can store objects of any size and manage access to their data on an individual or group basis using Google Cloud Storage. Google Cloud Storage is Continue Reading

Akka Actor And Futures

This presentation was presented at Knolx session. It was presented before my last post on Akka Futures with a simple example. It focusses on Akka 2.0 and Akka Futures. Please note that in latest Akka version which is for scala 2.10, Scala Future and Akka Future has combined. This presentation caters to Akka 2.0.5 version. This talk is inspired by Viktor Klang talk on Akka Continue Reading

Functional Programming With Scala

Functional programming is a programming style emphasizing functions that return consistent and predictable results regardless of a program’s state. In FP we construct our programs using only pure functions. In other words functions that have no side effects. Scala smoothly integrates object-oriented and functional programming.It is designed to express common programming patterns in a concise, elegant, and typesafe way.

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!