分离形式和内容 [英] Separation of form and content

查看:67
本文介绍了分离形式和内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我正在考虑如何最好地分享表格和

内容的正常运行-mill web应用程序。我确定整个

书架已写在这上面,但我可以使用一些指示

作为最有用的道路进行调查。


我想最终得出的情况是能够将web开发工作分成两半 - 程序员编写后端逻辑,

和网页设计师构建网页的外观和感觉。


目前,当我们开发网页时,我们有一个网页设计师模拟
$ b $使用Dreamweaver或其他任何方式将页面移到页面上,然后将示例HTML

交给程序员,程序员随后将其硬编码到

Python / Perl / C ++脚本中什么是好的是程序员可以编写所有后端逻辑的情况,并告诉

图形设计师他必须调用哪些URL。所以,如果我们做一个数据库

查找并返回X行,我们就不必在后端显式写一个循环

,生成正确的数量HTML TABLE / TD / TR标签

等。前端将理解这个特定的查询将返回表数据,然后根据网页设计师指定的特定布局(CSS?)格式化结果。另外

理想情况下,如果数据库查找完全失败,我们可能根本不想显示表格格式,而是写出一条文本消息解释为什么

它失败了。


总之,我们不希望我们的平面设计师看到一行

服务器端代码/脚本,并且我们不希望我们的程序员发生这种情况

写一行HTML或客户端JavaScript。我意识到这是不可能实现的,但是尽可能接近会很好。


一些被吹捧为此的方便的技术包括

ASP.NET代码隐藏,Zope页面模板,ActiveX控件和DHTML。

您对这些解决方案或替代建议的想法将是

最多欢迎。


顺便说一句,如果我最好把这个发布到不同的组,

请告诉我。

谢谢,


Griff

解决方案

Griff写道:

我想最终得到的情况是能够将Web开发工作分成两半 - 程序员编写后端逻辑,
和Web设计人员构建Web的外观和感觉页面。

目前,当我们开发一个网页时,我们有一个网页设计师使用Dreamweaver或其他任何东西模拟页面,并交出样本e HTML
到程序员那里,然后他们最好将其硬编码到Python / Perl / C ++脚本等等。


获取一个体面的模板模块你选择的语言。 HTML :: Template

非常适合Perl。 Python有等价物,可能也适用于C ++。

一些被人们称之为方便的技术包括ASP.NET代码隐藏,Zope页面模板,ActiveX控件和DHTML。




ActiveX?! DHTML?令人难以置信。


-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

Home是〜/ .bashrc的地方


2004年7月19日05:47:31 -0700, gr*****@aol.com (Griff)写道:


总之,我们不希望我们的平面设计师看到一系列的服务器端代码/脚本,我们也不希望我们的程序员能够实现这一点。 >写一行HTML或客户端JavaScript。我意识到这不太可能实现,但尽可能接近会很好。


我认为这个目标可以解决你需要有人介于胶水之间的工作,因为在某些时候必须有一个界面

之间的HTML模板和真实代码。

一些被吹捧为此的方便的技术包括ASP.NET代码隐藏,Zope页面模板,ActiveX控件和DHTML。
您对这些解决方案或其他建议的看法将是最受欢迎的。




我最好的方法我们已经看过让''Page''成为一些类(在面向对象的编程意义上),它定义了

你的基本页面模板没有真实的内容 (只是样板文件

和一些占位符内容)然后是不同类型的页面,例如

作为新闻页面。或产品页面或然后是Page的子类和

添加新字段并覆盖生成页面主要guts

的方法。


当然,根据您的要求,您需要一种方法来指定这些

类。没有编写代码,或者至少写了最少的代码。


我明白在ASP.NET页面中是一个类的实例,尽管

我''我不确定决定覆盖什么是多么灵活,所以

,再加上你真正想要的东西:它适用于

数据到一个模板,而不是将模板应用于数据。

(设计师必须编写VB.NET或C#代码)


我记得围绕Apache的一些解决方案是Tomcat但是有很多b $ b很多没有意义的产品名称周围的那些使得它很难
来记住哪个软件解决了哪些问题。 JSP类似于

ASP.NET,但其他产品之一可能会以某种方式实现它,这对你来说效果更好。


另外,在我的快速谷歌搜索中,我遇到了一个名为S2

的小项目听起来很有趣:
http://www.livejournal.com/doc/s2/

从我的快速阅读中看来它似乎是为*用户*

的网站可以上传模板来自定义,例如,博客或照片

图库,或者至少那些是LiveJournal的人看起来像使用它来获得
。然而,介绍的东西似乎认为它是一般的

足以适用于你的情况。谈论语言

参考和东西让我相信,也许你的设计师

仍然需要用某种语言或其他语言写一些代码,但我

假设它是为此设计的语言具体目标。


有些人在设计师学习XSLT并获得成功的同时,他们编写XSLT模板以格式化用XML表示的原始数据。

XHTML或HTML。对于你的

设计师来说,这可能是一个很大的培训开销,但XSLT是一种声明性语言,而不是一种

编程语言,所以他们可能会发现它更容易处理

与您提到的脚本语言相比。再一次,我认为

有一部分Apache Jakarta的东西可以在你的设计师编写模板后为你处理XSLT

转换:
http://jakarta.apache.org/


最后,有很多不同的一般内容管理系统

解决方案,虽然我没有太多经验,因为每个网站我都没有... b $ b和我有过一些关系已经在内部开发了这样一个

的东西。


对不起,这一切都非常吵闹,但我正在努力给你一个想法

什么搜索找到更多的东西而不是给你具体的

答案,因为你真的需要自己探索选项

比我更了解对你和你的员工有用的东西。


祝你好运,

-Claire


"格里夫" < GR ***** @ aol.com>在消息新闻中写道:d6 ************************** @ posting.google.c om ...

:嗨那里



:我正在考虑如何最好地分离表格和

:正常的内容普通的Web应用程序。我很确定整个

:书架已写在这上面,但我可以使用一些指示

:关于最有用的道路进行调查。



:我想最终得到的情况是能够将网络拆分为b $ b:开发工作分为两半 - 程序员写回 - 结束逻辑,

:和网页设计师建立网页的外观和感觉。



:目前,当我们开发一个网页,我们有一个网页设计师模拟

:使用Dreamweaver或其他任何页面上传,并将示例HTML

:交给程序员,然后将其硬编码为最好能进入

:Python / Perl / C ++脚本等。



也许您应该考虑让程序员编写高级模板

框架,设计者可以在HTML中添加/插入自定义标签。

示例标签可能类似于SSI #include。这样,当主脚本处理HTML模板时,也会处理自定义标记



自定义标签可以像您一样复杂,从简单的包含到阅读

数据库并输出HTML。然后在脚本中对HTML进行手动编码可以显着减少



:什么是好的情况

:程序员可以编写所有的后端逻辑,只需告诉

:图形设计师他必须调用哪些URL。



这个框架的另一个方面是专门用于表单处理。

表单处理程序脚本应该用来代替自定义标签。


:所以,如果我们做一个数据库

:查找并返回X行,我们不必显式写一个循环

:在后端生成正确数量的HTML TABLE / TD / TR标签

:等。前端将理解这个特定的查询是

:要返回表数据,然后根据网页设计师指定的

:特定布局(CSS?)格式化结果。另外

:理想情况下,如果数据库查找完全失败,我们可能不希望

:显示表格格式,但写出一条短信解释原因

:失败。



自定义标签或2可以处理此示例要求,具体取决于

on不同输出格式的数量。


:总之,我们不希望我们的平面设计师看到一行

:服务器端代码/脚本编写,我们不希望我们的程序员发生这种情况

:写一行HTML或客户端JavaScript。我意识到这是

:不太可能实现,但尽可能接近会很好。



嗯,它实际上是可以实现的因为我们一直在使用

我们的产品WebCharm CMS来实践这种方法。我们的网络托管服务包括访问WebCharm CMS功能

,因此我们的客户也可以受益。


:一些被吹捧为方便的技术为此包括

:ASP.NET代码隐藏,Zope页面模板,ActiveX控件和DHTML。

:您对这些解决方案或替代建议的想法将是

:非常欢迎。



如果你有资源并计划自己开发自定义标签框架

那么Zope ,ASP.NET,PHP等都会这样做。您可以将WebCharm CMS

添加到您的列表中,但是一个主要区别是我们的产品预先打包了

特定功能,供设计人员使用(即没有服务器 - 边编程)。


HTH,


-


www.webcharm.ca - 综合内容管理网站托管


Hi there

I''m after some suggestions as to how one might best separate form and
content in a normal run-of-the-mill web application. I''m sure whole
bookshelves have been written on this, but I could use some pointers
as to the most helpful roads to investigate.

The situation I''d like to end up with is the ability to split web
development work into two halves - programmers writing back-end logic,
and web designers building the look and feel of web pages.

At the moment, when we develop a web page, we have a web designer mock
up the page using Dreamweaver or whatever, and hand the sample HTML
over to the programmers, who then hardcode it as best they can into
Python/Perl/C++ scripts etc. What would be nice is a situation where
the programmers can write all the back-end logic, and just tell the
graphic designer what URLs he has to call. So, if we do a database
lookup and it returns X rows, we don''t have to explicitly write a loop
at the back end generating the right number of HTML TABLE/TD/TR tags
etc. The front end would "understand" that this particular query is
going to return table data, and then format the results according to a
particular layout (CSS ?) as specified by the web designer. Plus
ideally, if the database lookup completely fails, we might not want to
show a table format at all but write out a text message explaining why
it failed.

In summary, we don''t want our graphic designer to EVER see a line of
server side code/scripting, and we don''t want our programmers to EVER
write a line of HTML or client-side JavaScript. I realise this is
unlikely to be achievable, but as close as possible would be good.

Some technologies which have been touted as handy for this include
ASP.NET code-behinds, Zope page templates, ActiveX controls and DHTML.
Your thoughts on these solutions or alternative suggestions would be
most welcome.

By the way, if I would do better posting this to a different group,
please let me know.

Thanks,

Griff

解决方案

Griff wrote:

The situation I''d like to end up with is the ability to split web
development work into two halves - programmers writing back-end logic,
and web designers building the look and feel of web pages.

At the moment, when we develop a web page, we have a web designer mock
up the page using Dreamweaver or whatever, and hand the sample HTML
over to the programmers, who then hardcode it as best they can into
Python/Perl/C++ scripts etc.
Get a decent templating module for your languages of choice. HTML::Template
is nice for Perl. There are equivalents for Python, and probably for C++.
Some technologies which have been touted as handy for this include
ASP.NET code-behinds, Zope page templates, ActiveX controls and DHTML.



ActiveX?! DHTML?! The mind boggles.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


On 19 Jul 2004 05:47:31 -0700, gr*****@aol.com (Griff) wrote:


In summary, we don''t want our graphic designer to EVER see a line of
server side code/scripting, and we don''t want our programmers to EVER
write a line of HTML or client-side JavaScript. I realise this is
unlikely to be achievable, but as close as possible would be good.
I think for this goal to work out you''d need someone in between doing
the gluework, since at some point there has to be an interface between
an HTML template and "real code".
Some technologies which have been touted as handy for this include
ASP.NET code-behinds, Zope page templates, ActiveX controls and DHTML.
Your thoughts on these solutions or alternative suggestions would be
most welcome.



The best approaches I''ve seen have involved making a ''Page'' be some
kind of class (in the object-oriented programming sense) which defines
your basic page template with no real "content" (just the boilerplate
and some placeholder content) and then different kinds of page, such
as a "news page" or a "product page" are then subclasses of Page and
add new fields and override the method which produces the main "guts"
of the page.

Of course, for your requirements you need a way to specify these
"classes" without writing code, or at least with writing minimal code.

I understand that in ASP.NET pages are instances of a class, although
I''m not sure how flexible it is with deciding what to override and so
forth, plus that''s really the opposite of what you want: it applies
the data to a template rather than applying a template to the data.
(designers would have to write VB.NET or C# code)

I recall some solutions surrounding Apache''s Tomcat but there are so
many "meaningless" product names surrounding that which make it hard
to remember which software solves which problems. JSP is similar to
ASP.NET, but one of the other products might do it in a way which
works better for you.

Also, in my quick Googling I encountered a small project called S2
which sounds interesting:
http://www.livejournal.com/doc/s2/
From my quick reading it seems to be designed for sites where *users*
can upload templates to customise, for example, a weblog or a photo
gallery, or at least that''s what the guys at LiveJournal seem to be
using it for. The introduction stuff seems to think it''s general
enough to apply in your case too, though. The talk of "language
reference" and stuff leads me to believe that maybe your designers
would still have to write some code in some language or other, but I
assume it''s a language designed for this specific goal.

Some have enjoyed success with having the designers learn XSLT and
them writing XSLT templates to format raw data expressed in XML into
XHTML or HTML. This might be a big training overhead for your
designers, but XSLT is a declarative language rather than a
programming language so they will probably find it more easy to deal
with than the scripting languages you mentioned. Again, I think
there''s a part of the Apache Jakarta stuff which can handle the XSLT
transforms for you once your designers have written the templates:
http://jakarta.apache.org/

Finally, there are lots of different general content management system
solutions out there, although I''ve not had much experience with them
since every site I''ve had some relationship with has developed such a
thing in-house.

Sorry that this is all very vaugue, but I''m trying to give you an idea
of what to search for to find more stuff rather than give you concrete
answers, since you really need to explore the options yourself as you
know better than I do what will work for you and your staff.

Good luck,
-Claire


"Griff" <gr*****@aol.com> wrote in message news:d6**************************@posting.google.c om...
: Hi there
:
: I''m after some suggestions as to how one might best separate form and
: content in a normal run-of-the-mill web application. I''m sure whole
: bookshelves have been written on this, but I could use some pointers
: as to the most helpful roads to investigate.
:
: The situation I''d like to end up with is the ability to split web
: development work into two halves - programmers writing back-end logic,
: and web designers building the look and feel of web pages.
:
: At the moment, when we develop a web page, we have a web designer mock
: up the page using Dreamweaver or whatever, and hand the sample HTML
: over to the programmers, who then hardcode it as best they can into
: Python/Perl/C++ scripts etc.
:
Perhaps you should consider having programmers write a high-level templating
framework where custom tags can be added/inserted in the HTML by the designers.
An example tag might be similar to SSI #include. This way, the custom tags are
also processed when the HTML template is processed by the main script. The
custom tags can be as complex as you like, from simple include to reading a
database and outputing HTML. Handcoding of HTML within scripts can then be
reduced significantly.

: What would be nice is a situation where
: the programmers can write all the back-end logic, and just tell the
: graphic designer what URLs he has to call.
:
This is another aspect of the framework that is specialized for form processing.
Form handler scripts should be written in place of custom tags.

: So, if we do a database
: lookup and it returns X rows, we don''t have to explicitly write a loop
: at the back end generating the right number of HTML TABLE/TD/TR tags
: etc. The front end would "understand" that this particular query is
: going to return table data, and then format the results according to a
: particular layout (CSS ?) as specified by the web designer. Plus
: ideally, if the database lookup completely fails, we might not want to
: show a table format at all but write out a text message explaining why
: it failed.
:
A custom tag or 2 would be able to handle this example requirement, depending
on the number of different output formats.

: In summary, we don''t want our graphic designer to EVER see a line of
: server side code/scripting, and we don''t want our programmers to EVER
: write a line of HTML or client-side JavaScript. I realise this is
: unlikely to be achievable, but as close as possible would be good.
:
Well, it is actually achievable since we have been practicing this approach using
our product, WebCharm CMS. Access to WebCharm CMS functionality is
included in our web hosting services offering so our clients can benefit as well.

: Some technologies which have been touted as handy for this include
: ASP.NET code-behinds, Zope page templates, ActiveX controls and DHTML.
: Your thoughts on these solutions or alternative suggestions would be
: most welcome.
:
If you have the resources and plan to develop the custom tag framework yourself
then Zope, ASP.NET, PHP and the likes will do. You can add WebCharm CMS
to your list, however one major difference is our product is pre-packaged with
specific functionality, to be used by designers (i.e. no server-side programming).

HTH,

--
Long
www.webcharm.ca - Integrated content management web hosting


这篇关于分离形式和内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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