Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: HTML5  (Read 25210 times)

0 Members and 1 Guest are viewing this topic.

kpac

  • Web moderator
  • Moderator


  • Hacker

  • kpac®
  • Thanked: 184
    • Yes
    • Yes
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: HTML5
« Reply #30 on: January 15, 2012, 05:59:10 AM »
*facepalm*

Try learning ActionScript. It's like writing a GUI-based calculator in DOS.

I'm not sure why we're so worried about speeds anyway - we're only talking milliseconds in the difference.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: HTML5
« Reply #31 on: January 15, 2012, 06:22:39 AM »
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.
I was trying to dereference Null Pointers before it was cool.

Veltas



    Intermediate

    Thanked: 7
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Linux variant
Re: HTML5
« Reply #32 on: January 15, 2012, 08:32:04 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.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: HTML5
« Reply #33 on: January 15, 2012, 08:43:24 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.

I was trying to dereference Null Pointers before it was cool.

kpac

  • Web moderator
  • Moderator


  • Hacker

  • kpac®
  • Thanked: 184
    • Yes
    • Yes
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: HTML5
« Reply #34 on: January 15, 2012, 09:08:32 AM »
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.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: HTML5
« Reply #35 on: January 15, 2012, 09:45:03 AM »
must
you can create one if you like but one will be added automatically if you don't.
not 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 :P

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...
I was trying to dereference Null Pointers before it was cool.

kpac

  • Web moderator
  • Moderator


  • Hacker

  • kpac®
  • Thanked: 184
    • Yes
    • Yes
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: HTML5
« Reply #36 on: January 15, 2012, 09:58:38 AM »
Yes, I was talking about Java. ;D
I'm learning it at the moment in college, so not quite up on all the points yet - including the one you mentioned.


papercupmachine



    Greenhorn

    • Paper cup machine
  • Experience: Beginner
  • OS: Windows XP
Re: HTML5
« Reply #37 on: January 02, 2013, 02:34:03 AM »
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