views:

483

answers:

8
+12  Q: 

HTML5 or Flash?

I have to write a web application for a client soon. Looking at the specs, there is no reason why the project couldn't be an HTML5/CSS/Javascript project, but the client is arguing that it has to be Flash.

The project has a number of dynamic elements and is web-based. It'll only be used in-house by a small number of people and all of those people use either Google Chrome or Safari 4. They are all pretty tech-savvy to boot.

My question is this: what are some of the reasons (preferably technical since this is Stack Overflow) I can present to my client as to why HTML5 is better than Flash (that's assuming I'm right and it is in this case)?

Is it OK to use HTML5 even though it's still a draft spec (I'm assuming it is after checking out all those Apple HTML5 demos a few days ago)?

Also, would a hybrid approach be preferable for now? Something that uses Flash wherever the canvas object would've been used in the HTML5 approach and that conforms to a normal XHTML approach.

Help!

+4  A: 

As you've limited the scope of the problem to two browsers that both support HTML5 quite well, performance would be my first concern. Flash does some things better than Canvas (et al) manage (and yes, it falls short in a lot of other places) but if all the users are webkit-based (which Crome and Safari both are), HTML5 should fly along.

Just going back to spec support, you do need to make sure you respect that each browser might implement things in different ways for now.

I certainly wouldn't suggest going with a hybrid solution. If you're in a controlled environment, where you can control the presence of Flash or a HTML5 browser, you'd really just be wasting time by reimplementing in the other tech.

But some of the core benefits of HTML5 over Flash:

  • Better video performance on low end systems
  • Much cheaper to maintain as you won't need Flash licenses (unless you're building this with the new Flash HTML5 exporter - is that even out yet?)
  • Support for iPhone and other platforms with no or broken Flash support

But if you need proper streaming video or webcam broadcast support, Flash is probably your best bet for the near future. HTML5 doesn't have a fix for everything.

If there's even the smallest chance that an old browser (IE6 or even 7 or Firefox 2) is going to use the system -- and you have to be honest with your client and yourself -- you have to hold off and stick with the lowest common denominator.

Oli
Good point about the licenses - Adobe keeps releasing new versions of CS, so keeping up is expensive.
JBRWilkinson
HTML5 does not have video performance, browser media players have, and have for some time before HTML5.Streaming video or webcam broadcast support is also not an issue without Flash.
reisio
@reisio what **cross-platform** alternatives are there to something like RTMPT tunnelled streaming? Or are you suggesting Java? One step sideways and two steps back.
Oli
@Oli: you never witnessed streaming media before Flash existed? I'd venture to say most radio stations with an online presence are _still_ using technology that predated Flash. As for "**cross-platform**" (Windows vs Mac OS), their preinstalled browser plugins have virtually always had an overlap in supported formats (which isn't even strictly necessary).
reisio
@reisio: Of course I have but let's step through each of the old guard: Windows Media needed a WM install, not cross platform. Real Media like WM needed RealPlayer. Quicktime, guess what, needs Quicktime Player. All of these require a plugin that isn't standard on some platform or other. Each [probably] has a a lower install base. Why on earth would you suggest switching to one of those? As I said, one step sideways, two steps back. If you can name a streaming platform as good as Flash and with a similar install base, I'll shut my row up.
Oli
@Oli: Media plugins never needed to be cross-platform, the problem was only ever that people tended to use MOVs on Mac OS and WMVs on Windows - they could've used a format both supported. As far as Windows and Mac OS are concerned, respectively, their media players are even more likely to be installed than Flash. I haven't suggested switching from anything to anything else, I've merely stated that media was being streamed long before Flash was around.
reisio
A pluginless "streaming" video as you describe is just a progressive download and yes, I agree, this works for some media applications. *My* point is proper, reliable, variable bitrate streaming with a consistent interface is still best done with as comprehensive as Flash
Oli
Streaming is streaming, let's not get silly. :p You can also have a consistent interface and still deal with multiple plugins.
reisio
Streaming and Progressive Download are two entirely different things. Please stop letting your political leanings in this great debate impact the information you're giving people who are here for help. It's harmful to the developer community at large.
Myk
Who's that aimed at, Myk?
Oli
+1  A: 

There's the old tune that Flash is inaccessible. You might think "whatever; this is only used in-house" but in my opinion it makes accessibility more relevant; building an inaccessible web site means you don't cater customers with disabilities - bad for business; your choice - while deliberately building your in-house tools like this could be argued as impeding employment opportunities for people with disabilities.

On a public site, accessibility is important because it results in higher visibility; on an internal site accessibility covers your a** in the event that all those accessibility initiatives crack out the big guns :P

LeguRi
You can make Flash accessible. It's not without work but neither is making HTML accessible. See http://www.webaim.org
Oli
+3  A: 

You mentioned a key point in the beginning of your question:

but the client is arguing that it has to be Flash.

The client is always right ;)

Are you sure that this application will be limited to this core set of users? It will never expand to anybody else that doesn't have an HTML5 compatible browser installed?

I can't exactly argue in favor of HTML5 since I'm not entirely familiar with it. Since you say that the requirements fall within the domain of HTML5 you can argue that you can develop it in an open standard.

If you think your client is malleable enough to accept this, then go for it....it may not be worth the hassle to simply make it in Flash though!

espais
+2  A: 

Non-technically: I would go with Flash, unless there's a reason not to use Flash that you will actually convince your client. If they have their mind set to Flash, and you use HTML5 after all, chances are that most if not all problems will be attributed to your using HTML5. It doesn't matter if the problem has nothing to do with HTML5, or if the problem would also occur in Flash, it's a mind set your client may have or get, that you risk bumping into. I've seen it happen a few times myself, and usually I end up wishing that I had taken the approach the client prefers, even if the product is as good (or better) as it would've been using the clients preference. Of course, again: if Flash doesn't suffice, there's no argument, but that doesn't seem to be an issue here.

Besides, Flash currently enjoys much wider browser support. If the deadline is in the near future, it'll be a difficult choice of taking away so many browsers that don't support HTML5.

Rob
+1 for words of wisdom. If you beat your client over the head to let you use HTML5 (which your client is obviously not comfortable with) instead of Flash, which he prefers, then the minute anything goes wrong it's your fault.It sounds like there's no good reason to use HTML5 other than your preconceived notion that it's a "better solution," which is putting the cart before the horse anyway. Flash will do everything your client wants and will be compatible if someone needs to view it in an older browser for any reason. THAT'S what you should focus on.
Myk
+1  A: 

If you really wanted to make a pitch, I would say this: will the front-end always be flash, or does it seem like something that would some day be converted to HTML5. The conditions you describe would be a perfect way of having a low risk way of getting your (and your client's) feet wet with the technology. If that isn't really on the horizon at all, then it's probably not worth the risk. Flash is a known, HTML5 is not. There is already an existing body of flash in the front-end.

As for the HTML5 pro/con thing, I think the argument really comes down to one of two things - reach (devices that flash can't go) and the future (will HTML5 become the dominant method of have rich web experiences). Personally, I think that HTML5 will likely fill a lot of areas that flash currently occupies in the near future and is a good bet for the long run, but flash is much safer right now.

Russell Leggett
A: 

Despite a lot of propaganda saying otherwise, HTML5 and Flash are not equivalents — they do not do the same job.

Furthermore HTML5 does not add anything to HTML that we didn't already have, it is merely a cleanup (or corruption, depending on your interpretation).

That said, Flash is not needed to accomplish any particular feat — it has never been needed.

Clients should not ever dictate how a particular feature is implemented, only what it should do — the implementation should always be up to the developer. You should, of course know why not using Flash is better than using Flash, but you should not have to explain this to a client, ever.

reisio
'HTML5 does not add anything to HTML that we didn't already have' is NOT true. 'Flash ... has never been needed' is also not true. And finally, 'Clients should not ever dictate how.. ' is incorrect! 3 strikes~~
Scott Evernden
@Scott Evernden: I'd agree with you if you weren't wrong. It might be interesting if you attempted to show how you are right and I am not, though. :p
reisio
It must be nice to live in a world where all of your statements here are true, reisio, but that world looks nothing like the world I live in. If a client wants flash, they want flash. You can't just say "Nah, you can't ask for that." They'll hire someone else.And, there are, have been and will be things that flash can do that HTML/JS can't. That's just true. Show me a DRM-protected video stream. Show me byte-level file-format manipulation. You're a bit out of your element here.
Myk
@Myk: It has its pros and cons. If a client wants Flash, you ask them what you want it to do, and say you can make something that does that; you don't have to say no... but if they're specifying the technologies, you might _want_ to. :p There is nothing that Flash can do that cannot be done without it. That's just true. There's no such thing as a protected video stream — if you can view it, you can copy it. ActionScript is merely a proprietary version of JavaScript. You're a bit out of your element here.
reisio
That's patently false - but I suppose we're all welcome to our own biases. You're spreading misinformation, though.
Myk
@Myk: You're spreading misinformation.
reisio
back2dos
@back2dos: http://www.google.com/search?q=3d%20javascript%20game http://www.google.com/search?q=javascript%20"image%20editor" http://www.google.com/search?q=javascript%20presentation I guess Google and I are just in cahoots? :p
reisio
back2dos
You're welcome. Canvas predates HTML5, and also isn't needed and never was. Matching has nothing to do with it. I heartily suggest you to actually care to look at what other people try to show you. That's all I have to say in this reply. I wish you luck in your future endeavours, as it's useful to the deluded.
reisio
A: 

Since this is going to be a video application, I would suggest a HTML5 solution with a Flash video for fallback. Since your target is Safari and Chrome, you probably only want to encode in H.264 (sigh), and then you can throw in a Flash video player for those platforms that do not support HTML5 H.264 video. You don't need to encode the video in 2 different formats to support both HTML5 video and Adobe Flash video, since Adobe also support MP4 H.264.

So, just tell your customer you will do both, Flash and HTML5 with the appropriate technology on a platform auto-executed. I think that's a nice sales pitch.

(I would always want to go for open codecs, but in your situation it really doesn't seem appropriate).

Silvia
A: 

Do you need Linux support? The Flash player for Linux is horrible. It's very slow, even on very fast computers.

Also, I think the 64 bits player for Flash is still is alpha after all these year.

Cesar Canassa