简体   繁体   English

.NET Framework 3.5中有哪些有用的新ASP.NET功能?

[英]What are the useful new ASP.NET features in the .NET Framework 3.5?

I've kept up to date with new features in the C# language as it's moved from version 1 through version 3. I haven't done such a good job keeping up to date with ASP.NET. 我一直在使用C#语言中的新功能,因为它从版本1移到了版本3.我还没有做好与ASP.NET保持同步的好工作。 I feel like some of the post version 1 features are not so good (eg the AJAX framework) or are just not that useful to me (eg the membership framework). 我觉得一些post版本1的功能不太好(例如AJAX框架)或者对我来说没有用(例如成员资格框架)。 Can anyone recommend any new killer ASP.NET features that might have gone unnoticed? 任何人都可以推荐任何可能未被注意到的新的杀手级ASP.NET功能吗?

For ASP.NET, you have a lot of improvements: 对于ASP.NET,您有很多改进:

  • split view (code and design) 拆分视图(代码和设计)
  • faster switching between code and design view 代码和设计视图之间的更快切换
  • embedded master pages (one master page in another) 嵌入式母版页(另一个母版页)
  • javascript debugging javascript调试

Anyway most of the useful stuff are really in the meat of the language, and for .NET 3.5 the new language features for C# 3.0 will be (and yes, I find ALL of them useful) 无论如何,大多数有用的东西都是真正的语言,而对于.NET 3.5,C#3.0的新语言功能将是(并且是的,我发现它们都很有用)

  • anonymous objects 匿名对象
  • automatic properties 自动属性
  • object initializers 对象初始化器
  • collection initializers (inline initialization for collections) 集合初始值设定项(集合的内联初始化)
  • implicit typing (var keyword) 隐式类型(var关键字)
  • lambda expressions lambda表达式
  • LINQ LINQ
  • Extension methods 扩展方法

I might have forgotten a few, but I think this is about most of the new cool and useful stuff. 我可能已经忘记了一些,但我认为这是关于大多数新的酷有用的东西。

Check out the MVC framework which is built ontop of 3.5. 查看构建在3.5之上的MVC框架 Big improvement over the traditional webforms model. 与传统的webforms模型相比有了很大的改进。

我还在学习ASP.net,所以我无法准确地告诉你,但如果你浏览http://www.asp.net/learn/,你可能会发现一些新的宝石,甚至还有3.5节。

ListView and its friend DataPager are probably worth looking at, but they're hardly "Killer" features. ListView和它的朋友DataPager可能值得一看,但它们几乎不是“杀手”功能。

Things outside of ASP.NET specifically (LINQ, for example) are probably more likely to be get the "Killer" commendation. ASP.NET之外的事情(例如LINQ)可能更有可能得到“杀手”的称赞。

Its the MVC framework . 它的MVC框架 Without 3.5, there is no MVC. 没有3.5,没有MVC。 Without MVC, ASP.NET is a PITA. 没有MVC,ASP.NET就是PITA。

Master Pages 母版页

(of course, these are in there from version 2.0) (当然,这些都是2.0版本)

Nested master pages are new in 3.5. 嵌套母版页是3.5中的新内容。 I haven't used them yet, but I can only imagine they could turn into a hidious nightmare if not used very carefully. 我还没有使用它们,但我只能想象如果不仔细使用它们就会变成一个阴险的噩梦。

You only have to look at the order in which the events are fired in a page that uses a master page to think 'urgh'. 您只需要使用母版页来思考'urgh'的页面中查看触发事件的顺序

I don't think the MVC Framework is quite ready for prime time yet 我认为MVC框架尚未准备好迎接黄金时段

Just an FYI, this site is built in MVC. 仅仅是一个FYI,这个站点是用MVC构建的。 I also have 2 apps in production on mvc, I would argue that its definitely ready for prime time. 我在mvc上也有2个应用程序正在制作中,我认为它绝对准备好迎接黄金时段。

@IainMH嵌套的主页总是由ASP.NET支持,而不是由设计者支持。

As others have said, there's a good list at www.asp.net/learn . 正如其他人所说,在www.asp.net/learn上有一个很好的列表。 I think the biggest ASP.NET specific changes are: 我认为ASP.NET最具体的变化是:

  • Official ASP.NET AJAX integration 官方ASP.NET AJAX集成
  • ListView (much better than the GridView / DataView in that they let you write out clean HTML) ListView(比GridView / DataView要好得多,因为它们可以让你写出干净的HTML)
  • Big improvements to the IDE for CSS / HTML editing 用于CSS / HTML编辑的IDE的重大改进
  • Javascript debugging Javascript调试

Note that ASP.NET MVC is not released yet, and was definitely not included with ASP.NET 3.5. 请注意,ASP.NET MVC尚未发布,并且绝对不包含在ASP.NET 3.5中。

Here's a brief list of my favourites: 这是我最喜欢的简短列表:

  • LINQ LINQ
  • Extension Methods 扩展方法
  • Lambda Methods Lambda方法

And I don't actually use ASP.NET, but ASP.NET AJAX is now included in 3.5 too and ASP.NET MVC is included in 3.5 SP1. 我实际上并没有使用ASP.NET,但ASP.NET AJAX现在也包含在3.5中,而ASP.NET MVC包含在3.5 SP1中。

I don't think the MVC Framework is quite ready for prime time yet, though I definitely plan to use it sometime next year. 我认为MVC框架还没有为黄金时间做好准备,尽管我明确计划在明年的某个时候使用它。 I love the clean URLs, clean XHTML (web forms can really spew out some nasty HTML) and the ability to create controller actions with no associated view. 我喜欢干净的URL,干净的XHTML(Web表单可以真正喷出一些讨厌的HTML)以及创建没有关联视图的控制器操作的能力。

I've been using Master Pages since they were released and they've been a big help. 我一直在使用Master Pages,因为它们已经发布,并且它们是一个很大的帮助。 I do really dislike the way the master pages add the nasty prefixes to the control IDs. 我真的不喜欢母版页添加令人讨厌的前缀到控件ID的方式。 It makes for some ugly CSS. 这使得一些丑陋的CSS。 I think the MVC Framework may eliminate this problem though. 我认为MVC框架可能会消除这个问题。

Any other killer features? 还有其他杀手锏吗?

The split design/code view is pretty cool. 拆分设计/代码视图非常酷。 It's not perfect yet, but it's pretty cool. 它还不完美,但它非常酷。 Also editing in the design view now edits your css there and then. 此外,在设计视图中进行编辑现在可以在那里编辑css。

还必须考虑动态数据

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

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