OSCON ActionStep - an OSS Component Framework for Flash

Richard Kilmer (from InfoEther, right in my backyard!) gave an amazing presentation/demo on ActionStep. He even took the time late last night/ealry this morning to build a demo with a Ruby on Rails back-end. Here are my notes from the session:

ActionStep: OSS Component for Flash

Motivations:

  • cross-platform user-experience
  • full widget model
  • small core, plugin arch
  • themable at runtime
  • open source (like)
  • driven remotely by ruby

Why Flash?

  • proprietary but
  • published spec
  • pervasive runtime
  • good technology
    • stack based
    • ActionScript programmability
    • Networking
    • Animation Engine
    • MTASC (open source ActionScript compiler)

State of Flash

  • Flash 7 (8 on 8/8/05)
  • ActionScript 2.0: ECMAScript (packages, classes, interfaces)
  • Components 2.0: AS 2.0 based, source w/IDE, remoting, themable
  • Flex (declarative, server oriented tech)

What’s in a swf?

  • Library (movies, bitmaps, fonts, sounds, vector graphics). Flash IDE/swfmill can be used to build this.
  • Frames/Timeline
  • ActionScript bytecode. Use MTASC to compile it.
  • Components are hybrid — use both vector graphics and ActionScript

Houston, we have a problem …

  • In flash everything is a movie clip
  • sub-clips have access to the root’s library, but other movie clips with their own libraries override the parent library!
  • the ActionScript bytecode is always shared across clips
  • if a plugin contains assets (library) it would override the root library (which was planned to contain the theme for the app), so the plugins would have to carry along their own copy of the theme.

Build a UI toolkit?

  • many existing examples are out there (MFC, Swing, SWT, WxWigets, etc)
  • chose NextStep > OpenStep > Cocoa
    • Why? Because it is a published API (GNUStep open source impl available)
    • Well thought through widget model: Views & Cells, Targets & Actions, Responder chain
    • Multiple impls (Cocoa, GNUStep, etc)
    • Inheritance has good delegation model
    • Utilizes dynamic runtime features

Introducing ActionStep

  • ActionScript 2.0 implementation for writing RIA
  • Foundation and AppKit
  • Open Source (BSD license)
  • Direct port of OpenStep AppKit (NS* classes)
  • Pure ActionScript 2.0 (MTASC compiled)
  • All components are drawn (isolated in theme)
  • Match method naming

ActionStep Status

  • pretty substantial API

Demo

  • many different types of components available (sliders, windows, buttons, calendar, textfields, split views, etc).
  • very easy to skin components
  • no bitmaps, everything is vector graphics in demo

Roadmap:

  • 1.0 by end of year

    • End of August for first alpha
    • End of Oct for beta
  • Web stack integration

    • Open source Flash-remoting + Ruby on Rails
    • Dynamic serialized UI descriptors
    • Target / Action, Delegates –> controllers

Rails Integration with ActionStep example

  • views build up components
  • button clicks call methods back on controllers with params
  • controller sends data to the ActionStep view to render the data

Demo #2

  • ActionStep with a Rails back-end (last minute demo hacked up late last night/early this morning! No previous experience with Rails, amazing)
  • Launches against webrick and a flash window appears with a listbox and button.
  • Button click calls back on Rails and prints results to console (not back to ActionStep just yet).
  • RIA bound to Rails. Working on bi-directional events

ActionStep website. Slides will be posted soon.

OSCON Thursday Keynotes

image Constraints are LiberatingOriginally uploaded by Sean Mountcastle.

The OSCON Thursday Keynotes had the following speakers:

  • Conference Announcements – Nat Torkington, Conference Chair, O’Reilly Media, Inc.
  • TCP/IP and Shipping Containers – Nick Gall, MetaGroup
  • High Order Bit: Secrets Behind Ruby on Rails – David Heinemeier Hansson, 37Signals
  • Enterprise IT: Open Source Powerhouse – Kartik Subbarao, HP
  • Computational Origami: From Flapping Birds to Space Telescopes – Robert Lang
  • Interview: Mitchell Baker – Mitchell Baker, Mozilla Foundation
  • Identity 2.0 – Dick Hardt, Sxip Identity

Below are my notes from the keynotes (notes from keynotes? sounds redundant) Nick Gall was up first with a short 15 minute presentation comparing TCP/IP packets to 20 ton shipping containers. His argument was that the invention of the shipping container in 1956 (I think) spurred the global economy (and globalization) because it was flexible (you didn’t have to open the container except at origination and destination and various vehicles could handle the containers over sea and land). The standards/protocols that we use in the internet enable new uses not thought of when originally developed. After that DHH was up with a quick talk about the Secrets Behind Ruby on Rails. No real secrets here, first he explained that RoR is an integrated stack of web-app frameworks written in Ruby. Accordingly, RoR is interesting because it follows convention over configuration (works for most people, most of the time), changes are instant (no XML situps, no recompiling, relaunching — just a simple refresh of the browser), finally RoR ships as a complete, integrated and familiar stack using a single language (Ruby). Some choice quotes: “Use it, break it, fix it, trash it, change it”, “Flexibility is overrated” and “Constraints are Liberating”. Following DHH came Kartik from HP — I originally thought this was going to be yet another marketing keynote, but thankfully it wasn’t too bad. He compared open source to the ocean (water) with its ability to flow into the cracks (helping enterprises glue together their important IT infrastructure). He compared the closed source world to a desert (earth) in need of water. He then compared those who take OSS but don’t give back to a swamp (when all the water comes in and none leaves that’s what you get), finally he said the perfect compromise is Venice, Italy a city built upon the earth but surrounded (and throught, due to canals) by water. Kartik was certainly enthusiastic, but I was glad he only had 15 minutes. Robert Lang was next — he didn’t seem to fit from the conference notes, so I was curious why he was invited to speak. But I was pleasantly surprised. His talk was about the art of origami (paper folding, without cutting it) and how it has evolved and within the last 20 years or so has really exploded due to the use of computers to mathematically model the paper folding, allowing some never-before Origami tricks (like making insects or fish with 400+ scales). He also mentioned that NASA used these techniques for folding up a lens so it would fit on the space shuttle. You should really check out his work, it is amazing. The penultimate keynote was simply an interview of Mitchell Baker from the Mozilla Foundation by Nat. I’m sorry, but I was totally uninterested so you’ll have to look elsewhere for the details of that interview. Finally, Dick Hardt from Sxip (pronounced skip) gave a talk on Identity 2.0 — I had thought this was going to be another marketing attempt for his company, but even though it did push his company and take some digs at the competition, his presentation style was amazing and engaging — when it was done, I wanted to watch it again. It was rapid fire a few words or picture(s) per slide running through slides amazingly quickly (about one per second, though he paused at times). Unfortunately, it doesn’t look like Sxip has a Ruby library yet for their Identity 2.0 SDK (actually, I couldn’t find it on their redesigned site — last time I went there I found a PHP version). Finally, PG put up his talk from Tuesday night on his website: http://www.paulgraham.com/opensource.html And, is anyone else, who’s a first time OSCON attendee (and travelling to Oregon for the first time) wondering what Tillamook and Multnomah are? I finally looked them up in the wikipedia: Evidently Tillamook is a county in Oregon named after the Native American Tillamook tribe. Multnomah is also a county in Oregon named after the Native American tribe of Chinookan people.

OSCON Extracting Rails From Basecamp

Since I took quite a bit of notes at DHH’s Extracting Rails from Basecamp session, I thought I’d include them below. Note that these are just my raw notes, primarily for those who were unable to attend (and aren’t in Portland, as apparently David is doing the talk again at “FOSCON” (free-OSCON) for those who couldn’t afford to attend). Update Aug 4, 2005: I was misinformed about FOSCON, evidently David gave the Rails keynote which he is going to do this morning (I’ll have a separate post on this later). Basecamp project management tool existed first. Embraced constraints: – less people, more power – less money, more value (funded via consulting) – less resources, better use – less time, better time Start small and grow only as needed (frugality) Basecamp was 2.5 man/months, 4k lines of code, 2/3 designers, ¼ programmer (10 hr/week) Built half a product instead of a half-ass product They had to develop less software due to these constraints. But, why yet another framework? Because the options were not appealing. Worked in PHP for 5 years. Had to step outside the sweet spot. Felt like he was cutting against the grain. Built almost half of Rails in PHP, but the language was pushing back — struggle all the time. Looked for inspiration. In the enterprise world, there was too much enterprise. Too much focus on 99.999’s, not enough on the 98% — get something out there early and only once you have the users invest the time in scalability and reliability. Too much focus on 100 man shops, not enough on the ¼ man shops. Platform works against you when you’re not creating massive applications with massive teams. Liberate the good ideas. Great ideas are not tied to language/platform. – Change the language – Change the context – Retain the core insights of patterns/practices Call me shallow: – Aesthetics – want the code to be beautiful and easy to read/understand – Joy – happiness, motivation, joy of work – Less – less code, favorite part of programming is removing lines of code Laying out the framework up front doesn’t work, you must extract it from a working application. There’s no other way. I’ll know it when I see it. You have to feel an API to make it fit. Pleasing to work with API cannot be designed up front. Design matters more than test in TDD. Guessing the future is for fortune tellers. Why open source? For entirely selfish reasons: – Make others do the work – Bask in the glow of being a giver – What’s there to loose? It works! 1,000 patches in 9 months! Extract, pass, reap, rinse, repeat Getting traction for your open source project — if no one’s looking it doesn’t matter if it’s open source or not. Many abandoned projects because they got no visibility/involvement. Fear obscurity. You need a network to reap the effects. Get rid of humbleness, take on a normal appreciation of the value you bring to the table. Passion is infectious The baseline of excitement needs to be set by you — you need to be the most excited person about your project. Self delusions work! A conversation of success, build on the positive emotion of others. Go looking for trouble Tout advantages over the known, say that the biggest thing out there “sucks” “If it bleeds, it leads”, everybody loves a good fight Point at someone else and say, ‘you’re stupid’ trouble is easy to find and easy to start — you created this because you were not happy with the status quo. Prison newbie mentality — attack the biggest looking opponent immediately to gain some respect. Dealing with traction Scaling a culture Early influx can bend you out of shape Release not so early, then often — releasing too early can cause an influx which will overtake your culture. Set a viral example of kindness — what you do as project lead influences others. (watch out for the looking for trouble part as your new members will do the same). Signal that there is already a course and new members need to be willing to go in that direction. Don’t ever say RTFM! Overcome the sucky feeling of being a newbie. You need to care from the earliest stages of the project. In a response to the question, Why Ruby? Why not Python? David responded that ruby makes it easy to create domain specific languages. Notion of blocks is also important.

OSCON Wednesday Sessions

Here are my notes for the OSCON sessions I attended on Wednesday, except for “Extracting Rails from Basecamp” where I essentially blogged it while I was in the room. To save folks the trouble of clicking on the “more” link if they’re not interested, here is the list of talks I attended (notes below):

The Google Open Source Update

Chris DiBona from Google (obviously) gave an interesting an amusing talk on the use of open source software at Google. They used to use Redhat Linux, now it’s their own Frankenstein Linux creation. He talked mostly about the Summer of Code program and how it’s bring college students into the Open Source community — over 400 students were approved (419, I think) and each one will get $4,500 ($500 up front, $4k at the end) if they complete the project successfully (according to their project mentor). I think this is a great program and Google should definitely keep it up (they plan to). Chris believed that at least half of the students will successfully complete their projects (some are already ahead/done while others are behind).

Yahoo! Web Services and Yahoo! Widgets (aka Konfabulator)

Jeffrey McManus from Yahoo (I think it was him, I arrived a couple of minutes late) gave a great talk about Yahoo!’s web services and the new Yahoo! widgets. Some of the web services available now are for Yahoo! Maps, Yahoo! Shopping, Yahoo! Search/RSS, Yahoo! Music, Flickr (of course) and Yahoo! Widgets (formerly Konfabulator). Some very cool demos — it looks like they really require the bare minimum from you to get you up and running with their web services. See Yahoo! Developer for more info.

Switching from CVS to Subversion: Case Studies in Migrating Your Team

to a New Tool

Brian W. Fitzpatrick from CollabNet gave a talk on migrating from CVS (and VSS) to SVN. This was not a technical discussion about SVN, just some tips/tricks on how to plan the migration and how to be honest with your users. The first half of the session was tips on how to do the migration (again not technical, more of “Don’t lie to you team and don’t make any lies of omission — let them know of any features they’ll be losing”, etc) while the second half of the session was devoted to case studies like the Mono project, KDE, Apache, GCC and two secret commercial companies.

How to Serve a Billion Requests a Day with Perl

Kevin Scaldeferri from Yahoo Search Marketing gave an interesting session on writing scalable web apps which can handle 1B requests/day. I need to copy over the notes from my notebook, so I’ll update this post a bit later (sorry!).

Scalable Computing with MapReduce

Unfortunately, I had misread this session description and thought that someone from Google was presenting on their Map/Reduce code. But Doug Cutting of Nutch did a good job of explaining the problems of searching/indexing 1B pages and how he rewrote Nutch to overcome the 100M page limit he ran into. Unfortunately, Doug’s been having some networking issues with the machines loaned to him by the Internet Archive so he hasn’t yet shown that the rewritten version of Nutch using Map/Reduce does in fact index 1B pages.