Saved Bookmarks
| 1. |
Solve : HTML5? |
|
Answer» *facepalm* I'm not sure why we're so worried about speeds anyway - we're only talking milliseconds in the difference. Exactly... and that would be the cumulative time. And if we are talking about just a few bloody tweens, I hardly see how somebody could prefer flash. (which wouldn't be faster anyway*) There are several key points to summarize. -Javascript is a plain-text language that has to be interpreted by the browser. -Veltas, at least, thinks that there should be some sort of "Binary code" that is "W3C approved" (whatever that means) for use on the web at large. -But the reason we don't do that, is that Binary Blobs are inherently unsafe. What is it, anyway? Some sort of byte code? machine code? Just saying "Binary standard" was a dreadfully vague thing to say. Bitmap FILES are a "Binary standard" but I don't see them as being very useful for animation. -Currently, the security issues are constrained by the browser's javascript interpreter. This would simply move that to a "new" interpreter for this Binary blob (or remove security and platform independence altogether if it was just a blob of machine code that could be arbitrarily run by a browser, Web-based ActiveX All over again... but W3C approved!) And of course the browser would still need a javascript interpreter anyway, so all this would do is multiply the attack surface- for no real gain whatsoever. *Allow me to explain why Flash will always UNIVERSALLY be slower than javascript,CSS/HTML: First, it's always a plugin. That means it always has to be loaded, for any Flash-based content to be viewed. various implementations of the plugin could easily change behaviour. Also, most browser plugin architectures on most windowed desktops have to create a Child window for it. This has several ramifications- first, it means that scrolling the page will require more work by the browser to properly clip the flash video being shown (otherwise it would appear atop other controls). You can already see this as a frequent symptom with Flash video- "native" HTML content, without ridiculous and sometimes browser-specific hacks, appears on top of everything else, simply by virtue of it using a window handle (on windows, or equivalent on other systems) and being a full-fledged OS managed Window, whereas the rest of the content is rendered as part of a larger frame. HTML5 would put those rendered elements as part of the rendered frame, making their actions, responses, and general interactions scriptable using javascript. And, by eliminating a Machine-Language binary from the browser, you've eliminated the biggest attack surface present in browsers for over a decade. Is it slower? well, maybe. But you know what? There is no point being minutely faster if it's inherently insecure. And I REPEAT, Adobe Flash is the primary reason that browsers now sandbox plugins. Quote from: BC_Programmer on January 15, 2012, 05:32:17 AM Firstly, BC, I think you need to get over yourself. Secondly, even if you use ActionScript all over an animation or for a site, it's still not taking up most of the processing time. Quote from: Veltas on January 15, 2012, 08:32:04 AM Firstly, BC, I think you need to get over yourself.What? You said that "not all flash has actionscript" Except it does. The fact is that Shockwave/Director/Flash itself, when creating tweens and other content in the editor, are basically going to compile that into actionscript. Just because a swf doesn't have user-created actionscript doesn't mean that it magically doesn't have any at all; any and all actions- animation or otherwise- in a flash video are done via ActionScript, or rather, actionscript bytecode. It's sort of like saying that not all Windows applications have a WinMain() function. It's only right if you don't look beneath the surface; all Windows applications have a WinMain function, just most languages and libraries hide it beneath their runtimes. Similar with ActionScript; just because you didn't add it yourself doesn't mean it isn't there. Quote Secondly, even if you use ActionScript all over an animation or for a site, it's still not taking up most of the processing time.This discussion would be a lot easier if you had used any of the involved technologies at some point. Quote It's sort of like saying that not all Windows applications have a WinMain() function. It's only right if you don't look beneath the surface; all Windows applications have a WinMain function, just most languages and libraries hide it beneath their runtimes. Similar with ActionScript; just because you didn't add it yourself doesn't mean it isn't there.An INTERNET comparison to that would be the class contructor function in PHP (or Java) - you can create one if you like but one will be added automatically if you don't. Quote from: kpac on January 15, 2012, 09:08:32 AM mustnot to tarnish your point, but there is a glaring exception with java- you must define a constructor in any class which derives from another class that doesn't have a parameterless constructor. For example: Code: [Select]//a.java public class a{ public a(int parameter){ } } //b.java public class b extends a } as that is, b.java will not compile, since it cannot automatically generate a parameterless constructor on account of such a automatically generated constructor simply consisting of a call to the parameterless superclass constructor, which in this case doesn't exist. Now you can of course create your own parameterless constructor which calls a superclass constructor with parameters, but in this case it can't be automatic. of course if you were really referring to javascript, than I have no idea of the semantics involved, though I'd be rather disappointed that you would confuse them Totally off-topic, but am I the only one that thinks interfaces should totally allow for a guarantee that certain constructors be present? I mean, I can throw an exception if reflection doesn't find the appropriate constructor, but it would be nice to have some compile-time checking, since that is sort of the point of using interfaces to begin with...Yes, I was talking about Java. I'm learning it at the moment in college, so not quite up on all the points yet - including the one you mentioned. HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG). WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006, they decided to cooperate and create a new version of HTML. Some rules for HTML5 were established: New features should be based on HTML, CSS, DOM, and JavaScript Reduce the need for external plugins (like Flash) Better error handling More markup to replace scripting HTML5 should be device independent The development process should be visible to the public |
|