Professional ASP.NET 3.5 AJAX
暫譯: 專業 ASP.NET 3.5 AJAX

Bill Evjen, Matt Gibbs, Dan Wahlin, Dave Reed

  • 出版商: Wrox Press
  • 出版日期: 2009-02-03
  • 售價: $1,760
  • 貴賓價: 9.5$1,672
  • 語言: 英文
  • 頁數: 552
  • 裝訂: Paperback
  • ISBN: 8126521767
  • ISBN-13: 9780470392171
  • 相關分類: .NETAjaxASP.NET
  • 已過版

買這商品的人也買了...

相關主題

商品描述

ASP.NET revolutionized Web application development. The platform handles many of the complexities of creating Web applications. Now ASP.NET AJAX takes the development platform even further. The lines between rich client applications and traditionally less interactive browser-based applications are being further blurred with the use of this technology.

The ASP.NET AJAX Library brings object-oriented programming to JavaScript development for modern browsers, and the ASP.NET AJAX Extensions makes it easy to write rich Web applications that communicate with the Web server asynchronously. Again, the complexities are made easy by using ASP.NET.

The new server controls that are part of ASP.NET AJAX make it simple to designate parts of the page to be updated automatically without making the user pause and wait while the data is refreshed. You can have partial page updates without writing a single line of code. Other new controls let you alert the user that background work is happening and designate regular intervals at which updates occur. In addition, the ASP.NET AJAX Control Toolkit makes it easy to make your user interface really come to life with animations, modal dialogs, transition effects, and more.

Ajax is definitely the hot buzzword in the Web application world at the moment. Ajax is an acronym for Asynchronous JavaScript and XML and, in Web application development, it signifies the capability to build applications that make use of the XMLHttpRequest object.

The creation and the inclusion of the XMLHttpRequest object in JavaScript and the fact that most upper-level browsers support the use of this object led to creation of the Ajax model. Ajax applications, although they have been around for a few years, gained greater popularity after Google released a number of notable, Ajax-enabled applications such as Google Maps and Google Suggest. These applications demonstrated the value of Ajax.

Shortly thereafter, Microsoft released a beta for a new toolkit that enabled developers to incorporate Ajax features in their Web applications. This toolkit, code-named Atlas and later renamed ASP.NET AJAX, makes it extremely simple to start using Ajax features in applications today.

Prior to Visual Studio 2008, the ASP.NET AJAX product used to be a separate application that developers were required to install on their machine and the Web server that they were working with. This release gained in popularity quite rapidly and has now been made a part of the Visual Studio 2008 offering. Not only is it a part of the Visual Studio 2008 IDE, the ASP.NET AJAX product is also baked into the .NET Framework 3.5. This means that in order to use ASP.NET AJAX, developers are not going to need to install anything if they are working with ASP.NET 3.5.

Overall, Microsoft has fully integrated the entire ASP.NET AJAX experience in that developers can easily use Visual Studio and its visual designers to work with your Ajax-enabled pages and even have the full debugging story that they would want to have with their applications. Using Visual Studio 2008, developers are now able to debug straight into the JavaScript that they are using in the pages.

In addition, it is important to note that Microsoft focused a lot of attention on cross-platform compatibility with ASP.NET AJAX. Developers will find that the Ajax-enabled applications that they build upon the .NET Framework 3.5 are able to work within all the major up-level browsers out there (e.g., FireFox and Opera).

This book is aimed at experienced ASP.NET developers looking to add AJAX to their applications, and experienced Web developers who want to move to using ASP.NET and AJAX together.

In this book, I assume that you already have an understanding of how ASP.NET works. For an in-depth discussion of ASP.NET, I recommend Professional ASP.NET 3.5 by Bill Evjen, et al. (Wrox, 2008). The focus here is on how you can extend ASP.NET applications to update portions of the page asynchronously and to add richer UI elements to a page. ASP.NET AJAX makes it easy to enrich your existing application or to design a new application to provide a better experience for users. The differences among modern browsers have been abstracted, allowing you to write to a common set of APIs and trust that the user will get the correct behavior whether they are using Internet Explorer, Firefox, or Safari.

If you know how to author ASP.NET pages, you can easily start using the Microsoft AJAX library to manipulate the browser’s Document Object Model and communicate with the server to update the user’s view of data without forcing them to wait for the entire page to be refreshed.

This book covers ASP.NET 3.5 AJAX. It does not cover ASP.NET 3.5, on which ASP.NET AJAX is built. The examples lead you from the core of what is included in the ASP.NET AJAX Library through the core controls you would first start using. You build on that using the core JavaScript library and the ASP.NET AJAX Toolkit before covering debugging, deployment, and custom control development.

The ASP.NET 3.5 release includes the Microsoft AJAX Library as well as the server controls that can be used in ASP.NET pages to extend applications, making them more rich and interactive. It does so by leveraging the ASP.NET AJAX Library, which is JavaScript that runs in the browser. The server controls and JavaScript Library work together to let you update HTML with data obtained asynchronously from the server. The ASP.NET application services are exposed to JavaScript classes in the ASP.NET AJAX Library, making authentication and personalization accessible from the browser.

Chapter 1 introduces you to ASP.NET AJAX. This book discusses the need for AJAX Libraries and explain how ASP.NET AJAX compares to other AJAX Libraries. You will see how ASP.NET AJAX is composed of client and server pieces and that you can use the client library with any server platform you choose. In Chapter 2, the focus is on the most popular and easily applied feature of ASP.NET, the UpdatePanel control. This control allows you to automatically update portions of a page asynchronously, without subjecting the user to a visible pause while the page refreshes. Chapters 3 and 4 give you some key information about working with JavaScript and how the ASP.NET AJAX Library makes development with JavaScript easier. The book then works through several key features, including control of script resources and working with the ScriptManager control in Chapter 5, the new ASP.NET 3.5 ability to work with the back button in Chapter 6, and the ASP.NET AJAX Toolkit in Chapter 7 and all it has to offer for creating rich user interfaces. The next chapter, Chapter 8, looks at how to use ASP.NET’s application services (such as the Membership and Role management systems) with ASP.NET AJAX. Chapter 9 looks at networking objects. Chapter 10 looks at working with animations in ASP.NET AJAX. Chapter 11 shows you how to develop custom AJAX controls. Chapters 12, 13, and 14 shows the reader how to incorporate Ajax in some other ASP.NET core features such as Web Parts, localization, and state management. Chapter 15 looks at what is required to test and debug Ajax applications, and finally, Chapter 16 explores how to deploy ASP.NET AJAX applications.

商品描述(中文翻譯)

ASP.NET 徹底改變了網頁應用程式的開發。這個平台處理了創建網頁應用程式的許多複雜性。現在,ASP.NET AJAX 進一步推進了開發平台。隨著這項技術的使用,豐富的客戶端應用程式與傳統上互動性較低的瀏覽器應用程式之間的界線變得更加模糊。

ASP.NET AJAX 函式庫將物件導向程式設計引入現代瀏覽器的 JavaScript 開發,而 ASP.NET AJAX 擴展則使得編寫與網頁伺服器非同步通訊的豐富網頁應用程式變得簡單。再次強調,使用 ASP.NET 可以簡化這些複雜性。

ASP.NET AJAX 的新伺服器控制項使得指定頁面部分自動更新變得簡單,而不需要使用者暫停等待數據刷新。您可以在不寫一行代碼的情況下進行部分頁面更新。其他新控制項讓您可以提醒使用者背景工作正在進行,並指定更新發生的定期間隔。此外,ASP.NET AJAX 控制工具包使得您的使用者介面能夠通過動畫、模態對話框、過渡效果等方式真正活起來。

Ajax 無疑是當前網頁應用程式世界中的熱門術語。Ajax 是非同步 JavaScript 和 XML 的縮寫,在網頁應用程式開發中,它表示利用 XMLHttpRequest 物件構建應用程式的能力。

XMLHttpRequest 物件的創建和在 JavaScript 中的包含,以及大多數高階瀏覽器對此物件的支持,促成了 Ajax 模型的誕生。雖然 Ajax 應用程式已經存在幾年,但在 Google 發布了一些著名的 Ajax 啟用應用程式(如 Google 地圖和 Google 建議)後,這些應用程式的受歡迎程度大幅上升,並展示了 Ajax 的價值。

不久之後,微軟發布了一個新工具包的測試版,使開發者能夠在其網頁應用程式中整合 Ajax 功能。這個工具包代號為 Atlas,後來更名為 ASP.NET AJAX,使得今天在應用程式中開始使用 Ajax 功能變得極其簡單。

在 Visual Studio 2008 之前,ASP.NET AJAX 產品曾是一個獨立的應用程式,開發者需要在其機器和所使用的網頁伺服器上安裝。這個版本迅速獲得了人氣,現在已成為 Visual Studio 2008 的一部分。不僅是 Visual Studio 2008 IDE 的一部分,ASP.NET AJAX 產品也已經整合到 .NET Framework 3.5 中。這意味著,為了使用 ASP.NET AJAX,開發者在使用 ASP.NET 3.5 時不需要安裝任何東西。

總的來說,微軟已經完全整合了整個 ASP.NET AJAX 體驗,開發者可以輕鬆使用 Visual Studio 及其視覺設計工具來處理 Ajax 啟用的頁面,甚至可以擁有他們希望在應用程式中擁有的完整除錯功能。使用 Visual Studio 2008,開發者現在能夠直接對他們在頁面中使用的 JavaScript 進行除錯。

此外,值得注意的是,微軟在 ASP.NET AJAX 上非常重視跨平台兼容性。開發者會發現,他們在 .NET Framework 3.5 上構建的 Ajax 啟用應用程式能夠在所有主要的高階瀏覽器中運行(例如,FireFox 和 Opera)。

本書針對有經驗的 ASP.NET 開發者,旨在幫助他們將 AJAX 添加到其應用程式中,以及有經驗的網頁開發者希望將 ASP.NET 和 AJAX 一起使用。

在本書中,我假設您已經了解 ASP.NET 的運作方式。對於 ASP.NET 的深入討論,我推薦 Bill Evjen 等人所著的 Professional ASP.NET 3.5(Wrox, 2008)。這裡的重點是如何擴展 ASP.NET 應用程式以非同步更新頁面部分,並為頁面添加更豐富的 UI 元素。ASP.NET AJAX 使得豐富現有應用程式或設計新應用程式以提供更好的使用者體驗變得簡單。現代瀏覽器之間的差異已被抽象化,讓您可以編寫通用的 API,並相信無論使用者使用 Internet Explorer、Firefox 還是 Safari,都能獲得正確的行為。

如果您知道如何編寫 ASP.NET 頁面,您可以輕鬆開始使用 Microsoft AJAX 函式庫來操作瀏覽器的文檔物件模型(Document Object Model)並與伺服器通訊,以更新使用者的數據視圖,而不需要強迫他們等待整個頁面刷新。

本書涵蓋 ASP.NET 3.5 AJAX。它不涵蓋 ASP.NET 3.5,ASP.NET AJAX 是基於此的。示例將引導您從 ASP.NET AJAX 函式庫中包含的核心內容開始,通過您首先開始使用的核心控制項。您將在此基礎上使用核心 JavaScript 函式庫和 ASP.NET AJAX 工具包,然後涵蓋除錯、部署和自定義控制項開發。

ASP.NET 3.5 版本包括 Microsoft AJAX 函式庫以及可以在 ASP.NET 頁面中使用的伺服器控制項,以擴展應用程式,使其更加豐富和互動。它通過利用在瀏覽器中運行的 ASP.NET AJAX 函式庫來實現。伺服器控制項和 JavaScript 函式庫協同工作,讓您能夠使用從伺服器非同步獲取的數據更新 HTML。ASP.NET 應用程式服務暴露給 ASP.NET AJAX 函式庫中的 JavaScript 類,使得從瀏覽器訪問身份驗證和個性化變得可行。

第一章介紹了 ASP.NET AJAX。本書討論了 AJAX 函式庫的需求,並解釋了 ASP.NET AJAX 與其他 AJAX 函式庫的比較。您將看到 ASP.NET AJAX 由客戶端和伺服器部分組成,並且您可以使用客戶端函式庫與您選擇的任何伺服器平台一起使用。在第二章中,重點是 ASP.NET 最受歡迎且易於應用的功能,即 UpdatePanel 控制項。這個控制項允許您自動非同步更新頁面部分,而不需要使用者在頁面刷新時面臨可見的暫停。第三章和第四章提供了有關使用 JavaScript 的一些關鍵信息,以及 ASP.NET AJAX 函式庫如何使 JavaScript 開發變得更簡單。本書然後將介紹幾個關鍵功能,包括在第五章中控制腳本資源和使用 ScriptManager 控制項,第六章中 ASP.NET 3.5 新增的與返回按鈕的互動能力,以及第七章中 ASP.NET AJAX 工具包及其為創建豐富使用者介面所提供的一切。接下來的第八章將探討如何使用 ASP.NET 的應用程式服務(如會員和角色管理系統)與 ASP.NET AJAX 結合使用。第九章將探討網路物件。第十章將探討在 ASP.NET AJAX 中使用動畫。第十一章將展示如何開發自定義 AJAX 控制項。第十二、十三和十四章將向讀者展示如何將 Ajax 整合到其他 ASP.NET 核心功能中,如 Web Parts、本地化和狀態管理。第十五章將探討測試和除錯 Ajax 應用程式所需的內容,最後,第十六章將探討如何部署 ASP.NET AJAX 應用程式。