'Introduction to ASP.NET AJAX' at DevCares

DevCares is a series of sessions aimed at the enterprise developer that is put on by Microsoft and sponsored by different training partners in each region. If you want to learn more, check out the site. The slides from the event should be located there shortly.

The DevCares events in Cincinnati, Ohio are sponsored by MaxTrain. MaxTrain is an excellent training partner. I have spoken there many times, and even taken a few classes. They have a new facility that is one of the nicest I have ever seen. If you are in the area, you should drop by and check it out.

The session went very well, and we got a lot of good questions, which I really like. We even got Mike (thanks!) from the audience up to be my code monkey. He did a great job, and showed how easy ASP.NET Ajax can be. We had over 65 people there! What a great turnout for a free event.

I spoke about ASP.NET Ajax, and how easy it is to use. We covered why UX is important, and the two main models of using Atlas ASP.NET Ajax.

The first, and easiest, is the Server centric model. This model allows you to continue to leverage the server side aspects of the ASP.NET model, which includes your skill sets, and server side processing. It is also the easiest way to upgrade your normal ASP.NET 2.0 site to AJAX. By using the update panel on your site, you can allow your client side elements to post back in an asynchronous manner. You can do all of this by not touching your code behind. You also don't have to significantly change the existing aspx markup. You have to add to it, but you don't have to change what you have. In earlier versions of Atlas, you would have to remove the normal ASP.NET text box, and replace it with the Atlas text box. The controls have been refactored, in a brilliant way, into extenders for the normal controls. So instead of ripping out the old controls, and putting new ones in (which requires rewiring the events, and a lot of testing), you can just add the appropriate extender to the existing control.

Even if you don't use the extenders, by wrapping some or all of the controls on your page with Update Panels, you can stop the full postbacks, and do an out of band (async) call back to the server. The update panels also reduce the amount of data going back and forth, by only sending the controls in the panel, and only receiving the changes markup that goes in the panel after the server processing.

The second model is the client centric model. We went into some samples, and covered how to consume different services from the client. The Atlas team has really listened to their customers, and have made significant changes on our behalf. Some of them are:

1. You can enable or disable the auto JavaScript proxy generation on .asmx services with an attribute on the service. This will avoid any performance hits on services that aren't going to be consumed by Ajax.

2. You must call back to the server to make a web service call. This is for security reasons, as well as performance reasons. Browsers tend to be very poor at processing XML data. So Ajax now relays the request to the Service Bridge on the server using JSON. The bridge translates it into the SOAP and sends the message on. This avoids the XML tax on the client.

3. Web Service references made on the client in Ajax are now a collection attached to the ScriptManager on the page, instead of just made in code. This makes for easier management of the services across components.

 

Anyway, check out the new RC of Ajax. RTM is supposed to be announced any time now. And check out DevCares.com to see if there is an event near you.

Comments

Popular posts from this blog

Farewell

How does an Architect pack?

Job security is a myth, and how IT Pros are Thriving