本周ASP.NET英文技術文章推薦[09/23 - 09/29]:IIS 7.0、Facebook.NET、ASP.NET AJAX、ModalPopupExtender、擴充方法、LinqDataS

來源:互聯網
上載者:User

 

摘要

本期共有8篇文章:

  1. IIS 7.0 RC0——添加了很多新功能
  2. VS.net中的starter kit——Nikhil Kothari的Facebook.NET
  3. 新項目——ASP.NET AJAX異常日誌記錄
  4. 為ModalPopupExtender添加動畫效果
  5. ASP.NET開發中常用的一些擴充方法
  6. LinqDataSource、ObjectDataSource和SqlDataSource比較
  7. 讓ListView控制項以平鋪模式顯示
  8. 15個免費的Visual Studio的外掛程式

 

[1] IIS 7.0 Hits RC0 - Lots of cool new IIS7 Extensions Also Now Available (IIS 7.0 RC0——添加了很多新功能)

Scott顯然對IIS 7抱有很大的期待。原文是這樣說的:

IIS 7 is a *major* update of our web-server stack, and introduces a significantly new and improved extensibility, configuration, and administration architecture.

確實,微軟公司在Web Server方面還處於劣勢,自然希望IIS 7能夠給它帶來好運。好在最新的IIS 7.0終於到了RC0階段,並引入了很多所謂“引人注目”的功能:

  1. IIS 7.0 Extensibility (and why it is cool)
  2. IIS 7.0 FTP Publishing Service
  3. IIS 7.0 Media Pack Bit-Rate Throttling Module
  4. IIS 7.0 Remote Manager Administration Tool
  5. FastCGI Support for IIS 5.1 and IIS 6.0

恕我魯鈍,還是沒能看出來哪些真的是那麼的利害……當然仁者見仁了。

 

[2] VS.NET starter kit for Nikhil Kothari's Facebook.NET (VS.net中的starter kit——Nikhil Kothari的Facebook.NET)

Facebook的大名如雷貫耳,微軟公司的一干人馬也做出了一個架構——Facebook.NET,用來讓開發人員更容易地在.NET環境下建立Facebook的應用程式……(誰想出來的這個創意,還真有閑心)。

另有“好事者”乾脆將這個東西做成了VS.net中的starter kit,也就是說在VS中只要建立一個Facebook.NET項目,基礎設施什麼的就已經做好了……

這個東西可以在此下載:http://www.stevetrefethen.com/files/FacebookNETStarterKit.vsi。

 

[3] New Project - Asp.net Ajax Exception Logging (新項目——ASP.NET AJAX異常日誌記錄)

ASP.NET AJAX應用程式中發生的異常也能夠被記錄下來了,使用Kazi Manzur Rashid的這個東西就可以:

<AjaxLogging:ExceptionManager ID="TheExceptionManager" runat="server">
    <Listeners>
        <AjaxLogging:WebServiceListener ServicePath="~/ExceptionLogService.asmx" ServiceMethod="Log" />
        <AjaxLogging:PanelListener Panel="pnlException" />
        <AjaxLogging:SysDebugListener />
        <AjaxLogging:AlertListener />
    </Listeners>
</AjaxLogging:ExceptionManager>

再加上一點小小的設定,效果就出來了:

 

[4] Animating the ModalPopupExtender (為ModalPopupExtender添加動畫效果)

ASP.NET AJAX Control Toolkit中的ModalPopupExtender非常有用,而且樣式看起來也非常漂亮。這篇文章就讓ModalPopupExtender“百尺竿頭,更進一步”,為其添加了動畫效果。

使用起來非常簡單:

<ajaxToolKit:ModalPopupExtender>
    <Animations>
        <OnShown>
            <% -- Fade in when first displayed %>
            <FadeIn Duration=".75" Fps="20" />                
        </OnShown>
    </Animations>
</ajaxToolKit:ModalPopupExtender>   

最終效果可以看一下這個示範頁面:http://mattberseth2.com/ModalPopupAnimationExtender/。

 

[5] ASP.NET Centric Extensions (ASP.NET開發中常用的一些擴充方法)

“擴充方法”是.NET 3.0中引入的一個新的特性,在Scott的一篇Blog中有詳細的介紹(http://weblogs.asp.net/scottgu/archive/2007/03/13/new-orcas-language-feature-extension-methods.aspx)。

這篇文章的作者就總結出了ASP.NET開發中常用的一些擴充方法,比如說這個用於TreeView的:

public static bool IsDescendantOrSelfSelected(this TreeNode node)
{
    if (node.Selected)
    {
        return true;
    }
    else if (node.ChildNodes.Count > 0)
    {
        foreach (TreeNode n in node.ChildNodes)
        {
            if (IsDescendantOrSelfSelected(n))
                return true;
        }
 
        return false;
    }
    else
    {
         return false;
    }
}

 

[6] LinqDataSource vs ObjectDataSource vs SqlDataSource (LinqDataSource、ObjectDataSource和SqlDataSource比較)

知名的高產ASP.NET技術作家、意大利人Dino Esposito對LinqDataSource、ObjectDataSource和SqlDataSource作了一番比較。不過雖然洋洋洒洒一大篇,車軲轆話繞來繞去,最後卻並沒有一個“總結性”的發言。

還發現了Dino的一個寫作特點——文中喜歡使用粗體,比如:

The purposes of LinqDataSource and ObjectDataSource are clearly different. ObjectDataSource enables you to take advantage of RAD data binding on top of your existing middle tier. LinqDataSource and related tools give you instead a quick way to build an extremely thin and to some extent, anemic, object model that, in addition, can hardly be deployed on a physically different tier.

有興趣的朋友不妨讀讀看。

 

[7] Using the ListView control in Tiled mode (Part 1) (讓ListView控制項以平鋪模式顯示)

經曆過從前各種ASP.NET控制項產生的HTML之後,乾淨清爽的ListView無疑立即受到了開發人員的歡迎。如果你還不知道ListView是什麼東西,那麼參考一下Scott的這篇Blog吧:http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx。

其實本文的內容倒沒有什麼特別“有技術含量”的地方。關鍵是其中的這張圖,非常清晰地給出了ListView、產生的HTML以及顯示介面之間的關係,讓人愛不釋手。若是技術圖書中多一些這樣的插圖,那該多好啊……

[8] 15+ Free Visual Studio Add-Ins (15個免費的Visual Studio的外掛程式)

這篇文章給出了15個非常有用的、免費的Visual Studio的外掛程式:

  1. AnkhSVN :SVN工具
  2. C# SortCode Macro:協助你排列原始碼中屬性、方法之間的相對位置(很好玩阿,也很有用!)
  3. CodeKeep Add-in:協助你儲存、尋找代碼片斷
  4. Code Style Enforcer:強迫開發人員使用某種特定的編碼規範
  5. CopySourceAsHtml:以HTML的方式拷貝原始碼,適合寫Blog的時候用……
  6. EncapsulateAllNonPrivateFields macro:將所有的非私人域用屬性包圍起來
  7. GhostDoc 2.1.1:自動、智能地產生代碼的注釋
  8. …………還有很多很多,強烈推薦
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.