Could AppleScript be the next scripting language of the web?

I’d never thought about it, but man!, wouldn’t it be amazing if you could use all the Mac developer gooodies to develop any website? XCode for web apps? AppleScript instead of JavaScript? WebKit on Rails?

I mean, by all accounts, AppleScript is much more readable and human friendly than JavaScript… I wonder if it would it be possible to abstract JavaScript to a point where I could write something as simple as this (which is AppleScript syntax)?


tell application "MarsEdit"
	activate
	make new post window
	tell post window 1
		set title to "[[pageTitle]]"
		set link to "[[pageURL]]"
		set body to "[[bodyText]]"
	end tell
end tell

Imagine this, just for example, running in any webapp:


tell webapp "30boxes"
	activate
	make new vcalendar event
	tell post vcalendar event 1
		set title to "[[eventTitle]]"
		set link to "[[eventURL]]"
		set body to "[[bodyText]]"
	end tell
end tell

Ok, so again, I’m not much of a codesmith, but that seems pretty simple, even for me.

A combined view of the world

NetNewsWire + Shiira Tabs

In a post titled “The new Combined View and hybrid web/desktop apps“, Brent Simmons reveals that’s he’s starting to see the power of AJAX-powered interfaces in Mac apps, namely NetNewsWire (beta 3.0b7 now available).

Going one step further, he makes a very important observation:

The key to the whole thing is JavaScript. When something happens in the page—you click on a news item, for instance—the page calls back into the app, and the app tells the page how to update.

It’s kind of like Ajax in that way, except that the communication channel is not http and it’s synchronous (which it can be, since it’s right there on your machine).

And in that, he’s beginning to pull away at what very likely will become the next generation platform of the next revolution in web development.

For some time, people have gone on and on about the LAMP stack — made up of Linux, Apache, MySQL and PHP. It’s certainly a veritable and productive bundle of technology — if you’re always online. The truth of the matter, however, is that our local content stores don’t sync well with the remote stores… that my local LAMP don’t talk much with remote LAMPs. And in terms of offline productivity, that makes for huge dilemmas.

I’m seeing a third generation stack emerging that holds a great deal of promise for sewing up the future of offline-sync-online experiences.

That stack looks a bit more like Rails, SQL Lite (which the next rev of the Firefox bookmarks will be based on), Microformats, some blend of JSON/AMASS/jQuery/behaviour.js/scriptaculous/prototype and, yes, WebKit. What do they have in common? Well, enough inter-woven stickiness to make the heart of a true web geek start to murmur.

The missing link? The client and server OS component to tie them all together. Now, I’d love to see hAtom used as the data transport and storage mechanism in the OS. It would simply so much… but alas, it looks like RSS is the chosen son in the near term.

Why do I say that I wish hAtom were used for this purpose? Well, consider this. The language of the web is, for whatever you make it, HTML (and lately XHTML). This means that any webpage you visit, and indeed, any feed that you suck up, probably has some of this markup in it. In fact, rendering engines are getting better at both supporting web standards and as well as enabling some crazy cool things that you might not have thought possible before. All the while, XHTML is becoming the modern day ZIP format, able to store rich media as well as metadata about that data in microformats.

The browser is also constantly caching this data for you, in order to load sites faster and faster.

Now think about that: where are you doing most of your work in any given web app? Not surprisingly — in the browser! So you’ve got this cached version sitting on your harddrive with all the JavaScript, all the XHTML source, all the graphics and all the CSS, but nowhere to stick the data should you re-instantiate or open that page from the cache. Which is kind of ironic, since AJAX is all about asynchronous messaging… that is, sending messages non-immediately.

So, the thinking here is… if we’ve got this new “stack” at our disposal, it’s only a matter of time before we rewire our web apps to learn to write to a local SQL Lite store, using Rails as the delivery system, meanwhile storing the views and interactivity later, like Brent has done, in XHTML, CSS and JavaScript. In fact, most of the entire stack will end up as strictly JavaScript and XHTML storage unites once we see some diversification in microformat schemas. There’s no reason why you couldn’t save your bookmarks, your emails, your blog posts, your IM conversations, your documents, your financial records and the whole lots of content that means something to you in simple, basic, readable-everywhere, XHTML.

And so I appreciate, very much, that Brent is starting to see this — and the power that might be found therein — not just for him or for his app, but for anyone for whom the web and its online-offline machinations has caused great consternation. An XHTML-driven world, though potentially messy at first, offers a great deal of flexibility, of efficiency and of reuse and cross-polination.

If only I could get Brent to use hAtom… and if only I could get Microsoft and Apple to support hAtom in the OS like they all do for RSS… We’d begin to bear witness to the promise of this so-called “semantic web”.

A change in feeding habits

In case you consume my feed rather than simply visit my blog daily (there’s apparently around 1,000 of you, give or take, according to FeedBurner), I’ve added a once-a-day summary of my Ma.gnolia links as well as photos from my Flickr account tagged “screenshot” since I think they’re usually fairly interesting and they get no love since I’m NIPSA’d.

Let me know what you think about these change — good, bad or indifferent!

Calling FUD on Godin

The media we use to represent ourselves has a tendency to consume us.

Or so it would, should we allow it.

Seth Godin says that The prevalance of online video, constant skype connections and the multiple threads of data we get online, combined with the enormous overhead that flying now brings might just change the [value of showing up, of being there in person, of establishing a face to face relationship with the person on the other side] for a long time to come.

Just because we’ve got all these wires and nodes and cables to keep us remotely connected offering up pixelated approximations of the real thing doesn’t mean that that basic desire to meet and to be seen and congregate shall whither. Or that the impossibility of airtravel will keep us from seeing one another in the flesh as often as we like.

Fuck that. Leila‘s right: the time has come to tap innovations, creativity and apply these to air travel and security.

…Even if that means avoiding commercial air travel altogether.

Indeed, the pilgrimages we make in the future may be fewer and further between, but that will be because we’ve built up the local ties and connections to feed our desire to connect to other — with our BarCamps, our Coworking spaces, our Citizen Spaces, across our self-run Munified networks… we will build the alternative infrastructure to support the kind of old fashioned social networking and serendipitous person-to-person reality that we’ve always craved.

The airline industry is one of the last vestiges or a foregone error that’s fought innovation at every turn to its folly. The worse it becomes for passengers, the more it exacerbates the need for something better, something more communal, something more open and distributed. Ironically, it’s easy for me to say on a blog, but I don’t think that the answer is bowing down to the threat of terror — which continually proves itself too slippery to contain… instead we need to reduce the threat and reinvest in our roots and in where we are. BarCampEarth is a celebration of our global community — proudly proving that these loosely-connected tightly-woven local communities represent more than the sum of their parts… and that our ultimate strength is found in the connections we share, no matter whoever, whenever, or wherever we are.

Fight Terrorism — Drive an Electric Avrocar

Fight Terrorism -- Drive an Avrocar

Given the terror thing on a plane over in the UK and the banning of computer and liquid carry-ons, it’s clear that the next step is flying nekkid, as Greg “Fotonotes” Elin has said.

Seems to me when you have a system like this w/ many points of big possible failure instead of one, you gotta make those points smaller and less impactful. Like individuals driving cars and/or crashing them.

Time for personal electric flying machines if you ask me (since the whole car-thing didn’t work out so well).

The mother of all mashups

Civ IV powered by Google

Yeah, the fate of all good technology is either to turn into a dating site or a videogame (sometimes both) and it’s only a matter of time before people start using Google Earth and Google Maps as the backdrop for videogames. It’s only logical, given the plight of sim games like .

But can you imagine — what if were powered by Google Earth? And in real time, the things going on in the world affected your gameplay. I mean, wow.

Surely it’s only a matter of time before such games are ported from military simulations into real games.

. . .

In other news, incoming flights are on red alert and, oh yeah, the Army has a blog. A real gem:

I love science fiction and when science actually catches up to fiction, I’m always excited about it. This could be a great defensive weapon and, of course, offensive. Could you imagine if this [system to use mirrors to shoot laser beams] was working at the start of the Iraq war? We could have sat back a little, let Osama or one of the other most wanted poke their head out and then hit them with a laser and very likely have no collateral damage. Of course the most exciting use is to knock down incoming missiles.

Of course. But the thought that we could be fighting Bin Laden and co. like it were a game of “bop the terrorist” sure is funny! LOL.

(smacks head)

Safari on Windows

Safari on WIndows

With nary a peep from the XUL Runner folks on the recent proliferation of WebKit apps, I was going to say, “Man, Firefox is so effed” but I shouldn’t say that without backing it up. And being more specific and saying “Man, Gecko is so effed” isn’t all that helpful either. And anyway, I wouldn’t be entirely correct, since really what I mean is that “the collective Gecko and Firefox community seems to be taking a long time shipping a widgetizeable and stand-alone platform for running web applications as desktop applications compared with the WebKit community”.

But anyway, in the meantime, WebKit (whose party I attended last night) is steaming right along. Especially now that you can run Safari on the PC things are going to get very interesting in the rendering engine space very quickly.

Can we get a Linux port already?

Apple’s Research & Rip-off department

Peter and Apple's Copymachine

This whole thing is pretty interesting, especially when you’re as big as Apple and you have as dedicated a following as it does. And when your caché is innovation and constant coolification, you’ve always gotta deliver something wicked to knock ’em dead.

But, one supposes, those ideas need not come from within, and, when you’re Apple (or Google or whomever), looking to your community for ideas is probably as sure a bet as any for coming up with something you’d not thunk up (or at least not yet ripped off).

And so while Jobs gave his keynote at WWDC yesterday pointing out Redmond’s failure to deliver on Vista while OSX continues to steam ahead, I found it interesting that many of the features that they’re selling this upgrade with can already be found in the Mac developer community.

Take for example:

Now, don’t get me wrong. Building these features into the OS means that lots more people will get the benefit of these tools that many of us early adopters have already discovered. And, given Apple’s engineering and design pedigree, oftentimes that means that the Apple versions will be more stable, in some cases more useful and almost certainly more pretty (though not always).

But, it also means that a bunch of independent software developers who rely on selling these small but potent tools that Apple has now co-opted will lose business, not to mention get no return on the hard work, money and time spent building these tools. All Apple has to do is summarily drop a few of these features into a major dot-release, crank up the hype machine, and poof, more developers out of work. As Marc put it, what kind of ecosystem is that?

Unlike the open source community, where developer’s names are attached to the patches and contributions that they make to a project, Apple offers no such credit, and, in turn, takes all the glory.

And, if you read me much, you know that I’m a big proponent of open source, of open standards, and open formats; I also tend to see patents and trademarks as belonging to the litigious and anti-cooperative capitalist elite who can afford such protections, forcing the small business innovator to choose between either doing what she loves or taking the steps to protect it — as the cost, time and passion pursuing either makes both rather mutually exclusive.

And so it is yet another manifestation of the digital divide — of those who have the money and the legal departments to protect their innovations — or sue or pay off those who innovate for them — against those who live from registration to registration, making an independent and meaningful, yet staccatic economic, existence.

Update:Menuet developer Phill Ryu comes to pretty much the same conclusion, but with a few different examples.