.NET 属性的历史前身是什么?
哪些语言或平台影响 .NET 1.0 团队从一开始就内置了属性的概念? 这是面向方面的事情吗? 序列化? 或者是其他东西? 此时我仍处于 VB6 领域,从未使用过任何 1.0 之前的 .NET 版本。
What languages or platforms influenced the .NET 1.0 Team to build-in the concept of Attributes from the very start? Was this an Aspect-Oriented thing? Serialization? or something else? I was still in VB6-land at this time, and never used any of the pre-1.0 .NET versions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道这是否是鼻祖,但他们在COM和MIDL中已经存在很长时间了。 没有用户定义的,但您必须指定方法、类型等属性,才能对 MIDL 中的契约做出具体声明。
I don't know if this is the originator, but they have been around in COM and MIDL for a long time. There weren't user-defined ones, but you had to attribute methods, types, etc, etc to make specific claims about the contracts in MIDL.
不管你相信与否,VB 和 Microsoft Transaction Server/COM+ 开发团队的经验/反馈在 .NET、属性和元数据的一些设计原理中起了一定作用。
VB6 添加了对 COM+/MTS 可以读取并确定对象应如何运行的属性/元数据的支持。 还记得类上的所有设置,例如“需要事务”、“需要新事务”等吗? 它们是有效的面向方面的属性。 某个地方有一篇很棒的 Don Box 采访,内容涉及这一切,当我再次找到它时,我会发布一个链接。
Believe it or not experiences/feedback from VB and Microsoft Transaction Server/COM+ dev teams had a bit part in some of the design rational of .NET, attributes and metadata.
VB6 added support for attributes/metadata that COM+/MTS could read and determine how an object should behave. Remember all those settings on your classes such as 'Requires Transaction', 'Requires New Transaction' and so on? They were effectively aspect orientated attributes. There's a great Don Box interview about all this somewhere, and when I find it again I'll post a link.
Delphi/Object Pascal 属性? 如果我没记错的话,Delphi 的设计者之一也是.NET 的设计者之一。 语法也类似。
Delphi/Object Pascal properties? If I remember correctly, one of the designers of Delphi is also one of the designers of .NET. The syntax is also similar.