从平面文件创建html [英] create html from flat file

查看:61
本文介绍了从平面文件创建html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用包含表名,字段,值的平面文件是什么?

创建html页面的最佳方式?


我想要控制html页面即

1.布局

2.显示什么数据

3.显示什么控件 - 文本框,输入框,按钮,

超链接即平常。


数据不是直接从数据库获得的。


我在想也许平面文件可以使用xml。也许这个平的

文件可以使用以下方式生成:

1.数据库数据和

2.模板文件以指示控件应该出现在每个
html页面上。


也许现有的html页面可以在

代中使用所需的最终html页面,也许他们可以

包含静态数据 - 例如布局,标题和标签,关于

字段,需要放置控件。


搜索这个很难,关键词太常见了:

create,html,xml,dynamic,template等导致百万+点击。

解决方案

lx****@googlemail.com 写道:


使用包含表名,字段,值的平面文件是什么?

创建html页面的最佳方式?

我想控制html页面,即

1.布局

2.显示什么数据

3.显示什么控件 - 文本框,输入框,按钮,

超链接,即通常的。


数据不是直接从数据库获得的。


我在想也许平面文件可以使用xml。也许这个平的

文件可以使用以下方式生成:

1.数据库数据和

2.模板文件以指示控件应该出现在每个
html页面上。


也许现有的html页面可以在

代中使用所需的最终html页面,也许他们可以

包含静态数据 - 例如布局,标题和标签,关于

字段,需要放置控件。


搜索这个很难,关键词太常见了:

create,html,xml,dynamic,template等导致百万+点击。



如果您要解决所有问题,为什么不从平面文件创建html

页面并将其存储为静态页面?然后当

平面文件发生变化时,重新生成html。


比重新创建同一页面更简单(和服务器友好)

每个请求。


-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


6月6日,03:30,Jerry Stuckle< jstuck ... @ attglobal.netwrote:


lxy ... @ googlemail.com写道:


使用包含表名,字段,值的平面文件是什么?

最好的方式创建HTML页面?


我想控制html页面即

1.布局

2.什么数据显示

3.显示什么控件 - 文本框,输入框,按钮,

超链接即通常。


数据不是直接从数据库获得的。


我想也许平面文件可以使用xml。也许这个平的

文件可以使用以下方式生成:

1.数据库数据和

2.模板文件以指示控件应出现在每个
html页面上。


也许可能存在可用于所需最终html页面的

代的现有html页面,即他们可以

包含静态数据 - 例如布局,标题和标签,关于

字段,需要放置控件。


搜索这个很难,因为关键词太常见了:

create,html,xml,dynamic,template等导致百万+点击。



如果你要解决所有麻烦,为什么不从平面文件和商店创建html

页面它作为静态页面?然后当

平面文件发生变化时,重新生成html。


比重新创建同一页面更简单(和服务器友好)

每个请求。


-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司

jstuck ... @ attglobal.net

==================



嗨Jerry,


但这正是我想要做的。

1.创建一个包含

-a)表格/字段+数据值的平面文件

-b)网页(表格)详细信息,即每个

网页上显示的字段/控件。

2.从公寓生成(静态)网页文件。

3.如果平面文件更新,则更新网页。


所以问题是:

1.平文件 - 这应该是什么格式 - xml?

2.如何从平面文件生成(静态)网页(表格)

请记住我想要控制什么网页+

表/字段/数据+控件的创建。


但也许这很难。也许更容易拥有我想要创建的

静态网页。页面可以有标签

表示字段+控件(如果在平面文件中可用)

应该去。


我会想到这样灵活的东西:使用平面文件中的数据/控件生成静态的
网页:已经完成了

但是我找不到任何东西然而。


lxy one写道:


6月6日,03:30,Jerry Stuckle< jstuck ... @ attglobal.netwrote:


> lxy ... @ googlemail.com写道:


>>使用包含表名,字段,值的平面文件是什么?创建html页面的最佳方法是什么?
我希望控制html页面,即
1。布局
2。要显示什么数据
3。什么控件显示 - 文本框,输入框,按钮,
超链接,即通常。
数据不是直接从数据库获得的。
我想也许平面文件可以使用xml 。也许这个平坦的
文件可以使用以下方式生成:
1。数据库数据和
2。一个模板文件,用于指示应该出现在每个
html页面上的控件。
也许可能存在可用于生成所需最终html页面的现有html页面,即可能是可以包含静态数据 - 例如布局,标题和标签,关于
字段,控件需要放置的位置。
搜索这个很难,因为关键词太常见了:
创建,html,xml,动态,模板等导致百万+点击。


如果你要解决所有麻烦,为什么不直接从平面文件创建html
页面并将其存储为静态页面?然后当
平面文件发生变化时,重新生成html。

比在每个请求上重新创建相同的页面更简单(和服务器友好)。

-
==================
删除x来自我的电子邮件地址
Jerry Stuckle
JDS计算机培训公司
jstuck ... @ attglobal.net
=============== ===



嗨Jerry,


但这正是我想做的。

1.创建一个平面文件,其中包含

-a)表/字段+数据值

-b)网页(表单)详细信息,即字段/控件到出现在每个
网页上。

2.从平面文件生成(静态)网页。

3.如果平面文件是更新然后更新网页。



好​​的,我现在明白了。


所以问题是:

1.平面文件 - 这应该是什么格式 - xml?



简单的答案是 - 任何最适合你的形式。我见过xml

文件,csv文件,php代码甚至纯文本。这一切都取决于

数据以及对你来说最简单的。


我认为,因为你的文件需要包含表格/字段和

数据,xml可能最容易解析和维护。但这可能是因为我已经和xml合作了很多。但如果你还没有,另一个

表格(如csv)可能会更容易。


2.如何生成(静态)网页(表格)来自平面文件

请记住我想控制哪些网页+

表/字段/数据+控件被创建。



嗯,你必须阅读文件然后在网页上显示所有信息

。然后选择你想要显示的信息。

最后,生成页面。


但也许这很难。也许更容易拥有我想要创建的

静态网页。页面可以有标签

表示字段+控件的位置(如果在平面文件中可用)

应该去。



你现在正在谈论一个非常受欢迎的模板系统。

关于它的好处是它需要大量的咕噜咕噜的工作。生成页面所需的

代码。它还将

页面的其余部分与显示的实际数据分开,使其更易于维护。


我会想到的东西像这样灵活:使用平面文件中的数据/控件生成静态
网页:已经完成

但我还没有找到任何东西。



之前我曾经使用过它,当时数据并没有经常变化。它可以是

在高使用率网站上非常有效。对于较低使用率的网站和数据

会定期更改,我只是动态生成页面

请求。


我我想你会发现大多数系统都使用数据库而不是

平面文件。它使事情变得更容易 - 数据库为您管理数据

,因此您不必在代码中执行任何操作。简单的SQL

请求并不难理解,如果你要认真对待Web开发,那么它们现在几乎是一个要求。 SQL

太强大了,无法忽视。


-

============ ======

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Using a flat file containing table names, fields, values whats the
best way of creating html pages?

I want control over the html pages ie
1. layout
2. what data to show
3. what controls to show - text boxes, input boxes, buttons,
hyperlinks ie the usual.

The data is not obtained directly from a database.

I was thinking maybe the flat file could use xml. And maybe this flat
file could be generated using :
1. the database data and
2. a template file to indicate the controls that should appear on each
html page.

Maybe there could be existing html pages that could be used in the
generation of the required final html pages ie maybe they could
contain static data - such as layout, headings and tags as to where
fields, controls need to be placed.

Searching on this is difficult as the key words are too common :
create, html, xml, dynamic, template etc results in million+ hits.

解决方案

lx****@googlemail.com wrote:

Using a flat file containing table names, fields, values whats the
best way of creating html pages?

I want control over the html pages ie
1. layout
2. what data to show
3. what controls to show - text boxes, input boxes, buttons,
hyperlinks ie the usual.

The data is not obtained directly from a database.

I was thinking maybe the flat file could use xml. And maybe this flat
file could be generated using :
1. the database data and
2. a template file to indicate the controls that should appear on each
html page.

Maybe there could be existing html pages that could be used in the
generation of the required final html pages ie maybe they could
contain static data - such as layout, headings and tags as to where
fields, controls need to be placed.

Searching on this is difficult as the key words are too common :
create, html, xml, dynamic, template etc results in million+ hits.

If you''re going to go to all that trouble, why not just create the html
page from the flat file and store it as a static page? Then when the
flat file changes, regenerate the html.

Much simpler (and server-friendly) than recreating the same page on
every request.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


On 6 Jun, 03:30, Jerry Stuckle <jstuck...@attglobal.netwrote:

lxy...@googlemail.com wrote:

Using a flat file containing table names, fields, values whats the
best way of creating html pages?

I want control over the html pages ie
1. layout
2. what data to show
3. what controls to show - text boxes, input boxes, buttons,
hyperlinks ie the usual.

The data is not obtained directly from a database.

I was thinking maybe the flat file could use xml. And maybe this flat
file could be generated using :
1. the database data and
2. a template file to indicate the controls that should appear on each
html page.

Maybe there could be existing html pages that could be used in the
generation of the required final html pages ie maybe they could
contain static data - such as layout, headings and tags as to where
fields, controls need to be placed.

Searching on this is difficult as the key words are too common :
create, html, xml, dynamic, template etc results in million+ hits.


If you''re going to go to all that trouble, why not just create the html
page from the flat file and store it as a static page? Then when the
flat file changes, regenerate the html.

Much simpler (and server-friendly) than recreating the same page on
every request.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

Hi Jerry,

But thats exactly what I want to do.
1. Create a flat file that will contain
-a) tables/fields+data values
-b) web page(form) details ie the fields/controls to appear on each
web page.
2. Generate the (static) web pages from the flat file.
3. If flat file is updated then update web pages.

So the issues are :
1. flat file - what format should this be in - xml ?
2. How to generate the (static) web pages (forms) from the flat file
bearing in mind that I would like to control over what web pages +
tables/fields/data + controls are created.

But maybe this is to difficult. Maybe it would be easier to have the
static web pages I want already created. The pages could have tags to
indicate where fields + controls (if available in the flat file)
should go.

I would have thought something flexible like this : generating static
web pages using data/controls from a flat file : had already been done
but I''ve not found anything yet.


lxy one wrote:

On 6 Jun, 03:30, Jerry Stuckle <jstuck...@attglobal.netwrote:

>lxy...@googlemail.com wrote:

>>Using a flat file containing table names, fields, values whats the
best way of creating html pages?
I want control over the html pages ie
1. layout
2. what data to show
3. what controls to show - text boxes, input boxes, buttons,
hyperlinks ie the usual.
The data is not obtained directly from a database.
I was thinking maybe the flat file could use xml. And maybe this flat
file could be generated using :
1. the database data and
2. a template file to indicate the controls that should appear on each
html page.
Maybe there could be existing html pages that could be used in the
generation of the required final html pages ie maybe they could
contain static data - such as layout, headings and tags as to where
fields, controls need to be placed.
Searching on this is difficult as the key words are too common :
create, html, xml, dynamic, template etc results in million+ hits.

If you''re going to go to all that trouble, why not just create the html
page from the flat file and store it as a static page? Then when the
flat file changes, regenerate the html.

Much simpler (and server-friendly) than recreating the same page on
every request.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================


Hi Jerry,

But thats exactly what I want to do.
1. Create a flat file that will contain
-a) tables/fields+data values
-b) web page(form) details ie the fields/controls to appear on each
web page.
2. Generate the (static) web pages from the flat file.
3. If flat file is updated then update web pages.

OK, I understand better now.

So the issues are :
1. flat file - what format should this be in - xml ?

The simple answer is - whatever form suits you best. I''ve seen xml
files, csv files, php code and even just plain text. It all depends on
the data and what''s easiest for you.

I would think that since your file needs to contain tables/fields and
data, xml might be easiest to parse and maintain. But that''s probably
because I''ve worked with xml a fair amount. But if you haven''t, another
form (such as csv) might be easier.

2. How to generate the (static) web pages (forms) from the flat file
bearing in mind that I would like to control over what web pages +
tables/fields/data + controls are created.

Well, you''ll have to read the file then display all of the information
on a web page. Then select the information you wish to display.
Finally, generate the page.

But maybe this is to difficult. Maybe it would be easier to have the
static web pages I want already created. The pages could have tags to
indicate where fields + controls (if available in the flat file)
should go.

You''re now talking about a templating system, which is very popular.
The nice thing about it is it takes a lot of the "grunt work" out of the
code required to generate the page. It also separates the rest of the
page from the actual data being displayed, making it easier to maintain.

I would have thought something flexible like this : generating static
web pages using data/controls from a flat file : had already been done
but I''ve not found anything yet.

I''ve used it before, when the data doesn''t change very often. It can be
very effective on high usage sites. For lower usage sites and data
which changes fairly regularly, I just generate the pages dynamically on
request.

And I think you''ll find most of the systems use a database instead of a
flat file. It makes things a lot easier - the database manages the data
for you, so you don''t have to do as much in your code. Simple SQL
requests are not that hard to learn, and if you''re going to be serious
about web development, they''re pretty much a requirement nowadays. SQL
is just too powerful to ignore.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于从平面文件创建html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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