weekly wrap 2011-05-29

This week I’ve been doing some fine-tuning work to make it possible for the first picklet, The 3 Baddest Bandits of the Wild, Wild West, to get out the door and find an audience. It’s been a slow, frustrating week of development but rather than not talk about it, here’s a summary of what went down.

Picklet Export

Export script log message

The Photoshop script for handling saving multiple PNG files is called PickletExport.jsx and it is a single big bucket of javascript. I’m not proud of it and yet it serves a purpose. You can download the latest version and have a look if you like.

A picklet is constructed from this set of exported images. Ultimately they are rendered on the iPhone/iPad by the mobile version of the WebKit browser engine. This software won’t display an image if its dimensions exceed 3x1024x1024 pixels. I have added a test in the export script to ensure this limit isn’t exceeded.

The Picklet Builder web application runs on Google’s AppEngine platform and stores each image file as a BlobProperty which has another constraint that the stored file must be under 1000000 Bytes in size. I added a test in the script for this limit.

The export script will no longer save a Photoshop layer to a PNG if the file would be too big for iOS WebKit to display, or too large a to be stored as a BlobProperty on AppEngine.

The picklet author sees feedback about the layers that have not been saved to files and can address any issues straight away.

Picklet Builder

Draft creation email includes status for each url processed

To review a picklet on a device the author creates a picklet ‘draft’. This process involves copying the current picklet structure (a JSON representation of the client-side data model) and caching the current state of the all required image files. The files are copied from the author’s Dropbox/Public folder to BlobProperty fields in a DraftBlob model.

The initial implementation required each image file to be copied for each draft created. In practise the overhead of transferring 50MB of image data for each created draft became a bias against quick iteration of drafts. To improve this I’ve modified the process to store the image file’s modified date, and only copy the file if it has changed since it was last cached.

Additionally I’ve changed the way the image cache function is called so it can happen while the author continues to work in the builder app, or even in case the browser is closed. I’m using the AppEngine Task Queue API with a ‘chained’ task that checks a single image url and caches the file if necessary, based on the file’s ‘modified’ timestamp.

The author now has access to a draft creation task log message, which is emailed to the author when the draft is ready to be reviewed, and includes status information for each image url processed. Currently this process checks that the image is under the 1 MB limit for storage. Missing image files are also indicated in this log message.

Picklet Reader

Next week I hope to be back in XCode land working on the reader app called Picklets. The big thing remaining to implement is the interface to Apple’s iTunes payment validation framework, StoreKit. That’s how we all get paid and make this project into a sustainable publishing platform.

Stay tuned.

This entry was posted in Coding, Picklet Builder, Picklets. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *