本周ASP.NET英文技术文章推荐[09/30- 07/13]:.NET Framework、JSON、Google Analytics、文件上传、GridView、IIS 7、Web开发

 

摘要

本期共有9篇文章:

  1. .NET Framework源代发发布
  2. Tip/Trick:在.NET 3.5中编写ToJSON扩展方法
  3. 在Google Analytics中统计访客浏览器的Silverlight启用状况
  4. 使用文本编辑器开发并部署ASP.NET Web应用程序
  5. 在ASP.NET 2.0中编写类似Gmail的文件上传系统
  6. 各种非微软数据库在.NET环境下Driver的列表
  7. 2007年的10个非常有用的Web开发相关文章
  8. 可直接编辑的GridView
  9. 在Windows XP、2k3和Vista中远程管理IIS 7

 

[1] Releasing the Source Code for the .NET Framework Libraries (.NET Framework源代发发布)

Scott在Blog中声称微软公司将部分公开.NET Framework的源代码,为避免曲解,这里引用他的原文,如下:

We'll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows).  We'll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ).  The source code will be released under the Microsoft Reference License (MS-RL).

源代码发放的许可是MS-RL,这是一个非常严格的许可,通俗来讲就是让你看看而已,别的就别想干了……不过确实能够在调试的时候方便不少,例如:

更多相关介绍以及使用方法也可以参考这篇文章:http://blogs.msdn.com/sburke/archive/2007/10/04/channel-9-video-more-details-on-reference-source.aspx

 

[2] Tip/Trick: Building a ToJSON() Extension Method using .NET 3.5 (Tip/Trick:在.NET 3.5中编写ToJSON扩展方法)

.NET 3.5中的扩展方法非常有意思,似乎让框架本身有了那么一些“动态语言”的特性。Scott这里给出了一个ToJSON扩展方法,让我们能够将一个对象转化为JSON表示的字符串。该ToJSON()方法的定义很简单:

使用起来则更加直观:

 

[3] Tracking Silverlight-enabled Browsers via Analytics (在Google Analytics中统计访客浏览器的Silverlight启用状况)

Google Analytics功能非常强大,不过尚不能统计访客浏览器的Silverlight启用状况。Nikhil Kothari因此写了这样一段JavaScript,让Google Analytics也能够把这部分信息收入囊中:

function onLoad() {
    var version = getSilverlightVersion();
    if (version) { __utmSetVar(version); }
}
 
function getSilverlightVersion() {
    var version = '';
    var container = null;
    try {
        var control = null;
        if (window.navigator.userAgent.indexOf('MSIE') >= 0) {
            control = new ActiveXObject('AgControl.AgControl');
        }
        else {
            if (navigator.plugins['Silverlight Plug-In']) {
                container = document.createElement('div');
                document.body.appendChild(container);
                container.innerHTML= '<embed type="application/x-silverlight" src="data:," />';
                control = container.childNodes[0];
            }
        }
        if (control) {
            if (control.isVersionSupported('1.1')) { version = 'Silverlight/1.1'; }
            else if (control.isVersionSupported('1.0')) { version = 'Silverlight/1.0'; }
        }
    }
    catch (e) { }
    if (container) {
        document.body.removeChild(container);
    }
    return version;
}

 

[4] Using a Text Editor to Develop and Deploy an ASP.NET Web Application (使用文本编辑器开发并部署ASP.NET Web应用程序)

想象一下,如果有一天没有了Visual Studio,那么已经被宠坏了的我们还能不能完整地开发并部署一个ASP.NET应用程序?

虽然这样的假设似乎有些过分,不过在有些时候(例如服务器环境,或是编写自动化配置脚本时)仍有使用的必要。而且,了解这些知识也能让我们更加深入地理解ASP.NET乃至.NET Framework。

本文正是介绍了离开IDE,使用文本编辑器开发并部署ASP.NET Web应用程序的方法。包括:

  1. Creating our Sample Application
  2. Compiling Our Sample Application
  3. Launching Our Sample Application in a Web Browser
  4. Deploying Our Sample Application

 

[5] Building a Gmail Style File Uploading System using ASP.NET 2.0 (在ASP.NET 2.0中编写类似Gmail的文件上传系统)

Gmail的文件上传系统显得非常的Cool——只要用户选择了一个文件,就不用再理睬了。页面将在用户书写邮件正文的时候异步地将文件上传到服务器中,并在过程中给用户充分的提示,显得非常专业、易用。

本文就介绍了在ASP.NET 2.0中编写类似功能的方法,自然使用到了iframe。包含如下内容:

  1. Introduction
  2. More about INPUT HTML Control
  3. Using the IFRAME HTML tag
  4. How it works?
  5. Live Demo
  6. Downloads
  7. Summary

 

[6] Database Drivers not provided by Microsoft (各种非微软数据库在.NET环境下Driver的列表)

文如其名,列出了各种非微软数据库在.NET环境下Driver的列表,包括Oracle、MySQL、SQLite 3、NHibernate和PostgreSQL。

 

[7] 10 cool web development related articles in 2007 (2007年的10个非常有用的Web开发相关文章)

真的非常不错的10篇文章,绝对让人大开眼界。每一篇都值得我们仔细阅读:

  1. 13 disasters for production website and their solutions
  2. Build Google IG like Ajax Start Page in 7 days using ASP.NET Ajax and .NET 3.0
  3. Serve extensionless URL from ASP.NET without using ISAPI module or IIS 6 Wildcard mapping
  4. Request format is unrecognized for URL unexpectedly ending in /SomeWebServiceMethod
  5. Cleanup inactive anonymous users from ASP.NET Membership Tables
  6. Prevent Denial of Service (DOS) attacks in your web application
  7. ASP.NET Ajax Extender for multi-column widget drag & drop
  8. ASP.NET Ajax in-depth performance analysis
  9. Think you know how to write UPDATE statement? Think again.
  10. Make a surveillance application which captures desktop and then emails you as attachment

 

[8] EditableGridView (可直接编辑的GridView)

所谓可直接编辑的GridView,就是指GridView中的数据可以在鼠标点击后直接进行编辑(inplace editing)。效果可以看一下:

Screenshot - EditableGridView.gif

这篇文章就借助于ASP.NET AJAX框架为GridView实现了这样的一个扩展器控件。无论从使用、还是学习的角度来看,都是个不错的项目。

 

[9] Remote Administration: Managing IIS 7 (RCO) from Windows XP, 2k3 and Vista (在Windows XP、2k3和Vista中远程管理IIS 7)

非常不错的一篇文章。其中图文并茂地详细介绍了IIS 7中的这个远程管理的新工具的下载、安装、配置以及使用方法。

XP中启动界面如下:

然后:

posted on 2007-10-13 01:42  Dflying Chen  阅读(10649)  评论(17编辑  收藏  举报