Book Review: Instant KineticJS Starter

April 28th, 2013 by Adrian

KineticJS Starter Book Cover

Instant KineticJS Starter

Create Flash-like mobile supported applications using KineticJS!
by Andrey Kovalenko
49 pages long
Published by Packt Publishing

Contents

  • So, what is KineticJS
  • Installation
  • Quick start – creating your first image editor
    • Organizing your stage, layers, groups, and shapes
    • Adding custom and ready-to-use shapes, images, and text to a layer
    • Dragging-and-dropping items with configurable constraints and bounds
    • Resizing, scaling, and rotating items
    • Cloning and removing items
    • Applying a filter to a selected image
    • Animating selected shapes
    • Cache nodes to improve performance
    • Optimizing for use on mobile devices (iOS, Android)
    • Saving a stage as an image
  • Top features you need to know about
    • Layering support
    • Standard and custom shapes
    • Styling
    • Selector support
    • Event-driven architecture, drag-and-drop
    • Filtering
    • Animation
    • Serialization/deserialization, saving a stage as an image
  • People and places you should get to know

“KineticJS is a JavaScript library that helps us simplify the development of interactive HTML5 applications. In this case interactive applications are different 2D applications such as games, image editors, interactive maps, cartoons, and more. From a technical point of view it is an extension to the HTML5 Canvas 2D context in the form of a JavaScript library.”

First off, this book is intended as a ‘starter’, so don’t expect a weighty tomb that covers everything. If you have a medium level of HTML5 Canvas, CSS and JavaScript knowledge then you shouldn’t have any trouble getting to grips with KineticJS.

The book starts off by explaining how to download and install KineticJS in to an empty HTML page. Then it jumps straight in to creating an image editor! I’m not sure this was the correct approach, but I guess the author was just trying to capture your interest early on (before you lost interest). I personally think it would have been better to build up to creating something like an image editor.

Anyway, the image editor is a reasonable application to use, as it allows the author to introduce various aspects of KineticJS using a real-world example. You can see from the contents list above what is covered in this example. The image editor takes us from page 7 through to page 24.

On page 25 the author goes in to a bit more depth on some of the topics you covered during the image editor build. See the contents list above to see what is covered. This continues through to page 48.

Occasionally the English grammar isn’t as clear to read as it could be, and I spotted a couple of instances where punctuation was missing, suggesting another round of proof-reading wouldn’t have gone a miss.

On the whole though it is a useful primer to anyone looking at using KineticJS for the first time, but a lot of the content is available for free from html5canvastutorials.com

Buy the book from Amazon.co.uk here.

Posted in Books, Canvas | No Comments »

10 Print Chr (205.5+Rnd(1)); : Goto 10

January 16th, 2013 by Adrian

10 PRINT

A couple of months ago The MIT Press released 10 PRINT CHR$(205.5+RND(1)); : GOTO 10, written by Casey Reas and friends.

Here is a brief overview taken from the MIT Press website …

This book takes a single line of code–the extremely concise BASIC program for the Commodore 64 inscribed in the title–and uses it as a lens through which to consider the phenomenon of creative computing and the way computer programs exist in culture. The authors of this collaboratively written book treat code not as merely functional but as a text–in the case of 10 PRINT, a text that appeared in many different printed sources–that yields a story about its making, its purpose, its assumptions, and more. They consider randomness and regularity in computing and art, the maze in culture, the popular BASIC programming language, and the highly influential Commodore 64 computer.

You can see the result of this one line of code on YouTube here.

Casey Reas discussed it in a bit more detail during his presentation at the Eyeo Festival 2012. Check out the 30 minute mark in this Vimeo recording.

You can buy the book from Amazon.co.uk or download a free PDF version which is released under a Creative Commons licence.

 

Posted in Books, Generative Art | No Comments »

The Nature of Code

December 7th, 2012 by Adrian

The Nature of Code

Daniel Shiffman‘s book ‘The Nature of Code‘ has finally been released. It is available for free online, or you can download an offline copy by donating your chosen amount to the author (and/or the Processing Foundation). The print version of the book is coming soon.

It is well written, very clear to follow, with small bitesize pieces of code that illustrate what is being discussed. This a fantastic resource and we should all be very grateful to Daniel for his generosity to the creative coding community.

You can read the book online here, and download the Processing code examples here.

Follow Daniel on Twitter.

Posted in Books, Processing, Sample Code | No Comments »

Book Review: Flash Development for Android Cookbook

September 22nd, 2011 by Adrian

Flash Development for Android Cookbook front cover

Title: Flash Development for Android Cookbook
Author: Joseph Labrecque
Publisher: Packt Publishing
Released: June 2011
Website link: http://goo.gl/icJsk
Amazon link: http://goo.gl/TGBv5

For any Flash or Flex developer looking to create applications for mobile (in particular Android ones) then this is a great book to have on your desk! Weighing in at 372 pages, there is a lot of content in there just waiting for you to try out and play with.

First things first, this is a Cookbook. It’s not a reference title listing every single API and documenting every single class available. Though to be honest, it seems to cover most of the new AIR for Android features. The idea behind a Cookbook is to provide you with a selection of ‘recipes’ or common tasks, and then explain how to go about solving them in a clear and concise way. This book does this brilliantly. It is the sort of book you can dib into when you have a specific thing to get done in your app and you’re not sure where to start. Having said that, I basically read it from cover to cover, and still found it very informative and enjoyable.

The book is broken up into the following 11 chapters …

  • Chapter 1: Getting Ready to Work with Android: Development Environment and Project Setup (10 recipes)
  • Chapter 2: Interaction Experience: Multitouch, Gestures, and Other Input (13 recipes)
  • Chapter 3: Movement through Space: Accelerometer and Geolocation Sensors (9 recipes)
  • Chapter 4: Visual and Audio Input: Camera and Microphone Access (6 recipes)
  • Chapter 5: Rich Media Presentation: Working with Images, Video, and Audio (7 recipes)
  • Chapter 6: Structural Adaptation: Handling Device Layout and Scaling (12 recipes)
  • Chapter 7: Native Interaction: StageWebView and URI Handlers (10 recipes)
  • Chapter 8: Abundant Access: File System and Local Database (7 recipes)
  • Chapter 9: Manifest Assurance: Security and Android Permissions (6 recipes)
  • Chapter 10: Avoiding Problems: Debugging and Resource Considerations (6 recipes)
  • Chapter 11: Final Considerations: Application Compilation and Distribution (10 recipes)

All these chapter are equally important and cover a wide range of features, but which ones you’ll actually need to use will depend on your project and what you are trying to achieve. Although the title of this book specifies Android, most of the code in this book will work equally well on iOS devices and the BlackBerry PlayBook. That’s the joy of developing using ActionScript and AIR! :-)

I was particularly pleased to see that nearly all the code examples were IDE agnostic and didn’t tie you in to the Flex framework. They concentrated on using pure ActionScript in whatever IDE you feel comfortable working in. In fact, Joseph even went to the trouble of explaining any IDE specific stuff using example in Flash Pro CS5.5, Flash Builder 4.5 and FDT 4.1.

Once you have had a flick through at some of the examples it quickly becomes clear that Adobe have done a really good job at providing a consistent and logical API for achieving all these new mobile specific things. And this book does a great job of demystifying it all.

My one criticism would be that there is quite a lot of repetitive code (about 14 lines) in each example, where Joseph sets up an output textfield (and accompanying textformat) for demonstration purposes. But I guess I noticed it more because I was reading the book straight through (not how it was intended to be read). At least this way, each ‘recipe’ or example is self contained and provides everything you need to get you up and running easily.

I did notice a few errors here and there (code and layout), but nothing too serious that would cause you issues.

I’d thoroughly recommend this title to anyone who is interested in creating mobile apps for either Android, iOS or PlayBook using AIR and ActionScript.

Sample Chaper
Chapter 4 - Visual and Audio Input: Camera and Microphone Access can be downloaded as a free PDF file here.

Related books by other authors and publishers include:

Posted in AIR, Android, Books, Mobile | No Comments »

Win Your Wish List with O’Reilly

January 27th, 2011 by Adrian

O'Reilly Books and Videos

O’Reilly are running a competition to ‘Win Your Wish List‘. Post your list on your blog and be in with a chance of winning the whole lot. You have until Tuesday 22nd February.

Here is my list (in no particular order) …

Fingers crossed!

Posted in Books | No Comments »