Archive for the ‘Technology’ Category

Google Chrome Frame

Tuesday, September 22nd, 2009

Google Chrome Frame is huge.

Revisiting my post on Google Chrome Lite from February:

In 2009, Google should embed Google Chrome into Google Toolbar, which has a HUGE install base. This would be a huge driver to accelerate Google’s web platform, convert more folks over to a modern browser experience. Imagine a Chrome “Lite” running inside Toolbar inside IE, billed as a “web accelerator”.

(Insert humorous smug remark here. Okay, it’s out of my system.)

This is the right strategy for Google to use against Microsoft in the browser wars. Google’s 2009 playbook probably looks similar to this:

  1. Let Google Chrome Frame mature in open source into a completely awesome (and hopefully secure) web plugin. Web developers get excited and really start using HTML5 instead of talking about it. Security issues are vetted and addressed.
  2. Bundle Chrome Frame 1.0 into Google Toolbar (hell, Google everything), with huge established (and unpublicized to date) distribution.
  3. Launch both as part of a multi-prong “death by a thousand cuts” attack (Chrome standalone, OEM, Chrome OS, Chrome Mobile, YouTube HTML5 video, etc.) on Internet Explorer.
  4. ???
  5. Profit!

What should Microsoft do? Get busy. Find a differentiator (graphics, JavaScript, sync, hardware port, XBOX, etc.), stop looking at WebKit and start shipping it already.

Technorati Tags: , , , ,

A Kick Ass Browser Renaissance

Sunday, July 5th, 2009

Why are building browsers in vogue again?

Quite simply, a browser renaissance, started with WebKit, a small and flexible open source code base that used less memory and power, and kicked ass at rendering the Web.

WebKit is really helping folks easily create and extend browsers with its very flexible and understandable code base. It’s truly the Linux renaissance again, driving innovation, and place browsers where they were difficult or impossible to put before. And WebKit’s rivals didn’t sit still, they’re also kicking ass at an insane clip, and we, the users and developers, benefit.

Great hardware needs great software.

The browser is really your OS now – your apps live and run there, and you want them to run well. The browser experience matters again. That’s why Apple is here, making a great browser to sell with their hardware. Google, Nokia, HTC, Palm and many others are here for the same reason.

Closely related to this activity are pure browser vendors like Opera, selling a quality mobile web browser to hardware OEMs that don’t have the time to make their own. This is also Mozilla’s goal with Fennec.

A flashier World Wide Web.

  • Flash: Adobe needs to protect its dominance on the desktop Web interactive media experience. Adobe also wants to duplicate Flash’s success in mobile.
  • CSS Visual Effects: Apple is tired of Flash’s slow pace of innovation, performance and constant crashing on Mac OS X. Steve and Bertrand’s insurance policy. And why the hell not when you make stuff like Quartz, Core Animation, QuickTime X, and iPhones.
  • Silverlight: Microsoft builds their own browser, why not their own Flash?
  • HTML5 Video: Everyone doesn’t want all video to go through a Flash plugin. Plus, cool video reflections!

What your high tech company should think about.

  • If you make consumer hardware products, having a great browser will be a key strategic factor to having great applications, user experience, and long-term extensibility.

  • If you make consumer facing applications, browsers now offer the best user interface framework “toolkit”. There are only very few reasons to use or build a custom UI framework today, primarily availability and performance.

  • If you make pure web applications already, targeting these modern browsers now makes sense, the most desirable consumers now have these types of browsers, and the market share continues to climb.

  • If you make or use software frameworks, innovations in the browser wars have yielded some amazing technology that you should be taking advantage of. The 3 JavaScript engines, WebKit Nitro, V8, and Mozilla TraceMonkey now are starting to surpass other dynamic languages in performance and other languages are starting to play catch up.

  • If you are Google, I’d do this.

While we’re talking about JavaScript …

  • Distributing computation work to browsers is a new frontier. Imagine offloading your search indexing or database indexing to visiting users. Having compute clusters will lower the cost of building large scale distributed services in the near future. Today’s primary barrier for this is bandwidth consumption (distributed applications still have large amounts of I/O) but it will work today for certain applications.

  • JavaScript as a server-side language also makes great sense long-term, where code passes seamlessly between servers and clients. Today’s primary barrier for this is mature system libraries and standards for JavaScript, but there are already great companies working on this, and the concept is far from new. (too many links to share here)

Food for thought …

Thanks to Om Malik for the inspiration to write this post. The one question I wish I had a better answer for is: “Why does Apple have Safari on Windows?” I believe the answer may be something more than, “oh hell no, Google ain’t gonna release no WebKit browser on Windows before we do…” (rewind to June 2007) but what the actual answer is, we may not know for some time.

Updates: Corrected that TraceMonkey is the Mozilla JS engine, not Tamarin. Thanks Dirkjan!

Technorati Tags: , , , , , , , , , , , , , , , ,

Safari 4 CSS Video Effects

Thursday, June 4th, 2009

Safari 4 Video

If you have a recent browser build of WebKit nightly, you’re going to love this movie trailers demo I’ve been hacking on. Click on the image above, select a movie trailer, and check out Safari 4’s video reflections using CSS Effects. Recent WebKit nightlies with the latest QuickTime installed give the best experience, with flawless transitioned video reflections. Safari 4 Beta also provides a decent experience, but doesn’t transition reflections.

What you are seeing is:

  • A WebKit reflection applied to a HTML5 video tag. It’s also just 1 line of CSS, and the same reflection is applied to the movie poster thumbnails as well:

-webkit-box-reflect: below 1 -webkit-gradient(linear, left top, left bottom, color-stop(0.5, transparent), color-stop(1.0, rgba(255, 255, 255, 0.5)));

  • HTML5 video events, “loadstart” and “finished” which then change the page state.

  • CSS Transitions handle all of the animation, so my code simply adds and removes the “darker” class to make the text and the movie thumbnails fade out while the video is playing. Things like stopping the video before it fully fades in just works.

Up until Safari 4, video reflections had not been working very smoothly. But times sure have changed.

I should note that video reflections are really tough to do, especially in a web browser. Flash makes it somewhat possible, but not easy, and certainly not as fast as what you see here. And I hope this example gives you a taste of what a cinematic user experience might look like in a web browser.

You may also be interested in my post on CSS CoverFlow, complete with snapping, physics, and perspective correct 3D.

Technorati Tags: , , , , ,

Nokia Finally Answers the iPhone

Tuesday, December 2nd, 2008

When Lilia Martinez-Coburn, my colleague at hi5, first told me about the upcoming Nokia N97, I was skeptical. I’ll eat my words today.

Nokia is certainly rising to the challenge and seems to be on track to be a BMW to Apple’s Mercedes-Benz in the new “internet in your pocket” generation of mobile phones. Consider these key ingredients:

  • Cinematic UX – Finally, someone has successfully xeroxed Apple’s Core Animation’s GPU + implicit animation model and who better than Nokia. The implicit animation model is key in making great UX with minimal pain and bugs. I suspect the UX polish is focused on the main “phone top” idle screen, but it’s a great showing.
  • Web BrowserIt’s WebKit and Nokia already has a decent port.
  • Industrial design – N97’s form factor is great. Nokia is no slouch when it comes to ID, and they’re very close here. N97’s a fair amount thicker, but not too shabby.
  • A twist – a physical keyboard and Flash + video support. Apple’s mobile web efforts have promise, but people sure do ask for Flash a lot.

But there are details that we won’t know until the N97 ships and are key to making sure Nokia doesn’t pull a “Prada”. Those are:

  • Performance – Touch interfaces need to have minimal to no latency. Graphics needs to be fast, and I have no doubt a GPU is sitting in that N97. Hopefully S60 5th Edition is up to speed here.
  • Software Ecosystem – Will Nokia provide an app store? Will there be refinements to S60 to let 3rd party developers finally make great apps? And can these developers make money? Nokia certainly is integrating with partners on the social networking front. But …
  • Nokia Maps? – Well, I’m certainly skeptical of Nokia’s ability to out innovate Google on mapping technology, but I wish them the best of luck. Competition is always good, and I hope Nokia finds the game changer in building their own mapping service.

I have two closing thoughts for now – 1) MacWorld is in January. I can’t wait to see that Apple tablet. 2) Finally, a new “internet communicator” with potential… though it hasn’t shipped yet.

2009 is going to be an interesting year.

Update: Additional coverage from Engadget, Robert Scoble, Gizmodo

Technorati Tags: , ,

Building CoverFlow for Safari on iPhone

Thursday, November 6th, 2008

Did you know that 3D graphics and animation is possible with Safari on iPhone?

If you have an iPhone, try out the CoverFlow (zflow) demo live with a live Flickr feed.

This CoverFlow demo is part of a new open source project I’ve started, CSS-VFX. The idea with CSS-VFX is to demonstrate all the cool things that are possible with Apple’s CSS Visual Effects extensions.

How does it work?

The zflow demo in CSS-VFX uses the Apple CSS Visual Effects extensions for hardware accelerated (on iPhone!) 3D perspective correct transforms and easily animated transitions. HTML 5 Canvas is used for simulating reflections.

  • zflow starts by loading each image from the images array. When each image is loaded, we scale the image to fit in a square region, and apply 3D CSS transforms to scale it in place.
  • Reflections – zflow then takes the scaled image and creates a Canvas element that contains a gradient alpha mask of the image’s reflection (using a “reflect” function to do this) and positions the canvas element in place.
  • Touch Controller – zflow creates a TouchController object, who’s job is to field touch events from Mobile Safari and calculate an appropriate offset.
  • Clicking – zflow detects when no move events have been made, and zooms + rotates the focused image forward by setting a “CSS Transition”ed 3D transform on the focused image. Clicking again transitions the image back.
  • Inertia – zflow achieves inertia by setting the “transition timing function” of the “tray” to an “ease-out” function, which slows things down. On the touch end event, we calculate the projected velocity and set the tray’s target position to that location. CSS Transitions handles the decay in velocity as the transition timing function executes — slowing the tray down gradually.

What’s next?

I hope that CSS-VFX can become a series of graphics gems that clearly illustrate how to use CSS Visual Effects, as well as talk about some of the corner cases and best practices to get the best performance. If you come up with something you’d like to include, please let me know. I’ll be tinkering with a few more gems myself, just watch the project for more as time goes on.

And tell a friend, I can’t wait to see what everyone else does with these great new features in Safari on iPhone.

Where to learn more

The CSS-VFX open source project is a good place to start. You can just use the zflow code in your own iPhone web pages (there’s docs on how to do that); and deep dive into the innerworkings of zflow to understand what exactly is going on.

Also, check out Apple’s proposed extensions: CSS 3D Transforms, CSS Transitions, and CSS Animation. They provide full specifications on what’s possible. Of course, there are a few gotchas when using these in practice, and I hope to document these as things progress.

Technorati Tags: , , , ,

What You Need To Know About Amazon SimpleDB

Thursday, December 13th, 2007

Well after being under NDA for so long, I’m glad to be able to say that Amazon SimpleDB has gone into limited beta. Congratulations to everyone on the SDS / SimpleDB team; their several years of work on SimpleDB (formerly called SDS) is a brilliant piece of engineering.

What’s cool about SimpleDB

  • Really large data sets
  • Really Fast
  • Highly Available – It’s Amazon. Running Erlang. Whoa.
  • On demand scaling – Like S3, EC2, with a sensible data metering pricing model
  • Schemaless – major cool factor for me here; items are little hash tables containing sets of key, value pairs

Considerations you’ll want to think about

  • Eventual Consistency – Data is not immediately propagated across all nodes… the latency is usually around a second, but for high data sets or loads, you may experience more latency. On the plus side, your data isn’t lost!
  • Queries are lexigraphical – You’ll need to store data in lexicographical ordered form (zero-pad your integers, add positive offsets to negative integer sets, and convert dates into something like ISO 8601)
  • Search Indexes – You’ll need to construct your own indexes for text search – The SimpleDB query expressions don’t support text search, so you’ll have to construct inverted indexes to properly do “text search”. This is actually a really great lightweight way to do this and I’m sure many interesting indexing schemes will be possible.

Under the hood

According to the SimpleDB team, SimpleDB is built on top of Erlang. One of the developers, Jim Larson and I worked together at Sendmail, and he was part of a team doing some amazing stuff with an Erlang message store way back in 2000.

While you don’t need to know Erlang to use SimpleDB, many people have visited here interested in its Erlang roots. If you are interested in learning Erlang, I can recommend Programming Erlang, written by Erlang’s creator – the best introduction you can find. I’ve associate-linked to it on Amazon; just for a little meta-fun.

The data model is simply:

  • Large collections of items organized into domains.
  • Items are little hash tables containing attributes of key, value pairs.
  • Attributes can be searched with various lexicographical queries.

Now you can easily build:

  • Search indexes
  • Log databases / analysis tools –
  • Data mining stores
  • Tools for World Domination

Further Reading

I also wrote a very basic Python module for SimpleDB to handle the XML and REST stuff (too bad it’s not JSON, at least for now), which I’ll release as soon as I figure out how much of the NDA is now lifted. There are a few floating around, so it shouldn’t be too long before they appear publicly.

Updates:

  • Added a link to Nick Christenson’s paper on Sendmail’s Erlang message store – A great read for those of you building large scale messaging systems or anything in Erlang.
  • Added a link to Werner Vogels’ article on eventual consistency – a great background behind SimpleDB’s consistency design choice.
  • Whether or not SimpleDB and Dynamo are the same underlying technology has never been confirmed by an authoritative source. That’s all I’m allowed to say.

Technorati Tags: , , , ,

A Mac Games Announcement in August?

Tuesday, June 12th, 2007

Here’s what John Carmack said at the WWDC ‘07 Keynote during his demo:

… in fact we’re showing on the Mac platform, the PC, the PS3, and the 360, the same data running. We’re going to be demoing this at E3, as well as our QuakeCon in August and I expect actually to have another Mac related announcement to make at that time which we can’t quite go into right now…
What could that announcement be? All of id Software’s titles have been ported to OS X already … could this be a port to a new forthcoming Apple console? (might this be Apple TV?) Or perhaps an original mobile game title or port for the iPhone?

We shall see.

Technorati Tags: , , , , , ,

Safari Is The iPhone Developer Platform

Monday, June 11th, 2007

It’s official. Want to build applications for the iPhone? Safari is the solution. Web Standards is the SDK.

As I wrote about earlier this month, and this year, this is how you do it. It’s standards based, it’s pretty, and it’s the future.

Apple announced their iPhone extensions, there’s lots of integration points to make web apps first class on iPhone. Here are a few things you can do:

  • Dial phone numbers.
  • Send e-mail.
  • Link to built-in maps.

All of the web developers on the planet just became iPhone developers. Ladies and gentlemen, here comes the Mobile Internet Revolution.

Digg!

Technorati Tags: , , , ,

iPhone SDK Now Available (or How Apple reinvented the Mobile Application Platform)

Friday, June 1st, 2007

Today, John Gruber wrote an article asking for an iPhone SDK. Well, it’s here, but if you want it, you need to see things differently. –

For developers, the biggest thing about iPhone is that Apple has reinvented the mobile application platform. This isn’t mobile Flash, mobile Java, or even the mobile Web. It’s the real Web, the real deal.

The iPhone truly puts the Internet in your pocket. That’s huge. The Internet, the craziest, most amazing, important platform of our time is now on your phone. With a first class Web platform.

iPhone’s first 3rd party applications will be Internet services with web application or Dashboard user experiences. Apple’s will probably publish a few simple extensions; stuff to work with Multi-Touch high resolution, perhaps some offline support.

But remember, this is just the beginning:

Steve: What I’m saying is, I think the marriage of some really great client apps with some really great cloud services is incredibly powerful and right now, can be way more powerful than just having a browser on the client. Steve Jobs at D5

So until WWDC, you can find an iPhone SDK Developer Preview here.

</fanboy>

Update: I think people are also realizing what the implications of all this are. Mike Arrington @ TechCrunch put it very succinctly in that mobiles and desktops will stop living separate lives when iPhone (and its clones) arrives and changes the game completely.

Update #2: It’s official.

Technorati Tags: , , , , , , ,

How to Build The Next Ultimate Application Platform

Tuesday, May 29th, 2007

A long post. Enjoy. :-)

Today, my friend Rand Wacker revived a great post about browsers as the ultimate application platform. At a high level, I agree with him, but the reason why we’re not seeing more “multi-platform” applications is that right now, for many companies, the web browser application platform presents the best choice.

Desktop and mobile applications are very expensive to develop and are extremely difficult to build at an Internet pace on today’s platforms. Mobile frameworks like WebKit and desktop frameworks like Apollo and WPF are trying to correct this, but it’s not an easy problem to solve, and hasn’t been solved right yet.

In my career, I’ve had the pleasure to work on mobile apps, mobile browsers, mobile web apps, desktop web apps, desktop Windows + OS X apps, Flash widgets, RIA frameworks and RIAs at FilmLoop and Openwave. So based on those experiences, I present you with:

The 3 Key Ingredients of the Next Ultimate App Platform.

  1. Insane visual / graphics / text layout performance. It’ll off-load the heavy lifting to the GPU, do all the game programming tricks out there, and likely talks directly to DirectX and/or OpenGL.
  2. Spectacular type-setting and type layout. Macintosh, PostScript, TeX, PDF, HTML. Each of these successful projects either did text right, or text fast.
  3. Easy animation. I’ll speak more about this in a future topic, but to pass the bar Apple has set for application user experience, you must have animation and it must be easy. Most folks realize the need for animated UI now, but very few toolkits have made it easy. Apple’s Core Animation is one such toolkit, and you can see what it’s done for OS X Leopard and iPhone. At my company, PixVerse, we may open source our own implicit web animation toolkit once we get some free time.
  4. The basics (Okay, so there are really four … ) The obvious things that so many have hyped and written about already… fast dynamic scripting language; database and searching engines; persistent storage for offline use; encryption; desktop notifications; networking; sync, etc.

Now for a disclaimer. This isn’t the whole picture. It’s just one piece — the visual user experience. It seems to be the one that the hyped up platforms seems to be addressing first… whizzy graphics and video. Important things are being ignored: machine learning; data mining; decent search facilities; robust multi-directional sync (have you read about RSS-SSE and Unison?)

Written using TextMate. ;-)

Technorati Tags: , , , , , , ,