Cover image for Beginning Ajax with ASP .NET /$cWallace B. McClure ... [et al.]
Title:
Beginning Ajax with ASP .NET /$cWallace B. McClure ... [et al.]
Publication Information:
Indianapolis, IN : Wiley Pub, 2006
ISBN:
9780471785446
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010108398 TK5105.8885.A26 B435 2006 Open Access Book Book
Searching...
Searching...
30000010127835 TK5105.8885.A26 B435 2006 Open Access Book Book
Searching...

On Order

Summary

Summary

Ajax has the power to revolutionize the way web-based applications are designed. This book provides you with a thorough working knowledge of what Ajax has to offer and how to take full advantage of it in your application development.


Following an exploration of how Ajax works with .NET, you'll get acquainted with DHTML, the role of JavaScript and the Document Object Model, and the XMLHttpRequest Object, which is the foundation of Ajax. Then you will examine the Ajax-type features built into ASP.NET and explore the Ajax.NET Professional Library in detail. Finally, you will explore client scripting as well as building and using controls with Microsoft's Atlas. With an entire chapter devoted to debugging, you will have all you need to use this cutting-edge technology.

What you will learn from this book
* What you can do with the open source Ajax.NET Professional Library
* How to use the corresponding functionality, Asynchronous Client Script Callbacks, that comes with ASP.NET 2.0
* Techniques for using the XMLHttpRequest Object to communicate between the client web browser and the server
* An overview of XML, XSLT, and other ways to send data between client and server
* How to integrate Microsoft's Atlas with many of the services available in ASP.NET 2.0

Who this book is for

This book is for programmers who use ASP.NET and are just starting to use Ajax technologies to create more responsive, modern applications.

Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.


Author Notes

Wallace B. "Wally" McClure graduated from the Georgia Institute of Technology in 1990 with a Bachelor of Science degree in electrical engineering. He continued his education there, receiving a master's degree in the same field in 1991. Since that time, he has done consulting and development for such organizations as The United States Department of Education, Coca-Cola, Bechtel National, Magnatron, and Lucent Technologies, among others. Products and services have included work with ASP, ADO, XML, and SQL Server, as well as numerous applications in the Microsoft .NET Framework. Wally has been working with the .NET Framework since the summer of 2000. Wally McClure specializes in building applications that have large numbers of users and large amounts of data. He is a Microsoft MVP and an ASPInsider, and a partner in Scalable Development, Inc. You can read Wally's blog at http://weblogs.asp.net/wallym.
Wally and coauthor Paul Glavich also co-host the ASP.NET Podcast. You can listen to it at www.aspnetpodcast.com. In addition, Wally travels around the southeast United States doing user group talks and sessions at various CodeCamps.
When not working or playing with technology, Wally tries to spend time with his wife Ronda and their two children, Kirsten and Bradley. Occasionally, Wally plays golf and on July 30, 2005, broke par on a real golf course for the first time in his life. If he hadn't been there, he would not have believed it.

Scott Cate is the President of myKB.com, Inc., in Scottsdale, Arizona. myKB.com, Inc., is a technology company specializing in commercial ASP.NET applications. His product line includes myKB.com (knowledge base software), kbAlertz.com (Microsoft knowledge base notifications), and EasySearchASP.net (a pluggable search engine for ASP.NET sites). Scott also runs AZGroups.com (Arizona .NET user groups), one of the largest and most active user group communities in the country, and is a member of ASPInsiders.com, a group devoted to giving early feedback to the Microsoft ASP.NET team. In addition, Scott has coauthored the novel Surveillance , which can be found at http://surveillance-the-novel.com.

Paul Glavich is currently an ASP.NET MVP and works as a senior technical consultant for Readify. He has over 15 years of industry experience ranging from PICK, C, C++, Delphi, and Visual Basic 3/4/5/6 to his current specialty in .NET C++ with C#, COM+, and ASP.NET. Paul has been developing in .NET technologies since .NET was first in beta and was technical architect for one of the world's first Internet banking solutions using .NET technology. Paul can be seen on various .NET related newsgroups, has presented at the Sydney .NET user group (www.sdnug.org) and is also a board member of ASPInsiders (www.aspinsiders.com). He has also written some technical articles that can be seen on community sites, such as ASPAlliance.com (www.aspalliance.com).
On a more personal note, Paul is married with three children and two grandkids, and holds a third degree black belt in budo-jitsu.

Craig Shoemaker can't sit still. As the host of the Polymorphic Podcast (polymorphicpodcast.com), Craig teaches on topics as timely as software architecture and as cutting edge as the latest Ajax technologies. Whether he's writing for CoDe Magazine , ASPAlliance, or DotNetJunkies or speaking at local user groups, Southern California Code Camp, or VSLive!, Craig loves to share his passion for the art and science for software development. Craig is also a full-time software engineer for Microsoft Certified Partner PDSA, Inc. (pdsa.com) in Tustin, California.


Table of Contents

Acknowledgmentsp. ix
Introductionp. xix
Chapter 1 Introduction to Ajax on ASP.NETp. 1
Development Trendsp. 1
ASP.NET Developmentp. 2
Design Methodologyp. 2
Problems ASP.NET Solvesp. 2
So, What's the Problem?p. 4
Improving the User Experiencep. 5
What Is Ajax?p. 6
Advantages of Ajaxp. 6
History of Ajaxp. 7
Technologies That Make Up Ajaxp. 8
Running Ajax Applicationsp. 8
Who's Using Ajax?p. 9
Problems Ajax Won't Solvep. 9
Summaryp. 10
Chapter 2 Introduction to DHTMLp. 11
What JavaScript Is, and What It Isn'tp. 11
General Rules of JavaScriptp. 12
Writing Your First Block of JavaScript Codep. 13
document.write()p. 14
Using document.write() in Nested for() Loopsp. 14
window.status and Eventsp. 16
Getting Input from the Userp. 17
Security Concerns When Getting Text Inputp. 18
Canceling the Normal Outcome of an Eventp. 18
Causing an Event Not to "Bubble Up"p. 19
Working with Imagesp. 19
Working with the image src Attributep. 20
Using Functionsp. 20
Programmatically Populating the Options in [left angle bracket]select[right angle bracket]p. 21
Using the innerHTML Propertyp. 23
Manipulating the Style Sheetp. 24
Creating a Context Menup. 26
Summaryp. 27
Chapter 3 JavaScript and the Document Object Modelp. 29
From Static to Dynamic - A Brief Historyp. 30
Attempts at Standardizationp. 30
Digging into Some More JavaScript Basicsp. 31
Functions and Syntaxp. 33
Event Handlersp. 34
Core Languagep. 35
Variablesp. 35
Commentsp. 35
Datatypesp. 36
Operators and Expressionsp. 39
Flow Control and Loopsp. 40
More on Objects and Functionsp. 43
Summary of Material So Farp. 51
The Document Object Modelp. 51
Object Model Standardization (or Lack Thereof)p. 53
Working with the DOMp. 57
Manipulating Nodesp. 62
Properties of a Nodep. 64
DOM Level 0 General Collectionsp. 69
The DOM, Styles, and CSSp. 70
Summaryp. 74
Chapter 4 The XMLHttpRequest Objectp. 77
Code Examples for This Chapterp. 77
What Is the XMLHttpRequest Object?p. 78
A Little Historyp. 78
Synchronous Requestsp. 81
Asynchronous Requestsp. 82
Dealing with Response Datap. 84
Enhancing Usabilityp. 88
Passing Parameters to the Serverp. 93
What about Web Services?p. 97
Summaryp. 102
Chapter 5 Data Communication: XML, XSLT, and JSONp. 103
XMLp. 104
History of XMLp. 104
XML Documentsp. 105
Parsing XMLp. 111
XML Summaryp. 112
XSLTp. 112
How Processing Occursp. 112
Built-in Functionsp. 114
Processing with XSLTp. 116
Writing Functions in XSLTp. 120
X Pathp. 121
Integrating XML and Ajaxp. 122
JSONp. 124
Layout of JSONp. 124
JSON Examplep. 125
Summaryp. 126
Chapter 6 What Is Built into ASP.NETp. 127
Out-of-the-Box Controlsp. 127
TreeView Controlp. 128
GridView Controlp. 129
DetailsView Controlp. 132
Browser Compatibilityp. 132
The Frameworkp. 133
ICallbackEventHandler Interfacep. 133
Page.ClientScript - System.Web.UI.ClientScriptManagerp. 134
Making All the Moving Parts Work Togetherp. 135
Obtaining a Callback Referencep. 135
Implementing the ICallbackEventHandler Interfacep. 136
Initiating the Asynchronous Process from the Browserp. 138
Handling the Result of Asynchronous Server-Side Call on the Clientp. 138
Handling Errors in the Asynchronous Processp. 141
Dealing with Complex Datap. 144
Enabling the Page for Asynchronous Callbacksp. 145
Obtaining the Data - Implementing the ICallbackEventHandler interfacep. 146
Dealing with the Returned Data on the Clientp. 149
Limitations on Returning Complex Data in XMLp. 154
ICallbackContainer Interfacep. 154
Summaryp. 156
Chapter 7 Ajax.NET Professional Libraryp. 159
Acquiring Ajax.NET Pro Version 6.4.16.1p. 160
Preparing Your Applicationp. 160
Using the Ajax.NET Pro Libraryp. 161
Registering Your Page for Ajax.NET Prop. 163
Registering Your Methods for Ajax.NET Prop. 163
Examining the Request Objectp. 164
Executing Your Ajax on the Clientp. 165
Digging into response.valuep. 167
Returning Custom Objectsp. 169
More Advanced Callbacks and Contextp. 170
Ajax.NET Pro Request Events - Keeping Your Users Updatedp. 172
Errors, Errors, Errors. They Happen, You Trap 'emp. 173
Using the Ajax.NET Pro Library - Looking under the Hoodp. 174
When Is the Proxy JavaScript Created?p. 175
What Does the JavaScript Do?p. 176
What Happens on the Server after the Proxy JavaScript Has Been Fired?p. 176
How Is the Method in the Code-Behind Actually Executed and How Is the Page Actually Created?p. 177
What Is Really Being Sent Back to the Clientp. 177
Summaryp. 177
Chapter 8 Anatomy of Ajax.NET Pro Libraryp. 179
Getting the Ajax.NET Pro Codep. 180
What Do the Ajax.NET Pro Web.Config Settings Accomplish?p. 182
What Happens When You Register the Page Class?p. 183
What Role Does the Ajax.AjaxMethod() Attribute Play?p. 191
How Does the JavaScript Call Get to the Server and Back?p. 192
What Is an Ajax.NET Pro Converter?p. 193
Summaryp. 194
Chapter 9 Other Ajax Frameworks for .NETp. 195
Client-Side Frameworksp. 195
Sarissap. 196
HTMLHttpRequestp. 199
MochiKitp. 201
Server-Side Frameworksp. 203
Architectural Distinctionsp. 203
Introduction to the Frameworksp. 207
ComfortASP.NETp. 208
Setupp. 208
Using ComfortASP.NETp. 209
What You Have Learnedp. 219
MagicAjaxp. 219
Setupp. 219
Using MagicAjaxp. 220
What You Have Learnedp. 231
Anthem.NETp. 231
Setupp. 231
Using Anthem.NETp. 232
What You Have Learnedp. 246
Summaryp. 246
Chapter 10 Atlas Client Scriptp. 249
Introduction to Atlasp. 249
Major Componentsp. 250
Ajax Supportp. 251
Asynchronous Communication Onlyp. 251
Adding Atlas Support with the ScriptManager Controlp. 252
Communicating with Web Servicesp. 253
Generating the JavaScript Proxiesp. 253
Calling Out to Web Servicesp. 255
Passing Typesp. 257
Simple Data Typesp. 257
Complex Data Typesp. 258
Caching Web Servicesp. 263
Exposing Web Services from a Web Formp. 265
Atlas Extensions to JavaScriptp. 267
Language Enhancementsp. 267
Registering Namespaces and Classes in Atlasp. 273
Namespaces and Classesp. 274
Inheritancep. 276
Interfacesp. 277
Enumerationsp. 280
Debuggingp. 281
Debugging Using debug.dumpp. 281
Debugging Using for() loopp. 283
Special Notes Concerning Atlas Client-Side Scriptp. 283
Resources Usedp. 283
Summaryp. 284
Chapter 11 Atlas Controlsp. 285
Controlsp. 285
Buttonsp. 285
Sys.UI.Data Controlsp. 286
Server Controlsp. 287
Data Bindingp. 295
Declarative Data Bindingp. 295
Programmatic Data Bindingp. 297
Binding Directionsp. 300
Binding Transformationsp. 300
Validationp. 300
Behaviorsp. 307
Resources Usedp. 309
Summaryp. 309
Chapter 12 Atlas Integration with ASP.NET Servicesp. 311
Examining ASP.NET Servicesp. 312
Authenticationp. 312
Authorization/Rolesp. 313
Membershipp. 314
Profilesp. 314
Web Part Personalizationp. 314
Using Atlas to Integrate with ASP.NET Servicesp. 314
Authenticationp. 314
Authorization/Rolesp. 318
Accessing Profiles via Atlasp. 320
Profile Property Namesp. 320
Loading Profile Datap. 322
Save Profile Datap. 323
Avoiding Profile Service Gotchasp. 324
Implementing Drag and Drop via Atlasp. 325
Summaryp. 328
Chapter 13 Debuggingp. 329
Server-Side Debuggingp. 329
Enabling Debugging Supportp. 330
Setting Breakpointsp. 331
JavaScript and Client-Side Debuggingp. 332
Tools and Techniques of the Tradep. 332
Other Ways of Invoking the Debuggerp. 342
Other Ways of Inspecting the Value of Variablesp. 344
Script Debugging So Farp. 347
Browser Debugging Toolsp. 347
The Man in the Middlep. 351
Summaryp. 361
Appendix A XSLT Commandsp. 363
Indexp. 373