Blog

Integrating Robolectric with IntelliJ

Unit testing is a best practice, but has been particularly difficult in Android. One library that makes this process much simpler is Robolectric. Integration into your project can be tricky and most methods start with maven and create an Android project from scratch. I’m a huge fan of living in IDE-land as much as possible, so this approach minimizes command line work and manual project configuration. This tutorial will walk you through using IntelliJ to generate the project and maven…

Using Cocoapods to Manage Private Libraries

Introduction Cocoapods (http://cocoapods.org/) is a dependency management framework for XCode. It allows you to declaratively define project dependencies and have them included in the build of your project. It’s like Apache Maven or Ruby Gems for XCode. There are many tutorials on getting started with Cocoapods, so in this blog post I will present a simple case where we have a project that depends upon two internally developed projects or private libraries. We will start by creating two projects, each…

Using Maven to Integrate Flyway in an Existing Database – Part 2

This is the second article of a two-part series on using Maven to integrate Flyway in an existing database. It addresses several key issues including using Maven profiles to manage promotion of migrations to hierarchical levels of a database as well as managing migrations across multiple disparate projects that use the same database. Unless you are an experienced Maven and Flyway user, it is suggested you review the first article of this series, Using Maven to Integrate Flyway in an…

Using Maven to Integrate Flyway in an Existing Database – Part 1

I was recently asked by a client to investigate database versioning / migration tools. Having had previous experience with Rails db Rake tasks and Liquibase, both of which require a DSL, I looked for a more Java-friendly tool and found Flyway. One of the pre-requisites was to be able to integrate the tool with an existing database and SQL scripts to reduce the learning curve for application development personnel. We were also looking for a tool we could run with…

Chariot Day: Then and Now

New and Cool AJAX, DWR and Spring Intro to JPA Spring and Groovy Intro to Ruby Selenium Web Testing Firebug: Web Debugging Evolved Spring Webflow Django as a Second Language Intro to Maven Google AppEngine: A Simple App Introduction to Asynchronous Servlets Introduction to Spring Batch Apache Camel Intro to Lift Grails Is, Knows, and Can Intro to jQuery/jQuery Beyond Basics Intro to OSGi Spring Roo Akka 2012: Real-Time Web Applications 2012: Griffon: Groovy Desktop Apps 2012: Scala: Definitely Not…

Scalathon update – attend discounted training from Chariot Solutions, Typesafe, around the event!

Preparation for Scalathon 2012 is well underway. In addition to the coding and social attractions of last year’s successful event, this year’s Scalathon provides opportunities for Scala training. Typesafe and Chariot Solutions are offering three Scala training classes, in conjunction with Scalathon. Even better, Scalathon attendees are eligible for substantial discounts on the training fees. The week prior to Scalathon, we are offering the Fast Track to Scala course, probably the best way to dive head-first into Scala. This will…

Read and Write NFC Tags with PhoneGap

The phonegap-nfc plugin allows you to read and write NFC tags from a PhoneGap application using JavaScript. The plugin originally supported Android. The latest release adds support for Blackberry 7.0. After installing the plugin into your PhoneGap app (See README) it is easy to start scanning tags. Create a function that will handle the NFC events. function onNfc(nfcEvent) { // display the tag as JSON alert(JSON.stringify(nfcEvent.tag)); } Create the optional success and failure callbacks. These callbacks are for success and…

Testing Spring Roo add-ons

This is a combination of a two-part article on Spring Roo and Testing I originally posted on rimple.com, where I write about Spring Roo topics periodically around my book, Spring Roo in Action., co-authored with InfoQ’s Srini Penchikala.. You may find more information about writing Roo add-ons from my recent ETE / Richmond JUG presentation, Leaping Forward with Roo add-ons. How to test Roo add-ons I’m working on updates to several Roo add-ons, which I am going to be pushing…

Camera Access from Android Browser

The browser in Android 4 is able to take pictures from a web page and display them without any plugins or server interaction. This demo uses the Device API and File API to take and display a picture on a phone using the browser. Try it on your Android phone http://don.github.com/html-cam/. I wrote this demo after reading David Calhoun’s post about Android implementing device APIs. This works on my Google Nexus S running Ice Cream Sandwich (4.0.4). The Device API…

Securing Data in iOS

There are numerous ways to secure data that you are storing on an iOS device. The Simple/Built-in Way The simplest way is to take advantage of the iOS Data Protection (iOS 4+). This can be accomplished by setting an attribute on a file like this: [[NSFileManager defaultManager] createFileAtPath:[self filePath] contents:[@”super secret file contents” dataUsingEncoding:NSUTF8StringEncoding] attributes:[NSDictionary dictionaryWithObject:NSFileProtectionComplete forKey:NSFileProtectionKey]]; There are several different levels of file protection. The following was taken from the NSFileManager class reference from Apple: NSFileProtectionNone – no file…

How can we help your company with your development needs?

Contact Us