« August 2008 | Main | December 2008 »

September 19, 2008

Ajaxian: State of the Web Development

Ben Galbraith and Dion Almair from Ajaxian talking about where things are in the web.

Even though we've been in the winter of browser development, there are some good tools that we can use to move the web forward.

In the talk today, it's all about the user experience. Ajax really came from a designer, not an engineer. Most users don't care what their car engine is, just want it to go when the press the gas.

Bertran Serlet, Apple, recently said that first software was just to get something done, then it was to have a good experience, now they need to be wowed. Shows an example of browsing a backpack on the Apple store and getting all kinds of seamless changes in the views.

To create great user experience you need to understand the user's expectations and exceed them.

Shows a huge list of JavaScript frameworks now out there. The old taxonomy was that for little widgets, prototype was the choice, GWT was for enterprise, and jQuery was for DOM manipulation. Finally, dojo was the soup to nuts, all-encompassing.

The new taxonomy is that all of the old taxonomy has expanded to include more things from other libraries, have created plugins and added communities. They get lots of emails saying there's a new JavaScript library that is better than all the older ones. Ajaxian doesn't take time to review all of these, but suggests you pick one of the ones that have been around and go with it. They all cover the basics.

Some of the higher level stuff is dogo charting and John Resig's Processing.js.

The second wave of Ajax, new frameworks that offer GUI on top of the processing. jQuery User interface, Ext JS, and dijit are some examples. SproutCore and 280 Slides are other examples where some really powerful and interesting approaches have been taken. SproutCore is organized in a MVC approach with web services.

There's an entire interface design side of all of this. The fashion pieces of doing web apps isn't Ajaxian's expertise, so want to be careful to say this is mostly about the underneath. Visual design and interaction design need to work together. The interaction design needs to provide low-latency.

We need to providing quick response to users. The limits of the OS and browser make it difficult to ensure responsiveness. The OS has threads, but JavaScript doesn't. Google gears provide a solution for this. Gives you a worker pool. (Running a really cool example of using JavaScript to calculate prime numbers while showing a slider going back and forth. Running it in the foreground of the browser causes the slider to get frozen here and there. With gears they can run two prime calculators at the same time without having any visual pause in the slider movement.)

Shows this great example of Greasemonkey getting into Campfire to provide OS-level notification when new messages are posted.

HTML 5 Canvas is pretty cool. Shows some examples of games and photo manipulation.

Posted by mike at 12:07 PM

The Future of Browsers

Ben Galbraith and Dion Almair from Ajaxian are moderating a conversation at NYC Web 2.0 Expo about the future of browsers.

Participants in the panel are:
Ojen - Google Chrome
Brendan - Mozilla Foundation
Chris Wilson - platform architect on Internet Explorer

What is in, and is planed, for HTML5 in the browsers?
Brendan - HTML5 is big, are actively working things into the browser.
Ojen - Credit goes to WebKit. So far Chrome didn't want to do anything with changes.
Chris - A little bit of HTML5 is in IE8, but there are some issues with the working group and making modularization a little better.

How does Mozilla keep up with big budgets like Microsoft and Google?
Brendan - advantages of being open because you get better partnering and participation.

How dead is SVG?
Brendan - it isn't dead, but did get stuck in the "rewriting the web in XML" thing. Webkit has support, Mozilla has it. Have to think of canvas vs. SVG and how it is useful.
Chris - need to focus on both SVG and canvas, shouldn't write one of them off
Ojen - remember that Ajax technology was in IE for a long time without being used

Will Firebug ever allow me to export all of the CSS?
Brendan - We are investing a lot in Firebug, so the answer is yes.
Chris - IE8 beta2 has a lot of polished tools like profiling, it is really important that all browsers have something to let the developer
Ojen - Chrome has a WebKit inspector, and the Webkit debugger tools are very good

How far is the browser away from being the OS?
Ojen - It's apples and oranges, they are two totally different things. Not clear what it means to say Chrome is competing for Windows, because the browser has to have the OS. Font rendering is an example. There are more things that could be moved into the browser, like digital sync from a camera, but the browser is not the OS.
Brendan - you see a lot a lot more people building their applications for the web, using the tools there instead of focusing on the OS-level

The choice of browsers is hell, having chrome introduced was freightening to add in to the mix with all of the other browsers I have to test. What are you doing about it?
Chris - important that the browsers all have good test suite so before release they know it meets certain criteria

How will Google Chrome better my browser experience because they know a lot about me?
Ojen - for now, address bar pings Google suggest, will be more but are sensitive to storing/sharing too much information

What kinds of add-ons will be allowed in Chrome?
Ojen - want to try really hard to learn from IE and Firefox about instabilities. Greasemonkey founder works on Chrome team
Brendan - get better isolation techniques
Chris - add-ons have been in IE for a long time, can be challenging to write because they have to be a COM object.

Are you going to support geolocation in the browser?
Chris - it won't be difficult to support once they figure out the issue with prompting the user to let their location be used by the site.

Is the IE browser for mobile going to get better?
Chris - Not on the mobile team so can't comment, but it is critical to get the browser to work consistently

Support for IE on Mac?
Chris - not a current plan, if the need is Sharepoint it's a question for the Sharepoint team, not something that would come from IE

Browsers on gaming console?
Brendan - Gecko has been ported, these days the consoles are so much like PCs it isn't a big issue
Chris - the real challenge is the different in user experience, not the technology

Will browsers have open source codecs for playing music?
Brendan - the ogg formats have been built into Mozilla, they aren't common formats but they are open source
Chris - the issue with ogg is that it isn't clear just how open source it is, if you launch and support it there might be tangential (submarine) patents that arise

Posted by mike at 11:04 AM

September 18, 2008

How to Run Your Startup on Amazon Web Services

At NYC Web 2.0 Expo listening to Alex Iskold talk about using Amazon web services to run your web site.

The cloud gives you:

EC2 (elastic cloud) gives you Unix-level interface to setting up a server and then can allocate multiple instances of that server to scale up or down as necessary. Amazon recently added persistence. Prior to this you couldn't keep around information beyond the instance of a machine. Now they have a big disk you can store stuff on and refer to it from different machine instances. Not fully vetted yet as far as how stable it is.

S3 is a simple storage service, very simple to put and get data objects.

SimpleDB is a simple database service. Better name might be indexing service, is still in beta. Partition data into up to 100 domains, where you store records that have a key and a list of attributes. No concept of multiple keys, it is really a flat database with indexing on the key and each of the attributes.

Posted by mike at 5:39 PM

meebo: Scaling Synchronous Web Apps

At NYC Web 2.0 Expo listening to Sandy Jen talking about scaling synchronous apps. Meebo has been around for awhile, now up to 40 million people using the site on a monthly basis.

Meebo started with Apache but switched to lighttpd and found it got them a huge performance gain. They use COMET or long polling, which Apache wasn't as good at.

Their application is written in C & C++, mostly C. They are happy with the performance, but programmers are getting harder to find. Tried memcached, but found that it was not helpful because there isn't a lot of cacheable data.

In the end, your users don't care what technologies you use as long as their experience is good.

Overdesigned code is worse than hacky code. At least with hacky code you can quickly go back, with something overarchitected the complexity.

You don't know things unless you put it out in real life.

Overarching thing Sandy says is that technical solutions are unique for each instance, what works for you will be different for someone else.

Posted by mike at 5:12 PM

Scaling Digg

Listening to Joe Stump speak at NYC Web 2.0 Expo about scaling digg.

A few notes as Joe is talking.

When scaling needs go up, normalization becomes less likely. Data often needs to be denormalized to spread it around.

Keep cache entries forever and explicitly expire. You may have some things that get used all the time, others that are used less frequently but that should still be left around until they get purged for space reasons instead of time.

MemcachedDB replaced MySQL in their "Green" badges project. Needed 3,000+ writes per second starting with 5 terrabytes of data growing at 7GB per day.

They are building IDDB, which has elastic partitions, eventual consistency, and variable partition types. Will continue developing and then hopefully open source it in a year or so.

Posted by mike at 4:23 PM

September 17, 2008

Catching a Game at Yankee Stadium

It goes against everything I believe, being a Bostonian, and Red Sox fan. Still, while in New York City I couldn't resist the opportunity to go see a game in the soon-to-be-old Yankee Stadium. I didn't root/cheer for either team because the White Sox were in town, and I don't like them either.

However, it was worth the trip up to the Bronx. I had a good seat, and got to see Jeter break Lou Gehrig's 71-year-old record for most hits at the Stadium.

Also, one of our children (Ezra) has also decided that his parent's team is not his team and has chosen the Yankees. Going to Yankee Stadium and taking a few photos to send back home was a nice gesture.

Definitely not the same energy as Fenway Park. When it was time for the Yankees to rally in the 9th, the remaining crowd tried to get into it, but there weren't many left. Although, to be fair, I haven't been in Fenway park when it's too late in the season to make a run at the playoffs.

Posted by mike at 11:15 PM

Web Analytics 2.0

At NYC Web 2.0 Expo listening to Avinash Kaushik's talk, Web Analytics 2.0: Rethinking Decision Making in a "2.0" World.

Avinash is a fantastic presenter.

Companies will not die if they don't have data, sometimes they die despite having data.

The clickstream data itself doesn't provide much. Web analytics 2.0 tells you more than what happened. It's about the how much, the why, and the what else. This looks at multiple outcomes analysis, experimentation and testing, voice of the customer, competitive intelligence, and insights.

An examle, the bounce rate. Shows you what percentage got to your site and left immediately. Look at the bounce rate for different pages, because the search engine drops users on many different pages. Don't sacrifice sexiness for usability.

Avinash noticed that his site got 20,000 visitors, using 9,500 different keywords one month. The report with 9,500 keywords was incredibly long. So he turned it into reports which show increases or decreases in search words.

Look at websites that have sent you traffic in the past 7 days that have never sent traffic before.

In the past everything was done on the page views, Analytics 2.0 is adding events, so you can report on all of the incremental things that happen on a dynamic site.

Conversion rate. Average conversion rate is less that 2%. What is happening to other 98% who don't take an action. Do they come for support, research, careers? Quantify the complete value, make sure you're keeping track of goals that encompass all of the reasons a user comes to your site.

Posted by mike at 1:20 PM

David Heinemeier Hansson: Go REST with Rails

Listening to David Heinemeier Hansson speak at NYC Web 2.0 Expo. He's talking about using a good practice for organizing web pages with proper building of page URLs.

David started in REST for practical reasons. Decided that Basecamp should have an API. Looked at the Flickr API, which says it's REST but isn't really true. Found the REST experience for the first go-around unsatisfying. Was just an add-on.

REST is based on HTTP, is a way of embracing it. HTTP is an ogre, which has layers. The HTTP spec has been around for a long time, but nobody had read it. The strength and weakness of HTTP is that you can use it without knowing anything about it.

REST is "blue cheese", an acquired taste. Took some time to get used to it.

Initial barriers to using REST. First, is the Roy Fielding dissertation which describes it. Roy's document is a dissertation, and is very academic. David quotes from it, very conceptual and complex language. Second, the ws-star group of specs and SOAP looks more organized and easy to step into. But after going down that path you realize that it's a bad approach.

David goes into a demo, using rails. It's like watching the 10-minute screencast.

REST relies on concept that there is a single resource that you can do multiple things too. E.g. /posts/1 is the URL for viewing, editing, saving (put) and deleting. They simulate the full HTTP get/post/put/delete actions even though they aren't valid in HTML. Also using the same URL for getting different formats. Also use that URL for saving new data.

If web servers and applications were built right, you'd be able to ask for a resource in a certain format and the browser would reply with a 406 response indicating that the resource is available but not in the format you were requesting. Rails differentiates between resource formats by using the same URL, but appending an extension (.html, .xml, .atom).

HTTP response 422 means unprocessable entity. So if you post something, but not quite right the 422 helps you know that you're close but might be missing some important data. With RAILS, the exceptions that result in a 422 is seamlessly handled in an XML request and HTTP. In XML, the response is wrapped in XML, in HTTP the browser gets and presents the message.

HTTP is so much better than SOAP from a human readability perspective.

David is passionate (well known) about the fact that if you use the HTTP REST principles it removes a bunch of stuff about decisions that just don't matter. Engineers/developers often spend time deciding how to organize the primary methods for interacting with data via a URL. With REST, it's all defined and you can move on to more interesting things.

The REST actions map to the HTTP actions, which map to database interactions:

find/create/update/destory -> GET, POST, PUT, DELETE -> SELECT, INSERT, UPDATE, DELETE

Posted by mike at 12:04 PM

Jason Fried: Things We've Learned at 37signals

I'm at NYC Web 2.0 Expo listening to Jason Fried, president and founder of 37signals, talking about things they've learned.


Their proposals went from huge things to one or two pages, because they found that most clients just wanted to see how long it would take and how much it would cost.

Jason is really glad to be out of the client services business. In design/development clients don't really respect the work of the consultants.

37signals only hires when it hurts. They only replace jobs they are already doing. Tend to hire folks they've worked with before, have seen their code and how they work in the open source world. They try folks out, give a 30-day contract to see if they fit in the culture.

Multi-tasking is over rated. Try to focus on one thing at a time. They had a period where they tried to have all employees focus on a single product, but it wasn't practical.

When it comes to design, they don't have a specific way that employees must work. Jason likes to do sharpie on paper, and then goes straight to HTML so you can start to see it in action.

Posted by mike at 10:11 AM

September 16, 2008

John Resig: Secrets of JavaScript Libraries

Listening to John Resig speak at NYC Web 2.0 Expo on JavaScipt.

Prior to starting John reiterates several times that this is a technical session, talking about functions, closures, and prototyping in JavaScript. John uses a series of pages he built to follow along with, at http://ejohn.org/apps/learn/ (works in Firefox and Safari). If you double click on any of the JavaScript, it becomes editable. You can make changes and then press run. How cool is that?

This presentation talks about advanced JavaScript techniques, but doesn't delve into cross-browser techniques. Not a lot of good documentation on how different browsers run JavaScript, will be in John's next book.

John is good at handling questions, from folks with a spectrum of JavaScript understanding. Impressive on-the-fly modification of the presentation to provide details about the examples. Clearly knows his stuff.

The presentation has periodic quizzes, which John lets you fiddle with the code in your browser and see if you can implement something he's gone over.

Some specifics (not 100% on the terminology for all of these concepts):

Sadly, I had to slip out at the break to look at some work issues.

Posted by mike at 1:33 PM

Casing the Startup Joint

This morning, at NYC Web 2.0 Expo, I sat in a session about startups, called Casing the Startup Joint, led by a VC partner at Union Square Ventures and a NYC entrepreneur who's been at a VC firm and left to pursue an idea. Interesting, and insightful. I jotted some notes on interesting things that came up, but was also trying to get to the bottom of an issue at work.

I don't know that I'm full-blooded entrepreneur, but have worked in the startup environment and associate with folks who have that in their system. Interesting insights from presenters and audience on all kinds of issues surrounding starting a web business. Not sure if I'll ever need to go back to my notes, but was interesting to listen.

Next up is John Resig's Secrets of JavaScript Libraries, a significantly more geeky session.

Posted by mike at 1:14 PM

New York City Web 2.0 Expo Underway

You could see this banner all the way across town coming down 38th Ave. Made it easy to find.

Posted by mike at 9:00 AM

September 15, 2008

New York City for a Week

I'm in New York City this week, attending the Web 2.0 Expo. Took the Acela train down this afternoon, getting some good work done en-route. Business class is very comfortable for working. Lots of legroom and a sturdy desk. A fantastic way to travel down the east coast.

Am staying on 44th between Times Square and Avenue of the Americas. Is a good location for getting around.

This evening I took a walk up 5th Avenue to the Apple store, which I've never seen in person. It is a cool place to see live. It was incredibly busy, people and employees everywhere. I checked the store hours before I walked up there because it was after 8pm when I left. Was a little surprised to see that the store hours are listed as "24/365".

I love visiting New York City and am jealous of folks who get a chance to live in the city to really get an extended period of soaking it in. I'm not sure if reading Kottke helps me get my fill or makes me want it more.

Either way, looking forward to a good week attending the sessions of the Expo, seeing NYC, and making progress on my cases at work.

Posted by mike at 11:37 PM

September 6, 2008

Riding the Motorcycle Range

A friend (Jeff) and I spent 5 hours in the classroom and 10 hours on the "riding" range this weekend, re-freshing all of our semi-forgotten motorcycle skills. Was a lot of fun. I got to sport a borrowed "CHiPs" helmet out on the range.

Day 1 I rode a cruiser (pictured) but day 2 I switched up to a dirt bike which felt a little better for a taller person like myself. The dirt bike was a lot of fun to ride, quite a bit lighter and easier to handle. Jeff rode a Red Honda Nighthawk, and looked quite stylish himself in his "ChiPs" helmet.

The instruction was provided by Bob and Tara, from Streetwise Cycle School. We really liked the pace of the class, and Bob and Tara were good at handling a range of riding skills and providing continual feedback. The exercises got increasingly difficult over the weekend. Something as basic as stopping the motorcycle requires learning and practicing good technique (apply both brakes evenly and gradually while pulling in on the clutch and shifting down to 1st, handling wheel lockups correctly).

In the end we were evaluated on a handful of different things, with a point system to determine if we'd grasped enough of the skills to be allowed to ride beyond the controlled riding range. Everyone in the class passed. A new M-adorned license will be arriving in the mail in the next week or two.

I highly recommend the Streetwise folks if you're looking for a riding class in the greater Boston area, or in Massachusetts.

Posted by mike at 10:51 PM