在存储过程中嵌入HTML代码 [英] Embedding html code in stored procedures

查看:162
本文介绍了在存储过程中嵌入HTML代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里,我们似乎有一些开发人员认为创建吐出HTML或Javascript代码的存储过程是一件合法的事情。在我看来,这是对问题分离模式的最终滥用。正在做这样的事情,人们经常看到有人在做什么?

有几个问题:


  • 无法为应用皮肤 - 移至全新的演示文稿,如Flex,桌面窗体等。
  • 您可以防止图形设计师或UI专家在一个对他们有效的环境中工作。

  • 如果您将HTML存储(某些模板,一些在数据库中,一些在应用程序代码中),那么跟踪UI问题是非常糟糕的。

  • 没有IDE DOM /布局验证

  • 无法运行数据库,无法预览或创建原型。


We seem to have a few developers here who think creating stored procedures that spit out HTML or Javascript code is a legitimate thing to do. In my mind this is the ultimate abuse of the separation of concerns model. Is doing something like this people have often seen people doing?

解决方案

Yucko. There are a few issues:

  • Can't 'skin' the app - move to a totally new presentation like Flex, desktop forms, etc.
  • You prevent graphic designers or UI experts from working in an environment that's productive for them.
  • If you mix your HTML storage (some in templates, some in the db, some in app code), it's absolutely awful to track down UI issues.
  • No IDE DOM/layout validation
  • You can't preview or prototype without running the db.

这篇关于在存储过程中嵌入HTML代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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