Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 and over one million other books are available for Amazon Kindle. Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5
 
 
Start reading Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 [Paperback]

Adam Calderon (Author), Joel Rumerman (Author)
4.4 out of 5 stars  See all reviews (10 customer reviews)

List Price: $49.99
Price: $30.68 & this item ships for FREE with Super Saver Shipping. Details
You Save: $19.31 (39%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 6 left in stock--order soon (more on the way).
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $18.00  
Paperback $30.68  

Book Description

0321514440 978-0321514448 July 6, 2008 1
Microsoft .NET Development Series

 

“Supported by the leaders and principal authorities of core Microsoft technologies, this series has an author pool that combines some of the most insightful authors in the industry with the lead software architects and developers at Microsoft and the developer community at large.”

Don Box

Architect, Microsoft

 

“This is a great resource for professional .NET developers. It covers all bases, from expert perspective to reference and how-to. Books in this series are essential reading for those who want to judiciously expand their knowledge base and expertise.”

John Montgomery

Principal Group Program Manager,

Developer Division, Microsoft

 

“This foremost series on .NET contains vital information for developers who need to get the most out of the .NET Framework. Our authors are selected from the key innovators who create the technology and are the most respected practitioners of it.”

Brad Abrams

Group Program Manager, Microsoft

 

 

ASP.NET AJAX server controls can encapsulate even the most powerful AJAX functionality, helping you build more elegant, maintainable, and scalable applications. This is the first comprehensive, code-rich guide to custom ASP.NET AJAX server controls for experienced ASP.NET developers. Unlike other books on ASP.NET AJAX, this book focuses solely on server control development and reflects the significant improvements in ASP.NET 3.5 AJAX and the latest Visual Studio 2008 features for streamlining AJAX development

 

Adam Calderon and Joel Rumerman first review the core Microsoft AJAX Library and JavaScript techniques needed to support a rich client-side experience. Next, they build upon these techniques showing how to create distributable AJAX-enabled controls that include rich browser-independent JavaScript client-side functionality. The authors thoroughly explain both the JavaScript and .NET aspects of control development and how these two distinct environments come together to provide a foundation for building a rich user experience using ASP.NET AJAX.

 

  • Create object-oriented cross-browser JavaScript that supports .NET style classes, interfaces, inheritance, and method overloading
  • Work with components, behaviors, and controls, and learn how they relate to DOM elements
  • Learn Sys.Application and the part it plays in object creation, initialization, and events in the Microsoft AJAX Library
  • Build Extender and Script controls that provide integrated script generation for their corresponding client-side counterparts
  • Localize ASP.NET AJAX controls including client script
  • Discover ASP.NET AJAX client and server communication architecture and the new support for Windows Communication Foundation (WCF)
  • Understand ASP.NET AJAX Application Services
  • Create custom Application Services
  • Design controls for a partial postback environment
  • Understand the AJAX Control Toolkit architecture and the many features it provides
  • Develop highly interactive controls using the AJAX Control Toolkit
  • Understand AJAX Control Toolkit architecture and build controls that utilize the toolkit

 

Foreword xxv

Preface xxvii

Acknowledgments xxxv

About the Authors xxxix

 

Part I: Client Code

Chapter 1: Programming with JavaScript 3

Chapter 2: Microsoft AJAX Library Programming 51

Part II: Controls

Chapter 3: Components 121

Chapter 4: Sys.Application 169

Chapter 5: Adding Client Capabilities to Server Controls 207

Chapter 6: ASP.NET AJAX Localization 255

Chapter 7: Control Development in a Partial Postback Environment 317

Part III: Communication

Chapter 8: ASP.NET AJAX Communication Architecture 371

Chapter 9: Application Services 425

Part IV: AJAX Control Toolkit

Chapter 10: ASP.NET AJAX Control Toolkit Architecture 481

Chapter 11: Adding Client Capabilities to Server Controls Using the ASP.NET AJAX Control Toolkit 513

Appendixes

Appendix A: JavaScript in Visual Studio 2008 547

Appendix B: Validating Method Parameters 555

Appendix C: ASP.NET Handlers and Modules 559

Appendix D: Client Error Handling Code 569

 

Index 577

 

 


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with Developing Microsoft ASP.NET Server Controls and Components (Pro-Developer) $40.87

Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 + Developing Microsoft  ASP.NET Server Controls and Components (Pro-Developer)


Editorial Reviews

About the Author

Adam Calderon is a C# MVP and the Application Development Practice Lead at InterKnowlogy. He is an accomplished software developer, author, teacher, and speaker with more than 14 years of experience designing and developing solutions on the Microsoft platform. His involvement with ASP.NET AJAX began in late 2005 with his participation in the ASP.NET ATLAS First Access program and later as a member of the UI Server Frameworks Advisory Council. Adam was one of the fortunate few who were able to work on a production application that utilized ASP.NET AJAX in its alpha form and experienced firsthand the trials and tribulations of working in “beta land” on this exciting technology. Visit Adam's blog at http://blogs.interknowlogy.com/adamcalderon.

 

Joel Rumerman is a Senior .NET Developer at the CoStar Group, where he develops ASP.NET applications to support the company’s commercial real estate information business. He is an adept software developer with more than eight years of experience developing .NET applications and is active in the San Diego .NET community as an author and speaker. Joel has been working with ASP.NET AJAX since late 2005 when he started work on a large-scale application for a worldwide independent software vendor. This initial entry into the ASP.NET AJAX world provided him invaluable experience as he worked closely with Microsoft as a member of the ATLAS First Access program and participated in a Strategic Design Review of the technology. Joel has gone on to implement many more solutions using ASP.NET AJAX, including a Virtual Earth mash-up that maps commercial real estate properties. Visit Joel's blog at http://seejoelprogram.wordpress.com.

 

 

Excerpt. © Reprinted by permission. All rights reserved.

Preface

Preface

Introduction

Server controls are an integral aspect of every ASP.NET application we build. They encapsulate browser appearance and server functionality in a reusable object. They can be used across multiple pages within a single ASP.NET application as well as across multiple ASP.NET applications. ASP.NET comes with a lot of prebuilt server controls. We have simple controls such as the label and we have complex controls such as the GridView. We also have the ability to create our own server controls to meet a need not met by one of the existing controls by inheriting from the appropriate base class and overriding its methods as needed.

This model of using server controls to encapsulate browser appearance and server functionality has served our needs well since the inception of ASP.NET 1.0, but our server control needs are changing.

A new server control need that has recently surfaced is the ability to incorporate Ajax functionality directly into the server control.

This need arose because our web applications need to be more responsive and visually interactive than the traditional ASP.NET repaint-the-entire-screen model and therefore the traditional server control supplies. This requirement has emerged because users are using web sites such as Gmail, Live.com, Yahoo! Mail, and others that don't repaint the screen every time they click a button or need to receive fresh data. Rather, they rely on Ajax to fetch fresh data and then update or add to a portion of the screen based upon that data. Because these web sites are heavily used and users really enjoy their experience while using these websites they expect other web sites to perform with the same elegance as they do. When a web site doesn't perform with the same elegance the user will often move onto another web site that does. Those popular applications have raised the bar for what is an acceptably user-friendly web site.

Because our users are demanding a web site experience that essentially uses Ajax and we build our ASP.NET web sites using server controls, we need a way of easily creating server controls that not only encapsulate browser appearance and server functionality, but also include Ajax functionality so that the server control itself is Ajax-enabled.

Taking a step back for a moment, unlike other technologies you might have read books on, ASP.NET AJAX server controls don't provide you with anything that you couldn't already do. We've always been able to embed Ajax-functionality into server controls ... it was just a real pain.

There were a few different methods we could use to include the JavaScript with our server control such as embedding it as a resource, but we eventually ended up having to do the same three tasks. To make our server control have some serious client capabilities we always had to concatenate strings together to form JavaScript statements and functions, write browser sniffing statements to make sure that the JavaScript was cross-browser compatible, and add attributes or render out Html that attached the JavaScript functionality to the client versions of our server controls. It wasn't impossible, but it was error-prone and there was always this mingling of server code and JavaScript that was hard to maintain and even harder to read.

Furthermore, if you had multiple server controls that had client capabilities it was difficult (but not impossible) to ensure that the client functions that each server control required didn't overwrite each other when rendered on the browser. Tracking down that problem was always a fun hour or so.

The difficulty grew exponentially if we wanted to include a mechanism for asynchronously communicating with the server when the user pressed a button embedded in the server control. Even with a helper communication library there were always tricks to getting your control to communicate properly with the server.

These hindrances were problematic enough to lead to some bad programming habits and bad code as well as scare programmers away from even attempting to include Ajax-functionality in their server controls.

These problems are what Microsoft's ASP.NET AJAX solves.

In this book, we're going to teach you how to use ASP.NET AJAX to create server controls that encapsulate Ajax functionality. ASP.NET AJAX provides both server and client programming constructs that make adding Ajax-capabilities to our server controls easy. Not to sound cliché, but with ASP.NET AJAX reducing the complexity of adding Ajax-capabilities to our server controls, we're able to create server controls whose Ajax capabilities are only limited by our creativity. If we want to listbox that self-updates with fresh data, if we want a type-ahead textbox that dynamically populates from the server, or if we want a button submits an address for verification we can easily accomplish this through ASP.NET AJAX.

The ASP.NET AJAX Components

As we go through the book we'll be talking about the three sections of ASP.NET AJAX: the Microsoft AJAX Library, the ASP.NET 2.0 AJAX Extensions, and the ASP.NET AJAX Control Toolkit. Here's a quick rundown of the different components.

Microsoft AJAX Library

The Microsoft AJAX Library is the JavaScript programming framework of ASP.NET AJAX. It provides all of the client programming constructs you'll use to create new client objects and components. It's contained within the MicrosoftAjax.js JavaScript file that's embedded in the System.Web.Extensions DLL.

ASP.NET 2.0 AJAX Extensions

The ASP.NET 2.0 AJAX Extensions are server objects such as the ScriptManager, ScriptControl, and ScriptDescriptor, which provide a connection between the Microsoft AJAX Library and our server ASP.NET development. These server objects provide an important distinction between ASP.NET AJAX and other Ajax frameworks as they provide a server programming model for manipulating client code (and allow us to make Ajax-enabled server controls!). Like the Microsoft AJAX Library they are included in the System.Web.Extensions DLL.

ASP.NET AJAX Control Toolkit

The ASP.NET AJAX Control Toolkit is a shared source project that is built on top of ASP.NET AJAX. It's an effort shared between Microsoft and the ASP.NET AJAX Community in with the goal of developing powerful and reusable ASP.NET AJAX extenders and controls.

It's not actually part of ASP.NET AJAX, but because it provides so many great server and extender controls, it's invaluable to the ASP.NET AJAX community. Creating new extender controls through it will be a topic we'll cover fully.

Book Breakdown

The book is divided into four major sections. In the first section, we focus on the basics of the Microsoft AJAX Library and JavaScript, the programming language that powers it. We call this section "Client Code." In the second section we focus on a creating distributable Ajax-enabled controls and we call this section "Controls." In the third section called "Communication" we focus on the different ways your client control can communicate with the server. Finally, in the fourth section, we focus on the Ajax Control Toolkit, which is a slightly higher-level model of creating Ajax-enabled server controls. This final section is aptly named "Ajax Control Toolkit."

Client Code

Chapter 1 focuses on JavaScript, the programming language that powers the Microsoft AJAX Library. We spend a full chapter on JavaScript because so many developers (ourselves included) have glossed over key details when working with the language and since you're going to be writing so much JavaScript to Ajax-enable your server controls a solid background is important.

In Chapter 2 we continue where we left off in Chapter 1 by taking a look at how the Microsoft AJAX Library builds upon JavaScript to provide a programming platform a .NET developer will find familiar.

Controls

Starting in Chapter 3 we begin our path to creating fully encapsulated Ajax-enabled controls by learning how to use and derive from three key client types: Components, Controls, and Behaviors. We'll talk theory as well as provide a couple of practical examples.

In Chapter 4 we cover maybe the most important portion of the Microsoft AJAX Library as we cover Sys.Application and how it acts like a client runtime with which we can interact.

Finally, in Chapter 5 we bring the server into the mix when we cover how to create server Components, Controls, and Behaviors that automatically create their corresponding client objects.

In Chapter 6 we wrap up the Controls section with an in-depth examination of Localization in ASP.NET AJAX.

Communication

With Chapter 7 we start looking at communication in ASP.NET AJAX using WCF services, page methods, and the client web service proxies.

In Chapter 8 we cover the application services and include a demonstration on how to build your own application service.

In Chapter 9 we conclude our communication section with a look at some of the concerns surrounding how the UpdatePanel effects control development.

Ajax Control Toolkit

Beginning with Chapter 10 we start our look at the Ajax Control Toolkit. We cover the base classes that are used by toolkit controls as well the support and designer classes that provide additional features.

Finally, we conclude the book with Chapter 11 as we attach client capabilities to server controls using the Ajax Control Toolkit. This chapter includes how to build a new extender control and provide design time features for it.

What is not covered?

You might find it strange to see a section that talks about what we're not covering. We're including it for two reasons.

First, this book covers a pretty narrow topic when compared to ASP.NET AJAX at large. Because of this we don't have the normal introductory chapter whe...


Product Details

  • Paperback: 648 pages
  • Publisher: Addison-Wesley Professional; 1 edition (July 6, 2008)
  • Language: English
  • ISBN-10: 0321514440
  • ISBN-13: 978-0321514448
  • Product Dimensions: 9.1 x 7.1 x 1.2 inches
  • Shipping Weight: 2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (10 customer reviews)
  • Amazon Best Sellers Rank: #368,158 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

10 Reviews
5 star:
 (5)
4 star:
 (4)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (10 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

13 of 13 people found the following review helpful:
4.0 out of 5 stars A Fine Resource, October 2, 2008
This review is from: Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 (Paperback)
This is a fine resource for ASP.NET developers who want to build high performance, data-driven Web applications with a richer user interface. The introduction of ASP.NET AJAX 2.0 extensions caught many of us off-guard. We were suddenly thrown into intensive JavaScript programming on a Microsoft platform. Faced with a major learning curve, many of us fled to the convenience of the UpdatePanel control as a stepping stone.

There's no getting around it, it's going to take effort to get to the next level of AJAX capabilities using Microsoft's library. This book takes you into that journey - but not necessarily by the most direct route.

The first third of the book feels more like a solid ASP.NET AJAX reference than a "how-to-do-it" tutorial. The early chapters cover the library's types, namespaces, and classes in depth. It just seemed too early and too dry to be dealing with the nitty-gritty of the platform.

In my view, the book should start at Chapter Five. That's where you really make use of client-side functionality by adding it to server-based controls. As the authors point out, the AJAX library extensions help you overcome inconsistencies among browsers. You learn practical steps such as adding script resources, configuring ScriptManager, and getting into extender controls. The book leads you through the creation of an Image control extender that loops through a series of images at runtime. It's in this hands-on chapter that you really start to grasp the concepts. There's a substantial chapter of localization in ASP.NET AJAX. If you're taking on a translation, it would certainly be worth the price of the book.

At the outset, I referred to the UpdatePanel. It could be called the "lazy developer's AJAX control". What I learn from Chapter 7 is that the UpdatePanel can be a real headache for control developers. The authors warn of unexpected problems when your carefully-crafted control finds itself inside a partial postback environment.

The book's coverage of the asynchronous consumption of web services is solid. The authors go into all the important acronyms such as REST, and explain WCF from many angles including creating data contracts and service contracts.

In the chapter on Application Services, I discovered how much I didn't know about the client-side use of ASP.NET's Membership, Role, and User Profile services. If these AJAX extensions to the server-side API's escaped you too, you'll really benefit from the chapter.

Every ASP.NET developer knows about the AJAX Control Toolkit but Calderon and Rumerman take it further. They explain the overall architecture and then dig into how you can harness the Toolkit (and especially its animation support) in your own controls.

In summary, this is a very good book for learning to write your own AJAX controls. My main complaint is that the cart comes before the horse... You want to dig into building something interesting (call it 'instant gratification' if you wish) but need to wade through several chapters of dry architectural and reference-type information.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3 of 3 people found the following review helpful:
5.0 out of 5 stars Great primer on MS AJAX framework and Javascript, February 17, 2009
This review is from: Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 (Paperback)
I found this book as very resource full and requires a serious and focussed read. I have a good ASP.NET 2.0 server development experience and little or basic experience on the client scripting and AJAX. I wanted to learn this piece of web development and being a professional I picked up this book even though the title says 'Advanced' only because the advanced and pro series books generally tend to have more technical details that are needed in a real project and have more serious material.
I have tried most of the example code and took my own time learning the details before moving forward to a new concept.
The authors really know their subject very well. The topics were well paced and well structured. I suggest reading the book thorougly and not to skim the material. The book also features a great chapter on JavaScript.
All in all, a worthy buy for serious learners.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


6 of 8 people found the following review helpful:
5.0 out of 5 stars Not for the faint of heart :), August 5, 2008
This review is from: Advanced ASP.NET AJAX Server Controls For .NET Framework 3.5 (Paperback)
I would classify this book as a hardcore, deeply technical look at JavaScript, AJAX, and the Atlas farmework (I am only a few chapters in :) )

The first few chapters I have read so far covered JavaScript more in depth then I think anyone human should ever go with JavaScript but there were some interesting nuances that I didn't previously know about. I haven't got into the meat of the AJAX stuff yet but if the first few chapters are any indication of the depth, this book will be on the "hardcore" level.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews








Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
image list, protected mode, object notation, sealed class, trace message, object literal, item content, simple behavior, web application, nested types, partial postback, postback response, expando property, postback environment, expando properties, dispose script, extender class, extender control, return scd, yield return descriptor, public interface declaration, component creation process, local resource files, custom application service, control library template
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Visual Studio, Control Toolkit, Internet Explorer, Untitled Page, Page Language, Method Name Description Syntax, Adding Client Capabilities, Prototype Model, Web Site Administration Tool, Filter Transactions, Liquor Store, Book Store, Calls Sys, United States, Created Component, Register Assembly, Extender Wizard, Adding Client-Side Functionality, Class Class, Solution Explorer, Image Rotator, Add Attributes, Profile Maintenance, Methods Method Description, Library Programming
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Surprise Me!
Search Inside This Book:


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(2)
(1)

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject