HTML6 无 JavaScript 的单页应用引起一片哗然

开发 开发工具 前端
关于 HTML6 意在实现无 JavaScript 的单页应用,这引起了前端开发社区一片哗然。请深呼吸,然后继续下面内容。
关于 HTML6 意在实现无 JavaScript 的单页应用,这引起了前端开发社区一片哗然。请深呼吸,然后继续下面内容。

W3.org 分享了一个 casual proposal for HTML6 ,这引起了前端社区的激烈争论。来自前 NSA 雇员和创业企业级 Bobby Mozumder 提交了这份建议,声称一个高性能的响应式 Web 体验无需 JavaScript 支持。

HTML6 无 JavaScript 的单页应用引起一片哗然

Mozumder 写道:新兴的 Web 应用通过 JSON API 加载动态内容,这是单页应用的一个标准设计模式。大多数人采用这种方法是因为它比加载一个完整 HTML 页面要节省很多时间。

这种模式使用那么的广泛,因此 Mozumder 的建议是未来浏览器应该直接提供动态加载内容的功能,而不需要开发者编写任何 JavaScript 代码。

下面是 Mozumder 建议的 HTML 代码:

  1. <DOCTYPE html> 
  2. <HTML LANG=“en”> 
  3. <HEAD> 
  4. <FIXTURES lang=“xml”> 
  5.     <model class=“MyArticleData”> 
  6.         <rsp stat=“ok"> 
  7.             <article label=“one” id=“1"> 
  8.                 <headline>"Big News!”</headline> 
  9.                 <body>"<p>This is the first article intro.</p><p>This is the second paragraph.</p>"</body> 
  10.             </article> 
  11.             <article label=“two” id=“2"> 
  12.                 <headline>"Not so big news"</headline> 
  13.                 <body>"<p>This is the <em>second</em> article.</p>"</body> 
  14.             </article> 
  15.         </rsp> 
  16.     </model> 
  17.     <model class=“MyImageData”> 
  18.         <rsp stat=“ok"> 
  19.             <image label="Square" width="75" height="75" source="https://mycontentserver.com/image_s.jpg" id=“3"/> 
  20.             <image label=“Tall" width=“300" height=“200" source="https://mycontentserver.com/image_l.jpg" id=“4"/> 
  21.         </rsp> 
  22.         <rsp stat=“loading"> 
  23.             <image label="Square" width="75" height="75" source="https://mycontentserver.com/loading_image_s.jpg" id=“1"/> 
  24.         </rsp> 
  25.         <rsp stat=“some_error"> 
  26.             <image label="Square" width="75" height="75" source="https://mycontentserver.com/error_image_s.jpg" id=“2"/> 
  27.             <message 
  28.         </rsp> 
  29.     </model> 
  30. </FIXTURES> 
  31. </HEAD> 
  32. <BODY> 
  33.     <MENU class=“controller”> 
  34.         <A href=“http://api.mywebsite.com/api/load-new-article” model=“MyArticleData">Click here to replace the articles with different articles.</A> 
  35.         <A href=“http://api.mywebsite.com/api/load-new-image” model=“MyImageData">Click here to replace the picture with a different picture.</A> 
  36.     </MENU> 
  37.     <MAIN class=“viewer”> 
  38.         <ARTICLE class=“center"> 
  39.             <H1 model=“MyArticleData.rsp.article(label=‘one’).headline” /> 
  40.             <SPAN model="MyArticleData.rsp.article(label=’one’).body” /> 
  41.         </ARTICLE> 
  42.         <ARTICLE class=“sidebar"> 
  43.             <H1 model=“MyArticleData.rsp.article(label=’two’).headline” /> 
  44.             <SPAN model=“MyArticleData.rsp.article(label=’two’).body” /> 
  45.         </ARTICLE> 
  46.         <IMG src=“model:MyImageData.rsp.image(label=‘Square’)#source” width=“model:MyImageData.rsp.image(label=‘Square’)#width” height=“model:MyImageData.rsp.image(label=’Square’)#height”> 
  47.     </MAIN> 
  48. </BODY> 
  49. </HTML> 

你觉得这个建议靠谱吗?

责任编辑:王雪燕 来源: ImportNew
相关推荐

2015-03-30 09:26:24

JavaScriptHTML6

2015-03-21 06:16:12

应用性能管理

2014-12-08 11:12:23

HTML6

2013-02-26 10:03:19

VMware FlinVMware Lab

2009-06-17 09:52:33

思杰虚拟化云计算

2009-08-19 15:01:24

百度框计算

2020-08-28 12:12:32

美国6G5G基站

2015-12-18 09:42:23

app应用

2010-10-28 09:43:54

2013-08-21 10:16:52

手机智能

2012-08-23 09:40:29

Bulldozer架构AMD处理器皓龙处理器

2021-09-02 06:47:52

字节薪资发薪日

2018-08-26 22:39:08

单页应用HATEOAS

2013-01-10 10:00:57

vCloudvSphere 5.1single sign

2016-05-11 16:59:18

2021-08-05 14:57:16

半导体技术收购

2021-07-13 06:28:36

字节大小周员工

2012-12-07 09:10:51

开发者

2012-10-16 01:00:57

点赞
收藏

51CTO技术栈公众号