在数据层内实现表示层的缺点
在数据层内实现表示层的缺点是什么?我想这将是一种非常动态和面向性能的方式,例如,如果我编译为代码(我的意思是完全编译,甚至编译了 aspx),之后我需要进行一些设计更改,我不需要更新编译后的库我可以直接在这里进行更改。
如果我错了,请纠正我。
这是有人将其发布为缺点的链接。
whats the drawback in implementing the presentation layer inside data layer. i guess that would be much dynamic and performance oriented way to go for, for example if i compile to code (i mean full compile where even aspx is compiled) and after that i need to make some design changes, i dont need to update of compiled library i can make the changes directly here.
Please correct me if i am wrong.
Here's the link where someone posted it as a drawback.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经有一段时间没有登录了,否则我会早点回复你的。
我突然想到...
通过将静态数据放入应用程序和数据库之间的流中,您会增加数据库的负载,并可能增加流量。您的数据库不需要处理此问题,您的应用程序也不必做任何更少的工作,因此有损失,但没有收获。
你的应用程序的IDE(Visual Studio等)为你提供了一些很棒的功能——这些HTML控件的验证、智能感知等,而你的数据库则没有。
如果您使用数据库方法,则不需要更新编译的应用程序,这是正确的,但这既是好事也是坏事。好的方面是,您可以更轻松地不必重新编译。不好的部分是,您将对数据库代码的所有更新的测试推送到应用程序运行时,并在此过程中丢失 ide 所具有的许多良好的调试功能。您应该尝试在生命周期的早期捕获此类错误。
等等...
我认为如果你只是做一些小事情,并且没有很多流量或关键流程,那么你在数据库中做就可以了。但尽管这很不方便,如果您需要更认真地进行测试/调试、应用程序正常运行时间、更大的流量或其他增加的需求,重新编译对您来说会更好。
haven't logged-in for a while or i'd have answered you sooner.
just going off the top of my head...
by putting static data into the stream between your application, and your database, you're increasing the load on your database, and possibly increasing traffic. Your database isn't needed to process this, and your application won't have to do any less work, so there's a loss, but no gain.
your ide (visual studio, etc.) for your app gives you some great features -- validation, intellisense, etc. for these html controls, whereas your database does not.
You're right about not needing to update your compiled app if you use the database approach, but that's both a good and a bad thing. the good part is, it's easier for you not to have to re-complile. The bad part is, you're pushing testing for all of your updates to the database code out to the application runtime, and losing a lot of nice debugging features your ide has in the process. You should try to catch these kinds of errors lot earlier in the lifecycle.
and so on...
I think if you're just doing some small-time stuff, and don't have a lot of traffic or critical processes, then you'll be alright doing it in the database. But as inconvenient as it is, if you ever need to get more serious with testing/debugging, application up-time, heavier traffic, or other increased demands, re-compiling is going to work a lot better for you.