News for March 2005

Laszlo Mail

Last week Laszlo announced its web mail application. Later this year Earthlink will deploy a branded version of this application.

*Update: Laszlo Systems is hosting open registration for Laszlo Mail here.*

Laszlo Mail is being built on top of Release 3.0 of the OpenLaszlo platform.

Congratulations to everyone involved in writing this application, and to the people who have been worked on the platform extensions that make it possible to write applications like this in Laszlo. Writing good client applications is hard work.

Here’s where I plan to use the thing:

Right now, when I’m using someone else’s computer (still happens — the beasties don’t fit in my pocket yet), I have a choice between (1) setting up an IMAP client, or (2) using an HTML webmail interface. These days I always opt for the webmail client, and GMail actually makes it bearable.

But…

I use folders to organize my email. I use a variant of GTD, with folders for projects, context-sensitive items (tickles for future dates, agendas for future meetings), reference material, and archives. GMail just doesn’t play well with folders. Sure, I can make folders in GMail, but my GMail folders don’t respect any organization I’ve created in IMAP. And I’m a drag-and-drop guy — it’s just too hard to move messages between folders with GMail, which is why I don’t use it as my main mail client in the first place.

So right now, I’m stuck with a bifurcated mail experience. The desktop clients (Thunderbird on the PC and Linux, Apple Mail on the Mac) have the UI features I need; GMail (and before that SquirrelMail) have the ubiquity.

That’s what I’m looking to Laszlo Mail to fix. I want to be able to walk up to any computer in the world, catch up on my mail, easily move it to the right folders, and go back to my desktop machine and see messages where I put them.

Some of you do everything on your Blackberry or iPaq. You don’t need the thing. Some of you keep everything in one big Inbox. You can probably get by with GMail. For me, I’m just counting the days…

Posted: March 8th, 2005
Categories: OpenLaszlo
Tags:
Comments: 4 Comments.

Ruby and Laszlo

I first heard of Ruby at the second Lightweight Languages Workshop 2, where Matz and I were both speakers. This was first public disclosure of the then-proprietary Laszlo platform language. I’m afraid I was more worried about preparing my talk then listening to Matz at the time!

Since then, a number of different people have expressed interest in both Laszlo and Ruby. I figured I had finally better take a look at it.

I understand what the fuss is about. Ruby is one of the rare languages with a readable embedded syntax for metaprogramming, it’s well designed, and it has a mature library for web programming. What this translates to in practice is that you can program in a language with “keywords” (really just functions) suitable to the task at hand.

Compare the two class definitions below:

class Person < Object
  attr_reader :name
  attr :location
end
class Person < ActiveRecord::Base
  has_one :name
  has_many :address
end

The first definition uses the core language syntax to define a Person class that contains a getter for name, and both getters and setters for location. The second uses Rails to define a Person Active Record that has one name record and many address records. (It uses the Foreign Key and Association Table patterns, respectively.) The cool thing is that attr and has_one look the same to the library user. Ruby allows the library developer to grow a language. This lets the library user write in a concise domain-specific language that embeds Ruby.

What does this mean in practice? During my last vacation it took about five lazy vacation days with Ruby on Rails to implement a fairly sophisticated 40-page web application with five models, two metamodels, CRUD, cookies, image upload, and login. (I’ll write more about the application itself, if I find a few free weekends to harden it for public use.) For comparison, it took me about the same amount of time during my previous vacation to write a much simpler ten-page PHP web application that had only one model. And I already knew a little bit of PHP, whereas I was learning Ruby and Rails from scratch.

Now, what does this have to do with Laszlo? Laszlo certainly doesn’t have any metaprogramming facilities. It has states, constraints, and data binding, which extend the reach of declarative programming beyond static layouts. (Yeah, yeah, I should write about this too; in the meantime there’s docs and examples here and here.) I suspect that some of the people who “get” how to use metaprogramming in Ruby also get how to do declarative programming with the Laszlo features. But I also think a large part of what Laszlo brings to the table is simply that it allows you to use conventional OO techniques in client-side browser programming. For example,

<canvas layout="axis: y">
  <view width="10" height="10" bgcolor="red">
    <view x="1" y="1" width="8" height="8"/>
  </view>
  <view width="20" height="20" bgcolor="red">
    <view x="1" y="1" width="18" height="18"/>
  </view>
  <view width="30" height="30" bgcolor="red">
    <view x="1" y="1" width="28" height="28"/>
  </view>
</canvas>

DRYs out to:

<canvas layout="axis: y">
  <class name="box" width="${this.size}" height="${this.size}" bgcolor="red">
    <attribute name="size" value="10"/>
    <view x="1" y="1" width="${parent.width-2}" height="${parent.height-2}"/>
  </view>
  <box/>
  <box size="20"/>
  <box size="30"/>
</canvas>

This (OOP) is old hat in the server-side world — just like MOP is old hat to Smalltalk and Common Lisp developers — but it’s relatively new in the world of zero-install client-side platforms. So I think the analogy between Ruby on the server, and Laszlo on the (much more resource-constrained) client, is that each of them advances advances the reach of non-academic programming:

Update: Now that I’ve done more Ruby and DHTML programming, I can see that the diagram above gives OpenLaszlo short shrift. Although OpenLaszlo is lower level that Ruby with respect to code generation and a MOP, the use of databinding and constraints makes it higher level in a different set of ways.

Posted: March 8th, 2005
Categories: OpenLaszlo, Programming Languages, Ruby
Tags:
Comments: 3 Comments.

Laszlo’s Boston Office

Laszlo’s main office is in a spiffy office building in San Mateo.

But Boston Product Development (basically, the OpenLaszlo development team) works out of a cafe.

Espresso Royale Cafe

This puts us in good company. (And we get better coffee, too.)

Henry posted some photos he took last week. Here’s one; click on the image for more.

Oliver, Amy, Tucker, and Henry

Posted: March 7th, 2005
Categories: OpenLaszlo
Tags:
Comments: 1 Comment.