动态生成html vs使用html脚手架? [英] dynamically generating html vs using html scaffolding?

查看:117
本文介绍了动态生成html vs使用html脚手架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人使用的指导方针可以帮助他们决定何时使用javascript动态生成所有html元素
与实际编写一些html并将其用作脚手架?

我一直在使用extjs框架(我没有看到这个库

在这个论坛上批评很多 - 不像原型,jquery和dojo哪个

这里的常客倾向于剔除 - 除非我错过了一些

线程,这很可能)并且它允许两种机制为

所有小部件和布局。但我不确定是什么利弊

要么接近。显然,如果你无法访问

html页面,那么你的选择是有限的。


无论如何,我打算在extjs中发布这个论坛(如果它没有在这里引起很多响应,我仍然可以使用
),但是后来

认为这更像是一般的javascript / style问题并且

所以在这里贴了这个。


非常感谢你的想法。


谢谢,
Faisal Vali,MD,MSc

Loyola放射肿瘤学

伊利诺伊州芝加哥

解决方案

Faisal Valiaécrit:


是否有人使用的指导方针可帮助他们决定何时更好地动态生成?b $ b所有html元素使用javascript

与实际编写一些html并将其用作脚手架?



唯一的方法是代码:

- 全部用html,

最终用css,

格外有少量图像

- 为一些非常有用的动态添加JS,而不是更多


我一直在使用extjs框架(我没看到这个库



这个奇妙的extjs是什么?

它离开哪里?


即:看到

< http://www.extendersamples.qsh.eu/>

-886 KB( 1252 KB未压缩)只是为了一个表:-(

或...这应该是一种插件的impla示例:
http://www.siteartwork.de/livegrid_demo/

--1154 KB: - (:-((只是为了排序表?)


在这个论坛上批评很多 - 不像原型,jquery和dojo



也许是因为它不太知名或使用过?


非常感谢你的想法。



我从原则开始,必须显示和阅读页面

没有JS ... :-(
< br $> b $ b -

sm


SAM写道:


Faisal Valiaécrit:


>人们使用的指南是否有助于他们决定什么时候使用动态生成所有html元素更好? javascript
与实际编写一些html并将其用作脚手架?



唯一的方法是编码:

- 全部在html,

最终有了css,

格外有几张图片

- 为一些非常有用的动态添加JS,而不是更多



也许不是*唯一的*编码方式,但肯定是一套合理的

原则。

< blockquote class =post_quotes>


>我一直在使用extjs框架(我没看到这个库



这个奇妙的extjs是什么?

它在哪里离开?


ie:看到

< http://www.extendersamples.qsh.eu/>

-886 KB(1252 KB未压缩)仅适用于桌子:-(



你知道,我必须承认我认为你是不诚实的
我读这篇文章的时候是
。我去了网站,看到了962KB(由

Firebug报道)。


我想:好吧它一定主要是在图形中......不是所以:


HTML:22KB

CSS:207KB

JS:705KB

图片:15KB

XHR:15KB

Jinkies!


或......应该是什么一种插件的示例:
http://www.siteartwork。 de / livegrid_demo /

--1154 KB :-((:-((只是为了排序表?)



并且,如果我可以:Yowser!


Dan Rumney写道:


SAM写道:


> Faisal Vali a ??暴击:


>>是否有任何指导人用它来帮助他们决定什么时候更好动态使用javascript生成所有html元素
与实际编写一些html并将其用作脚手架?


唯一的方法是编码:
- 全部用html,
最终用css,
特别用几张图片
- 添加JS对于一些非常有用的动力,而不是更多



也许不是*唯一的*代码方式,但肯定是一套合理的

开始的原则。



我的第二个。


> ie:看到了
< http://www.extendersamples.qsh.eu/>
-886 KB(1252 KB未压缩)仅用于表:-(



没有TABLE元素,它由DIV元素组成。


[...]我去了网站,看到了962KB(由

Firebug报告)。


我想:好吧,它必须主要在图形中......不是这样的:


HTML:22KB

CSS:207KB

JS:705KB

图片:15KB

XHR:15KB

Jinkies!


>或者......本来应该是一个impla的例子插件类型:
http://www.siteartwork.de/livegrid_demo/
--1154 KB: - (::-((只是为了对桌子进行排序) e?)



如果我可以:Yowser!



但是,对于脚本来说,如果有能力的人写了它(或代码生成的话),那么足迹可能会大大减少


it)。例如,ExtJs示例中的代码包括


函数Sys


Are there any guidelines people use that help them decide when it is
better to dynamically generate all html elements using javascript
versus actually writing some html and using it as scaffolding?
I have been using the extjs framework ( I haven''t see this library
critiqued much on this forum - unlike prototype, jquery and dojo which
the regulars here tend to eviscerate - unless i''ve missed some
threads, which is quite possible) and it allows both mechanisms for
all its widgets and layouts. But i''m not sure what the pros and cons
are to either approach. Obviously if you don''t have access to the
html page then your options are limited.

Anyway, I was planning on posting this within the extjs forums (and I
still might if it doesn''t spark much of a response here), but then
thought that this was more of a general javascript/style question and
so have posted this here.

Would really appreciate your thoughts.

Thanks,
Faisal Vali, MD, MSc
Loyola Radiation Oncology
Chicago, IL

解决方案

Faisal Vali a écrit :

Are there any guidelines people use that help them decide when it is
better to dynamically generate all html elements using javascript
versus actually writing some html and using it as scaffolding?

The only way is to code :
- all in html,
eventually with css,
exceptionally with few images
- adding JS for some non really useful dynamism, not more

I have been using the extjs framework ( I haven''t see this library

and what is this marvelous extjs ?
where does it leave ?

ie : seen that
<http://www.extendersamples.qsh.eu/>
-886 KB (1252 KB uncompressed) just for a table :-(
or ... what is supposed to be a impla example of a kind of plugin :
http://www.siteartwork.de/livegrid_demo/
--1154 KB :-( :-( (just to sort a table ?)

critiqued much on this forum - unlike prototype, jquery and dojo

Perhaps because it is less well known or used ?

Would really appreciate your thoughts.

As I start from principle that a page must be displayed and readable
without JS ... :-(

--
sm


SAM wrote:

Faisal Vali a écrit :

>Are there any guidelines people use that help them decide when it is
better to dynamically generate all html elements using javascript
versus actually writing some html and using it as scaffolding?


The only way is to code :
- all in html,
eventually with css,
exceptionally with few images
- adding JS for some non really useful dynamism, not more

Perhaps not the *only* way to code, but certainly a sensible set of
principles to begin with.

>I have been using the extjs framework ( I haven''t see this library


and what is this marvelous extjs ?
where does it leave ?

ie : seen that
<http://www.extendersamples.qsh.eu/>
-886 KB (1252 KB uncompressed) just for a table :-(

You know, I have to admit that I thought you were being disingenuous at
first when I read this. I went to the site and saw 962KB (as reported by
Firebug).

I thought: well it must be mainly in the graphics... not so:

HTML: 22KB
CSS: 207KB
JS: 705KB
Images: 15KB
XHR: 15KB

Jinkies!

or ... what is supposed to be a impla example of a kind of plugin :
http://www.siteartwork.de/livegrid_demo/
--1154 KB :-( :-( (just to sort a table ?)

And, if I may: Yowser!


Dan Rumney wrote:

SAM wrote:

>Faisal Vali a ??crit :

>>Are there any guidelines people use that help them decide when it is
better to dynamically generate all html elements using javascript
versus actually writing some html and using it as scaffolding?

The only way is to code :
- all in html,
eventually with css,
exceptionally with few images
- adding JS for some non really useful dynamism, not more


Perhaps not the *only* way to code, but certainly a sensible set of
principles to begin with.

I second that.

>ie : seen that
<http://www.extendersamples.qsh.eu/>
-886 KB (1252 KB uncompressed) just for a table :-(

There is no TABLE element, it is composed of DIV elements.

[...] I went to the site and saw 962KB (as reported by
Firebug).

I thought: well it must be mainly in the graphics... not so:

HTML: 22KB
CSS: 207KB
JS: 705KB
Images: 15KB
XHR: 15KB

Jinkies!

>or ... what is supposed to be a impla example of a kind of plugin :
http://www.siteartwork.de/livegrid_demo/
--1154 KB :-( :-( (just to sort a table ?)


And, if I may: Yowser!

However, as for the scripts the footprint could have been considerably
smaller if a competent person would have written it (or the code generating
it). For example, the code in the ExtJs example includes

function Sys


这篇关于动态生成html vs使用html脚手架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆