Start Building For Apple Watch Today

With the imminent release of Apple Watch, most development teams with an iOS app will want to get in on the action. But you want to do this without messing up your current Xcode environment. Luckily, it’s all pretty easy.

First, to access the WatchKit SDK, you’ll need to install the beta version of Xcode 6.2, which is conveniently listed at the bottom of Apple’s WatchKit page. The essential thing is that once you download the .dmg and click on it to start the installation, don’t drag it directly onto your Applications folder (the default action). Instead, make a folder inside Applications for the beta version, say Xcode-6.2-beta and drag the beta version into that directory. You can now run beta Xcode from that directory when you want to do your WatchKit experimentation, safe in the knowledge that your production Xcode is still the system default.

As well as Apple’s documentation, I followed a tutorial on Ray Wenderlich’s site to get up to speed quickly

Single Page Applications: The Benefits & Pitfalls

Over the past few months I’ve had the opportunity to speak at some local events in Cork about developing single page applications, with a focus on Backbone.js. Both the CorkDev and Cork ALT.NET events had a great audience with some very interesting questions throughout.

Here’s the recording of the talk at the ALT.NET meetup, (thanks to Kristian for looking after this!)

The slides from the CorkDev meetup, where I discuss why Backbone.js is still relevant, can be found on Slideshare:




Beginning Backbone: My First Book

BookCoverIt’s been a long time ambition of mine to write a technical book. In the second half of 2013, I finally got the opportunity to do that, publishing Beginning Backbone.js with Apress. The book is available to purchase now, in all the usual formats.

Read (or scroll, but I’d prefer you read!) to the end of this post to get an excellent 30% off the ebook price until January 23)

Who’s The Book For? Everyone

When planning this book, I had a number of different readers in mind. As such, I feel that I’ve written this book to appeal across the board. JavaScript novices will find the book useful, as it starts at the simplest level. At the same time, experts should find this to be an excellent way to learn Backbone inside out.

I also wanted this book to appeal to CTOs, who are hearing that Backbone is (or isn’t) the next best thing for their web app: this book will help them form their own opinion. Finally, the book will assist teams who are getting to grips with large scale JavaScript application development.  With chapters covering test driven development, best practices and continuous integration, the book shows the level of maturity that JavaScript has reached.

What’s Backbone?  

At this point, I’m sure most people have heard about Backbone, a library that helps organise your JavaScript code in a structured Model View * format. The thing that I like most about Backbone is that it is un-opinionated, unlike Angular and Meteor. While this results in the developer needing to write more boilerplate code, it gives a very comfortable level of control. More about this later, as it is one of the most contentious issues in JavaScript framework selection these days.

What’s in the Book?

There are a number of different sections in the book that deal with different issues.

The Introductory Section

The first two chapters are designed to ease the reader into the web application development world. This first group of chapters introduce Backbone and similar libraries, along with going back-to-basics on object oriented JavaScript. If you’re rusty,it’s worth reading through this chapter to strengthen your understanding of what the language provides before diving into the library itself.

The Nuts & Bolts Section 

The next batch of three chapters bring in the main concepts that exist in Backbone: Models, Collections, Views, Routers and Events. When going through the code examples in these chapters, a node.js server is used to provide a  REST API. While the depth in which node.js is explored is limited, I feel this a bonus for front-end developers. Each of these chapters iterates from the simplest possible version and then shows how additional configuration add more power.

I am particularly proud of the chapter that discusses Backbone Views. In true un-opinionated fashion, I explain how to use three of the leading template libraries for your views: Underscore, Handlebars and Mustache. Using a template library means that you get to avoid polluting your JavaScript with HTML strings. All three libraries listed have their own brilliances, but I find it difficult to beat Handlebars.

With this knowledge, Chapter 6 goes from start to finish with a complete application example. For this I went with Twitter, as it provides an easily understandable API. This gives the opportunity to use a Models, Collections, Routers and many different views on a single page. You end up with something that looks like the picture below.


The Extending Backbone Section

From the point, the book changes tone slightly. First I take a look at the huge number of extensions that have been written by the Backbone developer community. Here’s where the naysayers should look, if they feel that Backbones lack of data-view binding is hampering their progress. There are extensions available to help you out of almost any problem that you feel Backbone has. The beauty of this is that you can easily integrate most of these plugins in your Backbone applications. And it’s just as simple to take them out.

Similar to this chapter, Chapter 10 looks at Backbone Marionette and Thorax. These are amazing additions to Backbone, and deserved their own chapter. To put both through their paces, the Twitter sample application is refactored to utilise the features they provide.

The Discipline Section

With all this code, you’re going to need some discipline. That’s where the test driven development chapter will help. The most popular JavaScript testing frameworks out there are Jasmine and QUnit, so these are both described in detail, illustrating how to test out that sample Twitter application.

The next chapter shows how to use Grunt to add continuous integration to your JavaScript development. Grunt is an amazingly powerful tool that no JavaScript developer should be without. As a developer who has come from the Java world, it’s great to see something that easily surpasses the power of Maven or Ant.

The Doing-It-Better Section

For anyone who is already using Backbone, the chapter on best practices will help them to improve on what they already know. These tips were gathered from a wide variety of sources, as well as from my own experiences. Then the book closes out with tips on making your code even more manageable by using Require.js to created a modular codebase.

That final chapter also shows how to use the amazing Yeoman when you need to start from scratch in your development. The Backbone generator that’s included is brilliant. And once you discover the starting point that Yeoman provides, you’ll never look back.

So, In Summary

As you can see, while to book focuses on Backbone as the core topic, it extends much further. It’s a book that covers everything that you need to know about using JavaScript, along with Backbone, in a professional software development environment. I really hope you do enjoy reading it, and using anything that you learn, as much as I enjoyed writing it.

If you like the sound of this, why not buy the book. Or how about this:  I can give you 30% off the price of the ebook if you purchase the book from the Apress site using the code BCKJ14.  

Introducing donate:code

Over the past few months, I’ve been working on building up a foundation that aims to help charities and community groups to gain access to software developers and designers in order to build websites, apps and help  out with technical issues they have. Today being Thanksgiving Day in the US seems to be a fitting time to announce the project, so I’d like to introduce donate:code.

Screen Shot 2013-11-28 at 07.18.34The idea behind donate:code is simple and obvious.  Every charity, school and community group has technology needs. Sometimes it’s a simple website update, or perhaps they need help getting a social network up and running. How about more ambitious charities who want to build an app to generate some extra revenue? There’s just one problem – the cost of getting someone with the technical skills to help. Wouldn’t it be great if someone could donate their time?

Software developers, web and graphic designers excel in their fields. But they know that to be better, they need more experience. Instead of putting time into side projects that go nowhere, why not donate time and expertise to some group that really needs your help. Increase your portfolio, and gain some extra karma while you do. Learn how to work with diverse customers, and make your CV stand out.

Before launching this, I wanted to test the viability of the idea. In doing this I’ve worked on two projects. Firstly, I built Signalong Songs for the Cope Foundation. This is an interactive iPad app that teaches children how to sign along with their favourite nursery rhymes. I didn’t charge a cent for the development of the app, instead requesting that what the charity had budgeted for the app be put to good use in the charity. It proved to me that money wasn’t everything. And it was a fantastic way to give back to charity. I felt that I was onto something.

I also helped out another local charity group in creating a community website for autism awareness. The people behind this charity are true heroes, and it felt great to be able to help them get up and running with a WordPress site that is easy for the Karen, Jon and other volunteers to get news on their fund raising events out, and also to provide support to people affected by autism.

Over the course of building the app and website, along with the site for donate:code itself, I found that there are always people out their willing to help. I managed to get support for the hosting of donate:code, and someone else volunteered their server for another of the projects.  It has encouraged me to reach out further. 

If you’re a developer or designer who likes the  idea of giving, just head on over to donate:code and use the contact form there to volunteer. As much as we need the technical people, we also need the projects to work on: charities and schools, if your budget has prevented you for building the app or website that would make a difference, please contact us too.


Instant Dependency Management with RequireJS

Dependency Management with RequireJSGreg Franko has put together a really concise, useful book on RequireJS. Weighing in at just 29 pages, this book is not too demanding on your time. Don’t let that discourage you; the knowledge you’ll pick up is indispensible.

The book caters for developers who are already familiar with RequireJS, as well as complete newbies. You’ll be shown how to setup a simple RequireJS configuration for your web application and shown how it works in the background.

From there, you’ll be show how to create AMD modules to use with RequireJS, before moving onto the best parts of the book, showing how to use JQuery and Backbone with RequireJS.

What might interest most developers, however, is the application of the DRY (Don’t Repeat Yourself) development principle when developing desktop and mobile web logic. Greg provides a recipe that will make this trivial for you to implement for your project.
Although short, this book is incredibly effective and gets the point with surgical precision. If you’re serious about your JavaScript code base, you’ll want this e-book.


Use Chrome as Your JavaScript IDE

Earlier this week I attended FOWD, a fantastic conference for web designers and developers in the heart of London.  One of the highlights of the trip was the JavaScript Web Warrior workshop with Addy Osmani. He mentioned  that using Chrome Experiments you could edit your JavaScript right there in Chrome, without needing to bother with any other editors. Here’s how to enable that feature:

  • Download Chrome Canary. Standard Chrome doesn’t have this feature yet, so it’s time to live on the edge. Of course, Canary can be installed alongside Chrome without any issues, so it’s cool. 
  • From Canary, navigate to chrome://flags and enable the Developer Tool Experiments
    Screen Shot 2013-05-17 at 09.54.43
  • Restart Canary and then navigate to the site, hosted locally, that you want to work with.
  • Open up Chrome Dev Tools, and click on the settings cog. From here, navigate to the Workspace section.
    This is where you can set up the mappings from URL to file system. Screen Shot 2013-05-18 at 09.05.36

Obviously you will need to give Chrome access to your filesystem.


And that’s it – you’re good to go.

In the following video, Addy gives a run down on how to use this workspaces feature:

Shipping Greatness: Book Review

Something every developer and team aspires to is shipping great software. But as we all know, it doesn’t always work out that way. So what can we learn from Chris Vander Mey’s Shipping Greatness ? 

First, let’s take a look at the authors credentials; Chris has worked as a product manager at Google and an engineering manager at Amazon; two companies who have a pretty good track record when it comes to delivering products. So, I guess he has learned a thing or two.

The book is split into two parts. The first focusses on the step by step shipping process that the author has seen used in Google and Amazon.  This starts with defining your misson, puts a spotlight on creating a great user experience and deals with the testing and measurement of your delivery.

The second part of the book looks at the best practices and techniques that you should use as someone trying to orchestrate a great delivery.  Skills that you will read about in this section include how to build a team that is up to the task, and how to be a great communicator and decision maker.

While the book will appeal to anyone who wants to build great, meaningful software products, it is probably managers and technical leads that will get the most out of Shipping Greatness. 

There’s a really nice “10 Principles of Shipping” list at the back of the book, which any leader should keep in mind – maybe put a printout up on the team whiteboard. These principles include tips such as  “start with the user and work outward” or “you’ll never do the whole job, so first od that which only you can do”.  As well as showing the way to deliver greatness, this book could help improve how you lead your team.

Running Lean: Book Review

If you want to execute lean practices at your startup, then Running Lean   by Ash Maurya should be top of your reading list.  Highly regarded by reviewers across the board, the book claims to help you to Iterate from Plan A to a Plan That Works. So how does it do that?

The book is broken into four distinct parts. First, you are introduced to a roadmap of how to apply the process, which is made up of three meta-principles: document your plan A, identify the riskiest parts of your plan, and then, systematically test your plan.  For software developers familiar with agile processes, this may sound familiar. But don’t let that stop you from learning how to apply these principles.

I claim to understand lean/agile and any other buzzword that claims to get the right product out quickly. But understanding and execution are two entirely different things. Ash does a fantastic job of explaining the intricacies of each of these steps. Even the documenting of your plan A gives some great tips on working out what your business model should be, what to prioritise and how to track progress.

The part that gets most focus in the book is the testing of your plan, where you need to go through the steps of understanding the problem, defining the solution and validating the solution.

As a software developer, this book made me realise the value in a defined iterative process. As someone who’d like to create my own company, this book provides a useful handbook for the early days of a startup.

Gradle Effective Implementation Guide: Book Review

Until recently, Ant has been my build system of choice: functional, proven and, it just works. So, I was intrigued to see what Gradle could provide instead. So when Hubert Klein Ikkink , one of DZone’s leading MVBs on Groovy, gave me the chance to review his Gradle Effective Implementation Guide , I could hardly refuse.

The book begins with a really good introduction into what Gradle actually is. Useful for Gradle newbies like me, but most people can probably afford to skip it.  The book then goes through the main things you’ll want to do in your Gradle build scripts; using tasks and dealing with files and directories; before showing how easy it is to use Gradle for your Java projects. Later on the book illustrates how you can use the Scala or Groovy plugins to build projects for those languages, and how to build multiple projects that are dependent on each other.

I found the chapter on writing custom tasks and plugins to be particularly useful. Most importantly, the author explains how you can write tests for your custom plugins to ensure they work as expected. As you’d expect, Gradle has good IDE and continuous integration support, all of which is explained in the last chapters.

The book will probably appeal more to people who are new to Gradle. I found the explanations to be be really detailed and useful. Whether I’ll use Gradle for my next project, I’m not sure – but it certainly is tempting

Project Nashorn: JavaScript’s Second Chance on the JVM

Throughout 2012, JavaScript seems to be solving problems across the industry, causing some justifiable hype across a number of libraries and frameworks.  Oracle’s Project Nashorn  was recently announced, due for release with Java 8 in late 2013, which will allow JavaScript to be embedded in Java applications and to develop standalone JavaScript applications.

It makes sense that the JVM maintains it’s relevance by providing an improved JavaScript engine: there have been indications that performance is up to five times faster than the current Rhino implementation and the engine footprint is five times smaller.

We spoke to Henrik Stahl, senior director of Java product management at Oracle to find out more.

DZone: Where did the motivation for Nashorn come from?  

Henrik Stahl: Oracle recognizes that multi-language support is important to Java


  • The Rhino engine currently used is dated and not architected together with the JVM
  • Writing a new engine allows us to validate the Invokedynamic (JSR-292) feature in JDK 7, leverage all new language and JVM features in JDK 8, as well as provide a seamless way of using Javascript and Java code in the same program.

DZone: How long have Oracle been working on it internally?

Henrik: We have been working on Nashorn for the past year and a half.

DZone: Was it originally for any other purpose or products? 

No. The goals have remained the same since the project’s inception, although we have found ways to use it that we hadn’t originally anticipated; such as using it as a backend for the Javascript development and debugging features in Netbeans.

DZone: How much of Nashorn is already complete?

Henrik: The Nashorn engine is passing all ECMAScript 5.1 compliance tests.  Early access users have been able to switch their application from Rhino to Nashorn without major issues.

 DZone: And what still needs to be added?

Henrik: The team is currently focused on robustness and performance as well continuing to evaluate potential JVM optimizations.  The team is also starting to explore support for upcoming ECMAScript 6.0 features.

DZone: Why do you think that Nashorn will be more successful than Rhino, the previous JS implementation on the JVM?  


  • Nashorn significantly outperforms Rhino, and the gap will increase even more as we now move focus from spec compliance and stability to performance
  • Nashorn implements a new meta-object protocol that simplifies calling Java APIs from JavaScript, and enables seamless interactions between JavaScript and Java.
  • Nashorn enables infrastructure providers to consolidate their JavaScript and Java workloads on single virtual machine technology, and leverage the JVM management, debugging and profiling capabilities.