新足迹

 找回密码
 注册

精华好帖回顾

· 更安嘅, 我们家今天也有大菜唷! (2007-12-18) 美讶 · 天籁之声专辑 (2008-5-31) 西关少爷
· E&E -- 我们家住在 Seven Hills (2010-11-29) 闲夏采薇 · 一个女中学生的往事之足球篇 (2008-3-2) 老实和尚
Advertisement
Advertisement
查看: 1954|回复: 19

asp.net 4.5 What's new (and asp.net MVC4) [复制链接]

发表于 2011-9-19 10:11 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
http://www.asp.net/vnext/whats-new

Support for WebSockets Protocol
    WebSockets protocol is a standards-based network protocol that defines how to establish    secure, real-time bidirectional communications between a client and a server over    HTTP. Microsoft has worked with both the IETF and W3C standards bodies to help define    the protocol. The WebSockets protocol is supported by any client (not just browsers),    with Microsoft investing substantial resources supporting WebSockets protocol on    both client and mobile operating systems.
    WebSockets protocol makes it much easier to create long-running data transfers between    a client and a server. For example, writing a chat application is much easier because    you can establish a real long-running connection between a client and a server.    You do not have to resort to workarounds like periodic polling or HTTP long-polling    to simulate the behavior of a socket.
    ASP.NET 4.5 and IIS 8 include low-level WebSockets support, enabling ASP.NET developers    to use managed APIs for asynchronously reading and writing both string and binary    data on a WebSockets object. For ASP.NET 4.5, there is a new System.Web.WebSockets    namespace that contains types for working with WebSockets protocol.
    A browser client establishes a WebSockets connection by creating a DOM WebSocket    object that points to a URL in an ASP.NET application, as in the following example:

新加了好多Async的支持,这个乱码应该喜欢的
websocket 是个里程碑(对MS solution 而言),以后网页的开发模式又得改改了,不再一味地依赖http了,

评分

参与人数 1积分 +3 收起 理由
乱码 + 3 你太有才了

查看全部评分

Advertisement
Advertisement

发表于 2011-9-19 10:14 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
新版本将加强client-side javascript validation,
Improved Input Validation

Web Pages provides improved tools for validating user input. Some of the new options include:
•Client-side validation, which lets you validate user input using JavaScript. This avoids round trips to the server for validation and improves the performance of your application.
•New validation classes. Classes such as System.Web.WebPages.ValidationHelper and System.Web.WebPages.Validator enable you to specify validation rules with very little code.

To validate user input using these new features, you can use an approach like the following. For details and a full-page sample, see The Top Features in Web Pages 2 Developer Preview.

发表于 2011-9-19 10:16 |显示全部楼层
此文章由 Dan.and.Andy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 Dan.and.Andy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
websocket & webgl 是html5的标准,IE9并不支持,难道MVC4要随着IE10(铁定不支持webgl)发布?

发表于 2011-9-19 10:17 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
新版本将直接支持openID的login,
比如说用户login QQ以后,就可以直接access你的系统
Enhanced Membership and Authentication

Web Pages 2 includes new authentication options that let visitors log into your site using their credentials from social networking sites such as Google, Yahoo, Facebook, Twitter, and Windows Live. After users log in, they can associate their logins with a single account on your website. New built-in providers for OAuth and OpenID authentication make it possible to add these features to your site with just a few lines of code. If you create a site based on the Starter Site template, most of this functionality is built in and all you have to do is add and uncomment a few lines of code.

发表于 2011-9-19 10:18 |显示全部楼层
此文章由 andy2001p 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 andy2001p 所有!转贴必须注明作者、出处和本声明,并保持内容完整
async 最近特流行

发表于 2011-9-19 10:19 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
谢谢兄弟阿,白条先!!

ms看来在mvc这边花大精力了,不过感觉这几年web这块它跟的太紧,http都想颠覆一下...

不过我很看好WebSockets,http不是很适合当今web的需求.
Advertisement
Advertisement

发表于 2011-9-19 10:20 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 Dan.and.Andy 于 2011-9-19 09:16 发表
websocket & webgl 是html5的标准,IE9并不支持,难道MVC4要随着IE10(铁定不支持webgl)发布?


IE 10 似乎会支持websocket,

IE 的websocket开发部分早就做好了,只是微软一直坚持标准有安全漏洞。所以IE9里没有websocket

最近MS已经表示websocket的标准已经OK了,意味着IE10应该会支持websocket

发表于 2011-9-19 10:23 |显示全部楼层
此文章由 porcorosso 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 porcorosso 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 andy2001p 于 2011-9-19 09:18 发表
async 最近特流行


我更觉得是因为市场需求。async可以让系统非常的flexible。。。典型例子:AJAX

发表于 2011-9-19 10:23 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
这是 IE Team Blog三天前发布的websocket 的东西
http://blogs.msdn.com/b/ie/
The Web gets richer and developers are more creative when sites and services can communicate and send notifications in real-time. WebSockets technology has made significant progress over the last nine months. The standards around WebSockets have converged substantially, to the point that developers and consumers can now take advantage of them across different implementations, including IE10 in Windows 8. You can try out a WebSockets test drive that shows real time, multiuser drawing that works across multiple browsers.

What is WebSockets and what does it do?

WebSockets enable Web applications to deliver real-time notifications and updates in the browser. Developers have faced problems in working around the limitations in the browser’s original HTTP request-response model, which was not designed for real-time scenarios. WebSockets enable browsers to open a bidirectional, full-duplex communication channel with services. Each side can then use this channel to immediately send data to the other. Now, sites from social networking and games to financial sites can deliver better real-time scenarios, ideally using same markup across different browsers.

What has changed with WebSockets?

WebSockets have come a long way since we wrote about them in December 2010. At that time, there were a lot of ongoing changes in the basic technology, and developers trying to build on it faced a lot of challenges both around efficiency and just getting their sites to work. The standard is now much more stable as a result of strong collaboration across different companies and standards bodies (like the W3C and the Internet Engineering Task

[ 本帖最后由 典 于 2011-9-19 09:25 编辑 ]

发表于 2011-9-19 10:31 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
可怜MVC3还没学好,MVC4就来了

评分

参与人数 1积分 +2 收起 理由
jerryclark + 2 我很赞同

查看全部评分

发表于 2011-9-19 10:42 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
用.net在现有的架构上用async还是要谨慎,毕竟大家现在默认的模式都是在一个thread下run,它对性能不一定能提升很多,但会引入潜在很难发现和调试的bug.

js在现有browser上编程就好很多,framework没有特别的复杂,server那边如果用node.js那边应该也不难.

编程方式的改变,对于很激进的team还是需要些时间来skill up的。

.net的async从技术面存在不少时间了,但工业界一直比较谨慎,应该是衡量了很多pros/cons.

从我们自己的performance report来看,用时最多的一块是在render到browser之后的那块,而不是在server side,其实.net那块是我们系统最偏平的.

我们自己的系统如果提高性能,应该在css/javascript下功夫,而不是在server这边。

[ 本帖最后由 乱码 于 2011-9-19 09:48 编辑 ]
Advertisement
Advertisement

发表于 2011-9-19 11:20 |显示全部楼层
此文章由 rumcoke 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 rumcoke 所有!转贴必须注明作者、出处和本声明,并保持内容完整
看了一下介绍websocket真的是方便的东西 不知道是不是网页游戏开发的春天

发表于 2011-9-19 11:31 |显示全部楼层
此文章由 Dan.and.Andy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 Dan.and.Andy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 rumcoke 于 2011-9-19 10:20 发表
看了一下介绍websocket真的是方便的东西 不知道是不是网页游戏开发的春天


websocket + webgl + html5 + fiber optic connection(non-NBN) 理论上可以开发出暴雪级别热销的游戏,捎带产业链催生出一些图片和建模工具,引擎的供应商,仅仅是理论上。

发表于 2011-9-19 11:38 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
什么都可能巨变

传统的web方案都是基于 client pull的,用户请求什么,服务器就发送什么,比如说你想看xxx的发贴,你是要自己去找去搜,浪费大量的带宽和服务器资源。(每1M数据里有用的数据可能不到1K)

以后的web 方案可以是 server push的了,比如说xxx一发贴,就可以直接从server push到你的页面上,

发表于 2011-9-19 11:47 |显示全部楼层
此文章由 porcorosso 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 porcorosso 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 于 2011-9-19 10:38 发表
什么都可能巨变

传统的web方案都是基于 client pull的,用户请求什么,服务器就发送什么,比如说你想看xxx的发贴,你是要自己去找去搜,浪费大量的带宽和服务器资源。(每1M数据里有用的数据可能不到1K)

以后的web 方案可以是 server push的了,比如说xxx一发贴,就可以直接从server push到你的页面上,


wepapp可以做到serverpush的话,desktopapp真的就是尽头了

发表于 2011-9-19 11:57 |显示全部楼层
此文章由 rumcoke 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 rumcoke 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 porcorosso 于 2011-9-19 10:47 发表


wepapp可以做到serverpush的话,desktopapp真的就是尽头了

类似每天早晨起床 电脑自动wakeup 然后弹窗说'hello xx 这是你今天的schedule和email'么
Advertisement
Advertisement

发表于 2011-9-19 12:15 |显示全部楼层
此文章由 乱码 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 乱码 所有!转贴必须注明作者、出处和本声明,并保持内容完整
典,it's good idea!!

server push和其他web的障碍差不多,maintain连接的state是最难以达成共识的,一但这个问题有公认的解决方案,web从infrastructure到programming将会是全新的方式。

发表于 2011-9-19 13:26 |显示全部楼层

回复 典 14# 帖子

此文章由 cdfei 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 cdfei 所有!转贴必须注明作者、出处和本声明,并保持内容完整
还是基于HTTP的,另外,如果要实现真正的server push,那client必须开端口监听?我怀疑内部实现还是由客户端定时轮询服务器端的。

WebSockets protocol is a standards-based network protocol that defines how to establish secure, real-time bidirectional communications between a client and a server over HTTP.

发表于 2011-9-19 14:02 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
我记得websocket是先建立http request / response连接

然后可以在此基础上做tcp连接,后续的交流(基于同一个页面or session ?)不再需要http request/response,其实就是类似网页上的聊天功能,这里有个IE Labs,http://html5labs.interoperabilitybridges.com/  试一下就很明白了,

这和现有的客户端的long polling模式(基于http request/response)是不同的,

找到这句话WebSockets is a technology designed to simplify much of the complexity around bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket.

http://html5labs.interoperabilitybridges.com/prototypes/websockets/websockets/info

[ 本帖最后由 典 于 2011-9-19 13:07 编辑 ]

发表于 2011-9-22 10:24 |显示全部楼层
此文章由 o2h2o 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 o2h2o 所有!转贴必须注明作者、出处和本声明,并保持内容完整
websocket  不是 html 5 的东西吗
和iis 有啥关系
应该是 browser 去支持的吧

对于这种 server push的
可以借鉴一下 apple 的 idea

整个系统 keep 一个 active的 tcp connection ,然后 dispatch 到各个 app
ios 的push notification

浏览器也可以弄类似的, 控制整个 tcp connection 的数量
统一 dispatch
可以实时 push 也 节省了 系统资源

[ 本帖最后由 o2h2o 于 2011-9-22 09:27 编辑 ]

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部