Web Versus Native – Asking the Wrong Questions

There’s been a lot of talk lately about web apps versus native. It’s not that the question has ever gone away, but just over the past couple of weeks it seems like it’s been called out a bit more in blog posts. There was a Pew Internet report that covered some of the pros/cons of going web or native. Darryl Taft, one of my favorite press guys, did a writeup earlier this month on the landscape of web versus native and some of the companies involved in blending those two worlds. And then today I saw news about Mojito, a hybrid client-server solution from Yahoo, which is part of a wider initiative called Cocktails with the aim of “making web applications feel native“. And that got me thinking about the problems that people are trying to solve when it comes to web apps on mobile devices.

Web apps are in a tough spot when it comes to native, but they’re getting better. As I see it, one of the main problems with web apps is that they aren’t currently better. They’re cheaper, they’re faster (to write), and they allow you to target more platforms, but they’re not better. What’s even worse is that you could argue there are only 2 platforms for mobile that matter right now, Android and iOS. But it was the exact same situation back in 2003/2004 when the web really started coming into its own as an app platform and taking away from traditional native apps on the desktop. The one problem is that back then the web apps were better. They didn’t look as fancy and they didn’t run quite as fast, but there were few things that people needed to do that the web couldn’t do. I remember talking about AIR and mentioning things like drag and drop, file system access, and file type associations. Those were nice, but people didn’t really need them. What made web apps better for end users was the fact that they ran everywhere, were lightweight, always up-to-date and moved with the user so when they switched between the library, school, work, and home, their stuff went with them.

But fast forward to today. We never leave our mobile devices. They’re always with us. Sometimes we change contexts from our mobile device to a desktop/laptop/tablet (think email) but ultimately one of the things that made web apps so great, that they moved with the user, has been completely negated by smartphones. And increasingly, what web apps can’t do is much more important than what web apps couldn’t do 5 years ago. All of the sensors; GPS, Accelerometer, Camera, not to mention the data on the phone, things like contacts, that can be used to make things on the device so much more personal and completely change the experience. Some of the basic ones are available to web apps, and the specs are in place to get more, but there’s still a significant disconnect between what can be done with native apps on the device and what can be done on the mobile web.

To me that’s the biggest worry for the web on mobile devices right now. Sure, performance isn’t ideal, but as the browsers get better and devices get more powerful, that one will fix itself. The technology is there in the form of Canvas, SVG, great JS frameworks, faster JS performance. So the core interactive features work on these devices (with some performance caveats). But the benefits of the web are in many ways nullified by smartphones today. The web needs to come up with something that makes it better once again. And the deck is really, really stacked against it. Think of the distribution model of apps and in-app purchases. I think you could argue that those aren’t great for customers as much as they are great for content creators. Mobile apps are easier to monetize, easier to track, and easier to manage than the web right now. And on one hand, that’s fantastic. Finally designers and developers can directly make money off of their creations. But it’s coming at the expense of the web.

In order for web apps to thrive again the web community needs to start thinking about how mobile web apps can be better and more useful to customers than native apps. I have no doubt that it’s going to happen. How many times have you said to yourself “I don’t want your app, I just want to see the content” while browsing around the web on a mobile browser? So the sentiment from users is there, but for now the web just doesn’t provide enough value for users to get beyond the inflection point. So I’m hoping the conversation starts to move away from web apps not being fast enough, or “feeling native enough” to one of how web apps can be better than native from a user perspective. It’s going to be a fun conversation to watch unfold.

HTML5 Can’t Exist Without the Flash Platform

Let me start by saying I’m not anti-HTML5. I think it’s great. I think open standards are core to the DNA of the web and that’s part of the reason I’ve been encouraged that Adobe is moving more in that direction with AMF, RTMP, and some of our underlying protocols. But I also don’t think that means there is no room for companies like Adobe and Microsoft that want to see the web be better. I don’t think it’s an issue of corporate greed or vendor lock-in, but I understand the economics of how those end up being profitable. On the Adobe side I think it’s just that we have a lot of services and tools that we want to provide and we need a platform we can innovate quickly on. When the winds of technology shift we want to be able to make sure our customers can stay ahead. Video? RIAs? Real-time collaboration? Enterprise data management? All things our customers needed that we could build into the platform and make available to them. With the way open standards work it’s just not feasible to push those innovations through. So we’ve been very careful with the Flash Player. That’s how we provide our customers value. But it goes beyond features and into another problem with the web: a consistent experience. From browser to browser you’re going to get wildly different implementations of a “standard”. With Flash Player you can deploy your content and know it will run the same way for everyone that has Flash regardless of browser or operating system. There was an example today that made me chuckle and write this post. It’s not the best example; blurs and sparkly trails are not necessarily ideal uses of Flash, but in this context it was important. A group working on the NORAD Santa Tracker wanted to capture a specific experience; it added value to the overall presentation, and it was worth taking the time to create. Here’s the email:

Hey all-

My 20% at Google is the NORAD Santa Tracker, which gazillions of adults and kiddies use each year to track the progress of Santa across the world.

Last year, I used our Flash API to create the tracker map, primarily so that I could make a glittery comet trail of Santa’s past 7 stops. I tried it in JS with resized animated GIFs, and then decided that Flash would be much less painful – and was right. The code drew a line on a Sprite, blurred the line, then added some little sparkle movies and animated them.

You can see a screenshot with some trail here: http://www.wired.com/images_blogs/photos/uncategorized/2008/12/24/santa_nrad_edited.jpg

This year, I have ported the map to our JS v3 API, because we are doing aversion that utilizes the Earth plug-in (3d flying Santa!), and I wanted to make sure there was a version that didn’t require a plug-in. But, I really miss the glittery comet trail.

I wanted to get your advice on the best way to do this in JavaScript, given the following (flexible) requirements:
- Works in FF3, Chrome/Safari, IE 7+.
- Doesn’t require images (bandwidth is an issue).
- Doesn’t require a plugin

I’ve contemplated canvas, but not sure if that supports foreground blurring,and don’t know if it would translate to VML with excanvas. It doesn’t seem very SVG-y. I could try animated GIFs again, but they don’t animate the same across browsers. I could also try window.setTimeout with some PNGs, but that will slow down the browser, require images, and won’t achieve the same blurred line effect.

Do any of you have a better idea? (Help prove to me and the kiddies that Open Web can make magic happen! :)

Thanks!

- PamElf (<- my elf code name)

Not an off the wall request by any means. It’s a pretty basic task and using open standards in this case is a great way to go. Especially considering that she’d like mobile support for this (later email) and HTML is still the best way to target every level of device. What surprised me were the responses:

From: Jeff Schiller

My two cents:

SVG Web does support the blur filter so you could get this working cross browser if you force the flash renderer.

If you just forced the flash renderer for IE, that doesn’t solve the problem of Chrome/Safari who have not turned on their SVG Filter support.

SVG Web is a cool project to support SVG, but a requirement is that you have to use Flash. So even when you try to use open standards, you still have to fall back to Flash in some cases.

From: Dion Almaer

A hack would be to have a separate <canvas> that draws the blur w/ an opacity and z it? :)

Seems like a decent solution, but requires some hacks. This is fine for a 20% project, but when you’re trying to be productive, are hacky solutions the best way to go?

From: Alex Russell

How ’bouts IE 7+ with GCF? That’d let you try things like <canvas> more directly.

A perfectly fine way to do it, but GCF is the Google Chrome Frame plug-in, which would mean another plugin and as Pamela says the message after that, it’s not ideal at all from an end-user case.

Now I understand that the major roadblock here is the IE 7 requirement. If it wasn’t for that you wouldn’t need the Flash fallback for SVG Web and you wouldn’t need to use something like the Chrome Frame plug-in to make it work. But that’s kind of the point of open standards. Before you can really take advantage of a technology you need to get a consensus from everyone. All of the browser vendors have different agendas and different priorities. Right now Microsoft is the hold-out, but what happens if something comes along and threatens another browser vendor’s goals? Then they’ll be the hold out. That’s part of the price you pay for standards; you have to get everyone on the same page before you can move forward.

In the end, that’s better for everyone. Once everyone gets moving in the same direction, that becomes the baseline, and the web is a better place. We’re seeing that start to happen with HTML5. And despite the “Flash is dead” rhetoric, HTML5 will be a good thing for the web. Things like playing basic video and doing animation/vector graphics are so simple and yet so integral to the web experience that they should have been done in an open standards way a long time ago. But if Flash didn’t exist those things wouldn’t have become as important as they did as quickly as they did. And even now, as the web tries to move forward, Flash is being used as the fallback so that the web can evolve even if not everyone in the group buys in.

To me, that says that Flash will always have value. We control the platform so we can keep innovating and pushing the web forward in our own way. Maybe that’s content protected video, maybe it’s P2P support, maybe it’s a binary transfer protocol, maybe it’s hardware acceleration, maybe it’s writing your own filters and blend modes, and maybe it’s real-time collaboration. Eventually, the open web will incorporate all of those things. But I still wish there was more cooperation between the companies who have technology core to the web and the open standards groups who create the future of the open web. If nothing else, the open standards organizations can see what features stick and which don’t so that you don’t waste valuable time trying to standardize something users don’t want.

In the end, everyone wins. Flash won’t die, Flash developers can still be on the cutting edge, and Adobe will continue to support designers and developers on both sides of the open web/Flash spectrum. We’re all part of the web ecosystem in our own ways. Just like any ecological system, if one side goes extinct, the other is going to suffer.

HTML5 Versus Flash Versions

Serge has a great post on Adobe and the open web. I don’t think Adobe gets enough credit for contributing to the open web. That takes a couple of approaches. One is, as Serge said, we participate in a lot of open source and open web initiatives. But we also spend a lot of time and money investing in the web and solving problems that we come across. Cross-domain support is a perfect example. It was a problem we saw coming long before Ajax and we created a solution in the Flash Player to support cross domain requests. I ran down some of the new APIs and changes between HTML5 and HTML4 according to Wikipedia and compared them to what we have in Flash and when we added it.

Not all of this is 100% accurate but it’s the best guess I have at 2:00 AM. I’ll update it as I get new info.

HTML5 Flash Version
Canvas Tag (2D Drawing and Animation) FutureSplash (Flash Player 1)
Video/Audio Support Flash 2 (Audio) Flash 6 (Video)
Offline Storage Database No real offline storage in Flash Player, Adobe AIR added it in version 1
Drag-and-drop Supported in ActionScript 1(Flash Player 5)
Cross-Document Messaging Cross-Domain support in Flash Player 7
MIME type and protocol handler registration I don’t think there is anything analogous to this in Flash.
New parsing rules N/A
New elements such as progress, nav, time, etc Largely covered with ActionScript 2 (Flash Player 7)
New form controls (dates, times, email, url) Shipped with Flash authoring (Flash Player 3/4)

Is the Pretense of the Open Web Gone?

This is interesting. Mozilla is looking at a way to bring accelerated 3D to the web. Christopher Blizzard has more information on his blog and a couple of good quotes:

We’ve started to see more and more libraries being built to support use cases with Canvas in a 2D context but we really want to take things to the next level and start to allow people to use 3D capabilities as well. Accelerated 3D graphics with the super-fast next-generation JavaScript engines from nearly every web browser vendor means that we’re going to be able to start to see more and more advanced applications written using open web technologies. 3D is a huge part of that story and we’re happy to bring our proposal to the table.

As an Adobe employee, though a big supporter of Flash, I also wish we did more to encourage and foster the open web. The problem is that the standards process is completely broken. You simply can’t innovate that way and it looks like the browser vendors themselves are at the point where they’re pushing their own various priorities and standards so they don’t get left behind. The unfortunate thing is that the standards are what really make the open web open. Sure, you can open source something and claim it’s open, but it’s the standards that give everyone a reference implementation. It’s the standards that aim to level the playing field and make developers lives easier. It’s the standards that keep the open web open.

Probably a hilarious thought coming from a guy who makes his living off of Flash, but I’ve always been of the opinion that we as a company should roll our innovations back into the HTML world. The problem is that even if we did that, we’d have to work within the constraints of the committees, so the open web would always lag behind Flash and in some cases possibly never adopt the better parts of the platform. To me, that’s fine, Flash will always have a place on the web, and Adobe makes some great tools for open web designers and developers. I always thought it was win-win.

So it’s unfortunate to see that even the browser vendors have given up on moving the open web forward through standards. Whether it’s the WHATWG versus the W3C or the trials and tribulations of actually implementing HTML5, things are very broken and everyone is moving on regardless. I don’t blame any of them, but it doesn’t seem like it’s good for web developers.

Unhelpful Rhetoric and Adobe’s Place in the Open Web

Some of the employees from Mozilla flabbergast me. I realize that they want to be seen as defenders of the open web but I think posts like this, by Asa Dotzler, and statements like this, from Tristan Nitot, show that they’re not interested in being constructive. Rather than engaging with companies like Microsoft and Adobe, parts of Mozilla seem to be hell bent on criticizing us at every turn despite the moves towards openness that both companies are making. The web is not under attack. In fact, I think you could make a very valid case that Adobe and Microsoft have helped light a fire under standards bodies to help get things like the video tag implemented in HTML5. The web is too big for any company to control and treating it as a something so fragile it could be taken away or broken by any combination of proprietary technologies does it a huge disservice. The web is a big place and one of the things that makes it great is that it spans so many companies, ideas, and underlying philosophies. That said, Adobe is always working to be a better web citizen, so I take it personally when what we do seems to get dismissed so quickly by people who say they support the open web.

Dave McAllister has a great post about how much Adobe is opening up. Can you flip a switch at a big company and open source everything? Absolutely not. But we’re getting more open. Having the SWF spec open means that even if Adobe goes away tomorrow, theoretically someone can implement the spec and ensure SWF content still renders. Is it the same as open source? No, but it’s a big step. Adobe also has made the open web a core part of our technologies. I don’t know why Asa is comparing Adobe AIR and Silverlight, but one of the great things about AIR is that it lets you use all of those open web technologies (HTML, JavaScript, CSS, etc) to create desktop applications. Included in Adobe AIR is WebKit, arguably one of the most innovative and advanced HTML rendering engines out there. Adobe wants to be on the cutting edge when it comes to Flash AND HTML with our technologies. We’ve open sourced projects like BlazeDS, the ActionScript Virtual Machine (which we contributed to help improve JavaScript performance), and Flex, one of our core technologies.

Diversity in ideas is one of the great things about the web. And I like the fact that there are so many people willing to speak up about the importance of the open web. But scaremongering and implying that Adobe is trying to take over the web is silly and ridiculous. The web can’t be taken over. It’s a thriving ecosystem that we’re all a part of – open and proprietary. Innovation comes in many forms and we can all learn from each other. Adobe works differently than Mozilla, that’s just the way it is. But frankly, when you dismiss what we’re doing with an “our way or the highway” attitude, you make it harder on those of us inside these big companies trying to push in a more open direction.