21st Century Smalltalk

February 23, 2007

First Flash Animation

Filed under: Adobe — pfisk @ 10:56 pm

lisptest12
Vista Smalltalk Site

This is a screenshot of the first working Flash animation. It consists of a collection of “wheel” objects (similar to the WPF wheel demo) which collide with each other and the edges of the window.

I chose wheels to start with because they are one of the more difficult objects to animate – for one thing it is hard to get realistic looking traction when the wheel rotates against a surface.

The demo can be run in a browser (click here) by choosing “Animation Workspace” from the desktop menu, then click on the window header and use these controls:

  • down arrow adds a new wheel to the canvas
  • left arrow makes the wheels rotate left
  • right arrow makes the wheels rotate right

It still has a few glitches but it mostly works. Coming next are rectangles, triangles and “connectors” to build animated people, cars, animals, and so on. After that, some communications (hopefully P2P) to support Internet games - written in Lisp or Smalltalk, of course.

Why AJAX Is Not the Future

Filed under: General — pfisk @ 3:59 pm

Recently, there have been a number of impressive high-profile applications (Yahoo mail, Google mail, Google maps, etc) that have used AJAX style programming to greatly enhance user experience. And because of this, many people expect that AJAX is the next big wave in application programming. I don’t think so.

Here is a link to an excellent article that covers much of the history and issues concerning AJAX, JavaScript, CSS and Java Applets.

JavaScript has been around since, effectively, the beginning of the Web, but the browser wars made JavaScript inconsistent and thus painful to use. A key part of Ajax is that someone has gone to the trouble of figuring out cross-platform JavaScript issues so you can ignore the often radical inconsistencies between different browsers.

There are two problems with this approach. The first is that JavaScript is limited in what it can do. Although Ajax is an excellent hack that gets the last bit of mileage from JavaScript, it is nonetheless a hack, and the end is in sight. The second problem is that you are relying on Ajax libraries to handle cross-browser issues. If you want to write your own code, you must become an expert on those issues, and at that point much of the leverage of Ajax goes away. Ajax improves the experience a lot, but it has limits and I suspect we’ve already seen most of the tricks that Ajax is going to offer.

My concerns regarding JavaScript can be summarized this way:

  • capabilities – JavaScript does not have all the capabilities needed for the next generation of Rich Internet Applications – not at all surprising, since it was never designed for this purpose
  • consistency – there are many inconsistent versions of JavaScript – any attempt to improve the language capabilities (eg JavaScript 2.0) will compound the inconsistency problem

The most plausible scenario that I can see for the coming years is that next generation applications will be built on either of two platforms: Flash or WPF/e. A side effect of this is likely to be that the underlying OS becomes less important than the runtime or, stated differently, Flash and WPF/e are the new “operating systems” of the 21’st century.

I am trying to built a scripting solution that works (to the extent possible) identically on both.

Q: Will Microsoft come out with a scripting solution in 12-24 months?
A: Yes, almost certainly.

Q: Will Adobe come out with a scripting solution in 12-24 months?
A: Probably, especially if Microsoft does.

Q: Will MS scripting be compatible with Adobe scripting?
A: You’ve got to be kidding!

This is about turf wars much more than technology. Remember that every time you have to convert between “<CR><LF>” and “<LF>”  in text documents and “\” and “/” in directory paths.

Building a consistent and flexible scripting solution isn’t rocket science – the technology (eg Lisp and Smalltalk) has been available for decades. But there has to be the will to use it.

Blog at WordPress.com.