开发者

Does HTML5 mean doing less with JavaScript?

Will browsers that use HTML5 use less JavaScript, jQuery, etc. and make things like animations done with just HTML? Will it make Flash less necessary for “smooth” graphics?

In other words, I开发者_如何学C won’t lose anything by taking the time to learn jQuery since HTML5 is here, will I?


In some specific places, yup:

  • The autofocus attribute is specifically designed to replace a common JavaScript pattern
  • CSS3 animations can replace JavaScript animations, so if we’re talking about HTML5 in the expanded Apple sense of the word, yup

But in general, I can’t see HTML5 diminishing the usefulness of JavaScript, nor frameworks like jQuery, one bit. Given that HTML’s development is constrained by browser releases, the best it can do provide markup alternatives to a few very common scripting patterns. Scripting is useful because it lets you do anything you can imagine, including things specific to the project you’re working on.

So learn away.


Well, it potentially can mean quite a lot more scripting. For example, where before you might have stuck a flash object into your page to display a chart or graph, that graphic might now be done using javascript drawing to a canvas. Overall I dont see the use of client side scripting decreasing, but rather increasing as web 'pages' become more and more complex. HTML5 will just provide even more possibilities.


HTML is about content. If you want to add behaviors to it you will still need JavaScript. Just like you will still need css to apply a layout. Learning JavaScript will definitly be time well spent.


HTML 5 is ratifying the use of EMCAScript (a.k.a. JavaScript) to a degree that no prior W3C standard has done.

Some will say, in the future, that this was the harbinger of the decline of modern civilization.


In some ways, yes. This is especially true with regards to form elements. New input types are available, which include things like url and email. There are also min and max attributes, and a required attribute. These have the potential to greatly reduce the amount of work involved in building a front-end web form. Server-side validation will still be necessary, of course, but there will eventually be less need for duplicate code on the client side.


No. You still have to code fallbacks for browsers that don't support the HTML5 features you're using. The fallbacks will contain the same amount of Javascript code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜