你使用新的数据源控件吗? [英] Do you use the new datasource controls?

查看:53
本文介绍了你使用新的数据源控件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


问题的缩短版本...

您对新的ASP.NET数据源控件的体验如何?他们看起来是不是很好,或者他们是另一个无用的噱头?

华丽的管理演示?

问题的长版。 ..

当我开始使用Visual Basic 6进行编程时,有一些(我认为是新的我认为)功能应该是蜜蜂拯救

程序员时间。这些包括数据绑定控件和数据

环境(DE)。当你完成这些演示时,你很快就离开了,因为生成数据库驱动的应用程序是多么容易。对于

数据绑定控件,您刚刚向表单添加了一个ADODC控件,然后

将其他控件绑定到该控件。使用DE,您在IDE中使用图形工具

连接到数据库,然后将所需字段拖到

表单上。很棒的东西。


只要你刚刚玩,这种幸福状态就会持续下去。当你开始第一次真正的应用程序时,你发现他们并没有像你想象的那么好。有各种怪癖和怪异

意味着你必须编写额外的代码以避免被

系统困住。过了一会儿,你意识到你正在与

环境作斗争,说服它做你想做的事。你开始怀疑它是否值得它。做任何有用的代码所需的代码量

超过了你用手写完的东西所写的金额

手工。


无奈之下,你给Usenet发了一条消息(或者如果你是
是一个好网友就做了搜索),你发现这些玩具只是为了表演

。真正的程序员并没有使用它们。事实上,真正的程序员说他们对他们来说相当粗鲁!因此,在投资年龄构建你的

新应用程序后,你不得不废弃它们并从

scratch开始写。


当我看到新的ASP.NET数据控件时,我的第一个想法是,他们

是一个非常节省时间。我(立即)的第二个想法是,他们

可以很容易地再次出现相同的情况。


那么,有人评论吗?他们真的和他们看起来一样好,或者MS再次做同样的伎俩吗?我不想浪费时间和他们一起讨价还价,但是如果它们有用的话,那将是值得的。

在现实生活中因为它们似乎来自

书籍和文章中所示的简单例子。


请注释。


-

Alan Silver

(此行下面添加的任何内容都与我无关)

解决方案

SqlDataSourceControl和XmlDataSourceControl(以及除了ObjectDataSource控件之外还有其他任何
)是ASP.Net 2.0中引入的
分层编程的最大退步


我在那里没有任何问题,但它们是怎样的。

总是解释得那么浅薄。 MS需要更好地解释

良好的编码与市场营销的东西。


Karl


-

我的ASP.Net教程
http:// www。 openmymind.net/
http:// openmymind。 net / redirector.aspx?documentId = 51 - 了解AJAX!


" Alan Silver" <人********* @ nospam.thanx>在消息中写道

新闻:3L ************** @ nospamthankyou.spam ...

你好,
<问题的短版本...
您对新的ASP.NET数据源控件的体验是什么?他们看起来是不是很好,或者他们是做华而不实的管理演示的另一个无用的噱头吗?

问题的长版......
当我开始使用Visual Basic 6进行编程时,有一些(新的我认为)功能应该是蜜蜂拯救程序员时间的膝盖。这些包括数据绑定控件和数据环境(DE)。当您完成演示时,您对生成数据库驱动的应用程序的难易程度印象非常深刻。对于
数据绑定控件,您只需将ADODC控件添加到表单中,然后将其他控件绑定到该控件。使用DE,您使用IDE中的图形工具连接到数据库,然后将所需字段拖到
表单上。很棒的东西。

只要你刚刚玩,这种幸福状态就会持续下去。当你开始第一个真正的应用程序时,你发现它们并不像你想象的那么好。有各种怪癖和怪异意味着你必须编写额外的代码以避免被系统困住。
过了一会儿,你意识到你正在与环境作斗争来说服它做你想做的。你开始怀疑它是否值得。
做任何有用的代码所需的代码量超过了你手工完成整个事情后所写的数量。
无奈之下,你向Usenet发了一条消息(或者如果你是一个好网友就进行了搜索),你发现这些玩具只是为了展示
。真正的程序员并没有使用它们。事实上,真正的程序员说他们相当粗鲁!因此,在投资年龄建立你的新应用程序后,你不得不废弃它们并从头开始编写。

当我看到新的ASP.NET数据控件时,我的第一个想法是他们是一个精彩的节省时间的人。我(直接)的第二个想法是,他们可以很容易地再次出现同样的情况。

那么,有人评论吗?他们真的和他们看起来一样好,还是MS再次做同样的伎俩?如果它们成为一个问题,我不想浪费时间与它们在一起,但如果它们在现实生活中同样有用,那么它们将是值得的,因为它们似乎来自简单
书籍和文章中显示的例子。

请评论。

-
Alan Silver
(此行下面添加的任何内容都是与我没有任何关系)



我只是将我的应用程序从AccessDataSource重新命名为SqlDataSource。

工作相同,但它是'属性要好得多。

ADS使用数据文件,因此你也必须声明一个appsetting。

SqlDS可以直接使用连接字符串!

好多了。


喜欢:


< asp:SqlDataSource ID =" SqlDataSource1" runat =" server"

ConnectionString ="<%


ConnectionStrings:Mydsn%>"

ProviderName = "<%

Hello,

SHORT VERSION OF THE QUESTION...
What is your experience of the new ASP.NET datasource controls? Are they
as good as they look, or are they another useless gimmick for doing
flashy management demos?
LONG VERSION OF THE QUESTION...
When I started programming with Visual Basic 6, there were some (new I
think) features that were supposed to be the bee''s knees in saving the
programmer time. These included data bound controls and the data
environment (DE). When you went through the demos, you came away very
impressed at how easy it was to produce db-driven applications. For
data-bound controls, you just added an ADODC control to the form, then
bound the other controls to that. With the DE, you used a graphical tool
in the IDE to connect to the db, then drag the required fields onto the
form. Wonderful stuff.

This state of bliss lasted as long as you were just playing. When you
started your first real application, you discovered that they weren''t
quite as good as you thought. There were various quirks and oddities
that meant you had to write extra code to avoid being trapped by the
system. After a while, you realised that you were fighting the
environment to persuade it to do what you wanted. You began to wonder if
it was worth it. The amount of code required to do anything useful
exceeded the amount you would have written had you done the whole thing
by hand.

In desperation, you posted a message to Usenet (or did a search if you
were a Good Netizen) and you discovered that these toys were for show
only. Real Programmers didn''t use them. In fact, Real Programmers said
fairly rude things about them!! So, after investing ages building your
new app around them, you had to scrap them and write it all from
scratch.

My first thought when I saw the new ASP.NET data controls was that they
were a brilliant time-saver. My (immediate) second thought was that they
could easily be the same scenario all over again.

So, anyone any comments? Are they really as good as they look, or has MS
done the same trick again? I don''t want to waste time with them if they
are going to be a problem, but it will be worth it if they are as useful
in real life as they appear to be from the simple examples shown in the
books and articles.

Comments please.

--
Alan Silver
(anything added below this line is nothing to do with me)

解决方案

SqlDataSourceControl and XmlDataSourceControl (and whatever else there is
except for the ObjectDataSource control) is the biggest step back from
tiered programming introduced in ASP.Net 2.0

I don''t have any problems with them being there, but it''s how they are
always explained so shallowly. MS needs to do a better job of explaining
good coding vs marketting stuff.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:3L**************@nospamthankyou.spam...

Hello,

SHORT VERSION OF THE QUESTION...
What is your experience of the new ASP.NET datasource controls? Are they
as good as they look, or are they another useless gimmick for doing flashy
management demos?
LONG VERSION OF THE QUESTION...
When I started programming with Visual Basic 6, there were some (new I
think) features that were supposed to be the bee''s knees in saving the
programmer time. These included data bound controls and the data
environment (DE). When you went through the demos, you came away very
impressed at how easy it was to produce db-driven applications. For
data-bound controls, you just added an ADODC control to the form, then
bound the other controls to that. With the DE, you used a graphical tool
in the IDE to connect to the db, then drag the required fields onto the
form. Wonderful stuff.

This state of bliss lasted as long as you were just playing. When you
started your first real application, you discovered that they weren''t
quite as good as you thought. There were various quirks and oddities that
meant you had to write extra code to avoid being trapped by the system.
After a while, you realised that you were fighting the environment to
persuade it to do what you wanted. You began to wonder if it was worth it.
The amount of code required to do anything useful exceeded the amount you
would have written had you done the whole thing by hand.

In desperation, you posted a message to Usenet (or did a search if you
were a Good Netizen) and you discovered that these toys were for show
only. Real Programmers didn''t use them. In fact, Real Programmers said
fairly rude things about them!! So, after investing ages building your new
app around them, you had to scrap them and write it all from scratch.

My first thought when I saw the new ASP.NET data controls was that they
were a brilliant time-saver. My (immediate) second thought was that they
could easily be the same scenario all over again.

So, anyone any comments? Are they really as good as they look, or has MS
done the same trick again? I don''t want to waste time with them if they
are going to be a problem, but it will be worth it if they are as useful
in real life as they appear to be from the simple examples shown in the
books and articles.

Comments please.

--
Alan Silver
(anything added below this line is nothing to do with me)



I just reqrote my app from AccessDataSource to SqlDataSource.
Works identical but it''s properties are much better.
ADS uses datafile and thus you had to declare an appsetting as well.
The SqlDS can use the connection string directly!
Much better.

Like:

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%


ConnectionStrings:Mydsn %>"
ProviderName="<%


这篇关于你使用新的数据源控件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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