programmers quotes

February 27, 2009

Ajax: The State of the Art with Dion and Ben

Filed under: Ajax & XML — raibledesigns @ 4:31 pm

This morning, I added Dion and Ben’s talk titled Ajax: The State of the Art. Below are my notes from the event.

Ajax started out as a bunch of hacks. It showed that we could take our web interfaces and do a lot more with them. A hack isn’t necessarily a bad thing. Often, they turn into something much more elegant over time. The new browsers have many amazing capabilities that we haven’t taken advantage of yet. We’ve seen discussions on Ajax go from how to do XHR to frameworks and how rich and mature they are. Dojo is great for Enterprise Development (packing system, namespaces). jQuery is well-suited for lightweight developers (PHP). Prototype is fantastic for people who do a lot of JavaScript development and take it very seriously.

Today’s Ajax landscape is mature, really rich, and really exciting. Today, Dion and Ben are going to talk about technologies they’re really excited about for the future.

Canvas
The building blocks of the web are text, boxes and images. With canvas, it really makes a lot more things possible. You can do bitmap rendering and image manipulation. They’re showing a slide with Doom and Mario Kart running. Canvas 3D does true 3D rendering. Firefox and Opera have done prototypes of this. Can you do canvas-type things today in a browser? Yes, if you use Flash or Curl. Dion and Ben are excited about canvas over plugins for the following reasons:

  • No start-up delay
  • Available on mobile devices today
  • Rendering fidelity with browser (especially important for typography)
  • No bridges necessary (no marshalling/unmarshalling)
  • Not a plug-in

The <canvas> tag originally came from Apple’s Dashboard. Dashboard’s programming model was in HTML and JavaScript. Dashboard is using WebKit under the covers. Today, canvas support exists in every major browser except for IE. The good news is there are Flash and Silverlight bridges to add support to IE. There’s also an ActiveX component that wraps the Firefox implementation and allows it to run in IE.

SVG
Dion and Ben aren’t that excited about SVG because it’s such a huge spec. We’ve been struggling with the HTML standard for the last 10 years and the thought of another huge spec for the next 10 years isn’t that appealing.

Fast JavaScript
Almost all major browsers have a Fast JavaScript implementation. Chrome has V8, Safari has SquirrelFish Extreme, Firefox has TraceMonkey and Opera has Carakan. This is exciting because of industry trends and how companies are trying to reduce computation cycles in data centers. The more computing that can be put on the client, the better. IE doesn’t have anything, but Dion and Ben believe they are working on something.

Web Workers
Interface latency is awful for applications. Jakob Nielsen once said:

0.1 second is about the limit for having the user feel that the system is reacting instantaneously. 1.0 second is about the limit for the user’s flow of thought to stay uninterrupted, even though the user will notice the delay.

Anything that takes longer than a tenth of a second should be pushed to a background thread. Unfortunately, there are no threads in the web. Maybe we can add threads to JavaScript? Brendan Eich has said that “Threads suck” and there’s very little chance for threads getting into JavaScript. Gears brought Worker Pools and this is going into HTML 5 as Web Workers. You could also use Java applets to do this. With the latest Java Plugin, many of applets’ long-standing issues have been solved.

Desktop Integration
The ability to build desktop apps as web apps is very exciting. There’s a few technologies that demonstrate this: Fluid, Mozilla Prism, Adobe AIR, Appcelerator Titanium and Gears. The Palm Pre demonstrates the logical extension of this. The Palm Pre uses the web stack as its developer SDK. It’s very cool that web developers don’t have to learn anything new to become a Palm developer. Desktop integration is exciting especially if we can access desktop applications like email and address book.

The Ajax frameworks that are out there have done a lot to make web development simpler. However, there’s still a lot of pain with CSS and cross-browser issues. What if you took canvas and combined it with a sophisticated grid-based layout in JavaScript?

There’s a lot of platforms out there: Microsoft Silverlight, Adobe Flash, Apple Cocoa and Sun’s JavaFX. The web often isn’t considered a platform. Dion and Ben believe there should be an Open Web Platform. The problem right now is there is no central location to find out how to get stuff done. You have to search and find resources from many different locations. Mozilla is putting it’s resources into creating an Open Web Platform. This site will consist of 4 different areas:

  • Home
  • Documentation (for different frameworks, browsers, quirks)
  • Dashboard (state of the open web)
  • Roadmap (what’s going on)

This is not just Mozilla, it’s very much a community effort. This is something that Ben and Dion have been working on. But there’s something else they’ve been working on too. They’ve been talking about all these cool things, but what about an interesting application to test all these technologies?

Bespin
As they looked at code editors, most of them provide awful user experiences. Bespin is the Editor of Your Dreams and contains the following features:

  • Accessible from anywhere – any device in any location
  • Simple to use, like Textmate (not heavyweight like Eclipse) – an editor, not an IDE
  • Wicked Fast – performance, performance, performance
  • Rock-solid real-time collaboration, like SubEthaEdit – it just works
  • Integrated command-line, like vi – Fun like Quicksilver, social like Ubiquity
  • “Self-hosted” environment, like Emacs – For extreme extensibility, but with JavaScript!

Dion and Ben are showed a screen shot of Bespin and now they’re doing a demo. The core editor has what you’d expect with syntax highlighting and line numbers. Canvas doesn’t have text-selection by default, so they had to write it from scratch. The command line allows you to get help, run core command and also to subscribe to commands that others write. You can change your keybindings to emacs or vi as well as many other settings. Much of Bespin is event-driven, so you can easily plugin new behavior for different events.

For viewing files, they couldn’t bring themselves to use a tree. Instead, they developed a file-browsing interface that looks very much like Apple’s Finder. Personally, I like Finder, but wish it had Windows Explorer’s path bar that allows you to simply type in the path without mouse clicks. Back to the command line. They’ve done a lot to make things more discoverable so users can easily find the power of the editor.

Bespin could be used to engage developers more with open source projects. Checking out projects, modifying code and creating patches can be a real pain. Bespin could be used to interface with open source projects in the cloud. You could login, modify code and easily patch/build with the click of a button. One other thing they want to do is to have the server do code-analysis as you’re developing.

Is it OK to love a software tool? You must love your software tools. What we do as Software Developers is one of the most difficult jobs on the planet. Programmers, like poets, start with a blank slate and create something from nothing. If you don’t love your tools, you’ll start resenting what you do. If you don’t love your tools, it shows in your work. – Dave Thomas at RubyConf08

Thunderhead
A GUI Toolkit written with canvas and JavaScript. Allows you to do layouts with very little thought. It’s a lab experiment that’s in progress, stay tuned for more information.

All users care about is the user interface. Dion and Ben believe there’s a key to creating compelling user experiences. It all has to do with managing expectations. It’s not that different from how you manage relationships in your life. Expectations for movies and games have changes drastically over the years. What used to be the web (animated gifs and awful web pages) has also changed drastically (video of Apple’s online store). What was cool with MapQuest got changed drastically with Google Maps. What we have today isn’t the end of the game – expectations will continue to change. However, users have different expectations for software.

Alan Cooper has done some interesting work in this area. The software designer needs to focus in on a user’s goals. There are basic things you can apply to all users, for instance “sex sells”. An example of this is Delicious Library. This application allows you to keep track of things in your home such as books, movies, music and games. They made $500K in 3 months and made $54K the first day, with no advertising.

The quality of any software is determined by the interaction. If the interaction isn’t good, it will poison the entire experience. Donald Norman has a good quote: “Attractive things work better”. In society, this is often called “Dress for Success”.

The Open Web is hear to stay because it has:

  • An Easy Programming Model
  • Easy Remoting
  • Extensive Customization Vectors (e.g. GreaseMonkey)
  • Easy Deployment
  • Great Widgets
  • Great Visual Effects
  • Great Mobile Story
  • Desktop Integration
  • State-of-the-Art Plug-ins

Bespin is a tech preview that they hope to release next week. Thunderhead will be released at the same time.

Conclusion
This was a great talk and easily the most inspiring of the conference. Dion and Ben always do a great job and the sexiness of their presentation made it all the more appealing.

My iPhone Review

Filed under: iPhone,Mobile Application Development — Tags: , — raibledesigns @ 4:29 pm

Today I picked up a 16GB iPhone at the Park Meadows Apple Store. As far as I can tell, I got it with a stroke of luck. Last night, I was searching Apple’s “Concierge” application to see which store (there’s 4 in the region now) would look at my Mac Pro (averaging 4 GSOD per day). Most had a 24-hour lead time at the Genius Bar, but Park Meadows had an 8AM available.

This morning, I hauled the box into the mall and doubted the store would be open at such an early hour. Apparently, the store isn’t really “open”, but the Genius Bar is and they have a camp for kids from 8-10. After submitting my machine to the Genius Bar, I asked a guy about iPhones. He said they got a shipment the night before and they had 16GB White iPhones in stock.

LinkedIn has an Employee Discount for AT&T, so I asked the sales guy if I could use that. He said I needed to buy the phone from AT&T if I wanted to use any sort of “business” discount. I called the downtown AT&T store (they angrily told me they were out-of-stock) and walked by the one in Park Meadows Mall (didn’t open until 10). I then rationalized that buying an iPhone from an AT&T store could take weeks. After an hour of contemplating, I decided to go ahead and purchase the white iPhone, even though I wanted black and I wouldn’t get the employee discount. My reasoning:

  • Employee Discount is 8% which amounts to about $8/month. My last T-Mobile bill for my Blackberry Pearl was over $200. Going from $200 to under $100 makes $8 irrelevant.
  • When I bought my Escalade, I liked a black one more. When I bought my last iPod (May), I wanted a white one, but ended up with black (no white in stock). It seems fitting that I’d get a white one when I’d want black. My previous black vs. white purchases haven’t bothered me post-purchase.
  • These things are hard to find – I should just buy the damn thing.

So yes, I thought about the decision way too much, but managed to talk myself into it. It’s a good thing too – they were sold out by the time the store opened at 10. I bought mine at 9:30.

So what do I think of it? I like it, but not for the phone or fanciness of it.

Pros: The main reason I like it is for its iTunes Remote application. With an Airport Express + Bose System at home, I’ve been wanting this for quite some time. I would’ve paid $200 for this alone.

Cons: I love the Pandora app, but was disappointed to find it didn’t work with my car’s iPod connector. I was hoping for Pandora-in-the-car, but no dice. The iPod feature of the iPhone works, but charging via my car’s iPod connector doesn’t. The enabling-of-charging feature may be software related since there’s a “charging won’t work” message that pops up when I plug it in.

So 12 hours after purchasing the device, I’m happy with it, but not thrilled. However, it seems like the kind of thing that grows on you and someday you wonder how you lived without it. Should be a fun ride.

Update 24 hours later: I really like that the iPhone has a speaker. I’ve always wanted a radio in my bedroom at night and now I have one. On the downside, the battery life is abysmal: it was fully charged at 8AM this morning and completely dead by 8PM tonight.

« Newer PostsOlder Posts »