Once upon a time, that famous Bret Victor talk hit the twitter and everyone went crazy about the idea for a week. Then everyone moved on, except few people around the world who set to create tools like that for web developers. Over the time, quite a few livecoding tools popped up, from LiveReload to recently Loom engine, but none for ActionScript. If you’re ActionScript developer, you should see why this kind of technology could not be developed overnight. AS3 VM is not really livecoding friendly, already loaded classes have priority over new stuff you load in. But, with enough efforts nothing is impossible, and last year Eugene Potapenko demonstrated it on ITSea event. This is an old story, however, so why this post? Well, because we have some news for you.
Even though Adobe doesn’t think it’s important, there is increasing shift among AS3 developers to mobile, and Adobe’s AIR provides easiest way to do so. For months we were struggling to provide livecoding for iOS AIR apps, but there was always something in the way. This week, with great help of Nimisha Shukla, we’ve finally got it working there for the first time. Just check it out:
What I have here is simple painting app running on iPad with iOS v6. On the right, I edit its code in our CodeOrchestra IDE, and my changes get loaded into running app on the fly. Even better, my app does not get reloaded at all, and maintains its state! This is unlike anything you guys have experienced so far :)
“I’m sold, where’s the download link ?”
Well, it goes like this: CodeOrchestra IDE is not only about livecoding. It is big monster with a lot of tools, like AS3 to JS convertor for web and recently Node.JS, or domain specific language support allowing you to extend AS3 language itself. As such, there is a lot of stuff to test and a lot of bugs to fix, before it ships. So, to share this AS3 livecoding technology with you as soon as possible, it will be released in about a month as a separate product, that will work with whatever IDE you’re using right now. Please sit tight, we’re about to change the way you code forever :)
Once you know how does the magic work, it is no longer magical. What happens here is every time you write new code, it gets compiled to small SWF file that then is loaded into main app’s ApplicationDomain. You can interact with new code naturally using your app logic, or you can subscribe to live updates event and do something special. There is no problem with this on the desktop, but iOS was the pain you know where. Because Apple is so paranoid about loading external code, Adobe had to simply turn this feature off in AIR, and there was nothing we could do about it, until AIR 3.5 beta came out with their “multiple SWFs” feature – suddenly it was possible to load SWFs on iOS. We were very excited about that, and were just about to release iOS livecoding demo, when Apple shot us down with their iOS v6 release, which made it impossible for us to drop new SWF files into running app folder. Since then we were contacting various people at Adobe and begging for workaround, but it was Nimisha who listened to us and, in the end, helped us to solve the issue. Were we more lucky, you’d see this post half of year ago. Any way, I’m happy we’re past this, finally.