简体   繁体   English

ASP.NET动态数据PRO和CONS

[英]ASP.NET Dynamic Data PRO and CONS

I heard about ASP.NET Dynamic Data in ASP.NET 4. 我在ASP.NET 4中听说过ASP.NET动态数据。

I would like to know if you have implemented in real scenario web application and your opinions, specially in terms of customization. 我想知道您是否已在实际场景Web应用程序和您的意见中实现,特别是在自定义方面。

Some questions: 一些问题:

  • Can I Use custom logic to validate Fields? 我可以使用自定义逻辑来验证字段吗?
  • Is it possible add logic when User press for example a DELETE button for a specific Table? 当User按下例如特定表的DELETE按钮时,是否可以添加逻辑?

As at a first look, it seems very easy build Scaffolding but any Cons? 从第一眼看,似乎很容易建立脚手架,但任何缺点?

Thanks for your time! 谢谢你的时间! Regards 问候

I've mostly used Dynamic Data to create "developer only" back-end admin tools, where I need to access the database directly. 我主要使用动态数据来创建“仅限开发人员”的后端管理工具,我需要直接访问数据库。 For that purpose it's very convenient and extremely fast to use. 为此目的,它非常方便,使用起来非常快。

MSDN has several articles on customizing Dynamic Data: ASP.NET Dynamic Data Layer Customization: Validating Data Fields . MSDN有几篇关于自定义动态数据的文章: ASP.NET动态数据层自定义:验证数据字段 I'm sure it's flexible enough to meet your requirements. 我确信它足够灵活,可以满足您的要求。

As for pros and cons, it really depends on what you're building. 至于优点和缺点,它实际上取决于你正在建设什么。 Implementing custom designs and functionality can end up taking just as long as it would've implementing the project from scratch (regardless of what scaffolding framework you use). 实现自定义设计和功能最终只需要从头开始实施项目(无论您使用什么脚手架框架)。 So if your project is a basic data entry app, go with Dynamic Data. 因此,如果您的项目是基本数据输入应用程序,请使用动态数据。 If it's customer-facing site, I think you're probably better off using ASP.NET Webforms or MVC. 如果它是面向客户的网站,我认为你可能最好使用ASP.NET Webforms或MVC。 But that said, DD is still very handy for just accessing the data from a browser. 但话说回来,DD对于从浏览器访问数据仍然非常方便。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM