News Stay informed about the latest enterprise technology news and product updates.

VSLive: ASP.NET AJAX extensions employ JSON serializer

Among useful traits in ASP.NET AJAX Extensions (formerly Atlas) and the associated tool kit are improved Web service proxy handling and JSON-based serialization, PluralSight's Fritz Onion said at VSLive 2006 in Boston.

This article originally appeared here on TheServerSide.NET.

BOSTON -- Behind the sudden industry interest in Ajax (Asynchronous JavaScript and XML), clearly, is a new interest in frameworks that handle some of the complexity of developing more responsive Web applications. Microsoft has focused its energies on ASP.NET AJAX Extensions, formerly known as Atlas. The software just went beta last week, and individuals from the company have said it should formally ship this year. (Yes, if you developed using the last CTP with Atlas nomenclature, it is time to go in and change those names.)

Among useful traits in ASP.NET AJAX Extensions and the associated tool kit are improved Web service proxy handling and JSON-based serialization, suggested Fritz Onion, technical staff member, PluralSight. Onion spoke this week at VSLive 2006 in Boston.

Chief among capabilities of the new software for .NET developers may be an abstraction level that ensures your AJAX apps work on a variety of popular browsers. This layered browser capability is significant, said Onion.

"You can write client-side JavaScript using the ASP.NET AJAX Library extensions in a browser-independent way, so that you don't have to worry about your application breaking when different browsers hit your pages," he said.

Among the elements Microsoft created for this AJAX framework were some core runtime JavaScript additions, these include declared 'namespaces' and certain classes with abstract functions. Also, some helper classes, such as StringBuilder, were brought in from .NET.

JSON serializer

With ASP.NET AJAX Extensions, Microsoft chose to use Java Script Object Notation (JSON) to move data between the server and the Ajax client. The company implemented serializer and deserializer types on both the client and the server to move data in the JSON format. It provides a means for the browser to call Web service methods on the server This provides a new asynchronous communication layer to connect a browser to connect to network end-points.

"I think this Web service [proxy capability] is one of the most compelling aspects. Of ASP.NET AJAX," said Onion. It generates a JavaScript class that will pass the type across to ASMX endpoints." This trait belies the fact that Ajax does not always mean XML.

"They have given your ASMX endpoints the ability to serialize as JSON rather than SOAP or XML. You have the choice," Onion said, adding, "a lot of work went into this JSON serializer.

Also supported in the ASP.NET AJAX kit is an Update Panel Control that lets ASP.NET developers do a lot of "Ajax" style of work within basically familiar confines.

This control supports partial page rendering, an AJAX-style trait, without the need to write special client script. Of the Update Panel Control Onion says: "It's sort of the ultimate implementation of AJAX within ASP.NET." But he cautions that it should not be used everywhere.

Back to JS drawing board

Also behind the surge in Ajax interest is renewed interest in JavaScript itself. As always, the fact that a framework can shield developers from complexity does not excuse developers from the need to know what is going on under the covers. Frameworks reduce work but don't take the developer's place.

Like cohorts in Java world, ASP.NET developers, too, will be visiting or revisiting their JavaScript skills.

"Anyone who wants to write in Ajax will have to hone up on JavaScript skills," said Onion. That is something Onion himself has done of late.

"JavaScript is interesting," he mused. "It's one of those languages where you think something and suddenly It's there So you have to be careful in JavaScript. You have to be sure you have good thoughts."

  • Return to "Special Report from VSLive! Boston"
  • Dig Deeper on ASP.NET and Ajax development

    Start the conversation

    Send me notifications when other members comment.

    Please create a username to comment.