JAOO 2006 Recap

Slides, code and a demo video from my JAOO 2006 conference presentation - sort of a Lap around ASP.NET Ajax. Enjoy!

Last week, I attended the JAOO 2006 conference in Denmark, and presented a session on ASP.NET Ajax - sort a lap around the core feature set. I also presented an extended version of this talk at Microsoft, Copenhagen where there was a great turn out of customers from the area.

Basically the talk covered how I'd characterize what goes in an Ajax app, why you'd do it, some of the key patterns to try and incorporate, and of course how ASP.NET Ajax gets you there. Here is a video of the application I used to demonstrate various concepts - in terms of the before and after state (thanks to Channel 9 for hosting it on my behalf).

When presenting on stage, I go through it step by step adding one Ajax aspect at a time - you can see that in the download package containing the code as well as slide deck. The app is basically a set of typical ASP.NET scenarios, master-details and data entry/display using the DataList and FormView server controls, manifested in a hopefully interesting form, as a slide show. Specifically here are the Ajax features I demonstrated, that you'll find in the code ... actually there is one more feature in the code that I didn't demo ... see if you can spot it. :-)

  1. Introduced ScriptManager, partial rendering, and UpdatePanel controls to divide a page into logical and incrementally updateable regions without using full post-backs.
  2. Demonstrated what really was happening under the covers using the HTTP tracing feature of my Web Development Helper tool. I showed the response sizes and how partial rendering helps reduce response sizes. I showed how the page was still not as optimized as it could be, and how to do so by controlling specifically which UpdatePanels update and when using a feature called Triggers.
  3. Demonstrated the ability to display progress using the UpdateProgress control.
  4. Demonstrated the ability to indicate what parts of the page change during a partial rendering update using a couple of custom controls I wrote - FadeHighlight and CrossFadeExtender - both extender controls that extend UpdatePanel.
  5. Demonstrated using and invoking Web services from client script using the ASP.NET Ajax service infrastructure of JSON serialization and client script proxies. Specifically I used a service to retrieve EXIF metadata on the selected picture. I also talked about I saw partial rendering and Web services to complement each other, and how they could be used within the same page.
  6. Demonstrated how the client script framework enables writing unobstrusive JavaScript functionality that can be packaged into behaviors that can then be attached to DOM elements. Specifically I demonstrated the functionality of toggling the visibility of the photo caption by implementing it as script on the page, that I then factored out into a class.
  7. Demonstrated packaging and exposing script functionality via server controls. I built the OverlayExtender control that packaged the script I just showed that could then be attached to a Panel server control, in order to slide the panel in and out, whenever the mouse hovered over the photo image control.
  8. Finally, I showed how the ability to version and incrementally add functionality to classes became so much easier once script had been factored in that manner. I showed using the Glitz library to slide the photo caption in and out rather than simply hiding/showing it using an animation effect.
It was a long demo but a fun one... the goal being to show how it is simple to start enriching an application with ASP.NET Ajax, and then using the full power of the platform to really go to the next level with Ajax patterns, and new controls. Hope you find the samples useful.

Note I had to use a custom build of Atlas, but that is only required for the CrossFadeExtender scenario. However, the ability to implement that scenario is being taken into account for ASP.NET Ajax 1.0.

I also got a couple of questions, I've been asked a few times. I'll blog about those next.

As a side note... the pictures I used in the demo were all taken during one conference trip or another from the past. In fact the first one is that of a castle in Denmark I took the day before the presentation (still need to work through the pictures and hopefully publish them soon).

Another side note... I got a chance to talk to Ed Burns from Sun, who works on JSF, and it was interesting to seeing them solve a very similar set of problems to bring Ajax to the masses of Web developers using server frameworks. I also talked to Bruce Johnson from Google, who is responsible for the GWT. Both of their talks were very relevant and interesting, esp. given Atlas and Script# parallels.

Yet another side note... the inspiration for this app was SlideShowPro, which is a nice flash-based tool for creating photo galleries; my version tries to approximate some of the functionality, using just HTML/CSS and JavaScript.


[ Tags: | | | | ]
Posted on Tuesday, 10/10/2006 @ 5:26 PM | #Presentations


Comments

16 comments have been posted.

Rachit

Posted on 10/11/2006 @ 11:51 AM
The demo looks pretty cool. I'm thinking to extend that to run off the db and a little more dynamic. BTW, I think you are obsessed with background color #292929, no? ;)

Zack

Posted on 10/11/2006 @ 12:20 PM
You should put this in VB... you can use Tangent Solutions InstantVB.... http://www.tangiblesoftwaresolutions.com/ Microsoft has a copy laying arround probably :)

Nikhil Kothari

Posted on 10/11/2006 @ 12:52 PM
Rachit, you're right I am obsessed with that color... or small variants thereof for displaying photos. Its actually not coincidence, that designer tools also are trending toward blackish background, as it puts focus back on the content. However, I am warming up to #FFFFFF for blog and textual content.

One of these days, I really want to ajaxify my site (do something like this for my photo gallery. Alas, the lack of time!)... and yes, get EXIF info included (at last)...

Morten Andreasen

Posted on 10/12/2006 @ 2:19 AM
Thank you for a great demo! I really learned a lot.

sorry for floding you with questions ;)

Ghanshyam

Posted on 10/13/2006 @ 12:41 AM
Hi Nikhil,

I love the way your site http://nikhilk.net/ loads the contents while keeping the page header/r-side nav bar almost constant. I have been trying to do it for last couple of weeks but have been highly unsuccessful. Mine is a scenario of master page having the menu control and menu items pointing to different aspx pages. I have tried Updatepanels/Usercontrols and even output caching but the header just loads again inspite of what I do. I even tried not using NavigateUrl and using menuclick handler/response.redirect instead. Nothing seems to work.

I did not see any Atlas code in the HTML source of your site.
Can you please guide me in doing this? I did not get any answers for my post on ASP.Net forums (forums.asp.net/thread/1426520.aspx) as well.

Thanks in advance!
Ghanshyam

Mukesh

Posted on 10/16/2006 @ 4:18 AM
hi Nikhil

I sample pretty nice and learned show many topics but when.

I am try to do this in my own sample, I got this error page load time Please tell me how to solve this error?

Microsoft JScript runtime error: 'Sys.WebForms.PageRequestManager.panelUpdated' is null or not an object


Mukesh

Mukesh

Posted on 10/16/2006 @ 8:14 AM
Hi Nikhil

Once again I was develop one sample with your Custom Control and AJAX Toolkit Controls but Problem is that eighter your custom Control is working fine or AJAX Toolkit Controls.Is this a bug or any changes on my sample.

Thanks

Mukesh.

Nis L. Simonsen

Posted on 10/20/2006 @ 6:27 AM
Hi Nikhil - I enjoyed the session at Microsoft, in which I think you gave a very nice introduction to the Atlas framework.
One thing that intrigued me, though:
You used some <script type="javascript/xml"> as a declarative way of setting (I think..) document or javascript properties declaratively; I can't seem to find any info on that type of using the script-tag - could you possibly point me in the right direction?

Michael W-Petersen

Posted on 10/21/2006 @ 2:17 AM
Hi Nikhil

I would really like to see some of this code "translated" to the new beta 1 of asp.net Ajax. I've been making a control like your overlay extender, but I cannot compile with the new release.

Thorsten

Posted on 10/25/2006 @ 7:55 AM
Looks realy great. I would also like to know how to build this with Beta1 and CTP Version of asp.net Ajax.

Maverick

Posted on 10/25/2006 @ 12:07 PM
Really great! Can't wait to see that in action with beta 1 of asp.net ajax

Sri

Posted on 10/29/2006 @ 6:56 PM
Hey Nikhil,
you were talking about your version. is it open?
just curious

Nikhil Kothari

Posted on 10/31/2006 @ 9:20 PM
Morton, it was a pleasure. Its always great to have an interactive session.
Ghanshyam - look at my blog archives for a post on page transitions - it provides the smooth updates without script/ajax.
Michael, Thorsten, Maverick - I will be porting some of the code over for TechEd, and will post after that conference.
Sri - I don't follow your question.

Shyam

Posted on 11/6/2006 @ 10:27 AM
Hi Nikhil,
Do you have a working version of the demo with the new Ajax 2.0 release.
After removing the old atlas reference and adding new Ajax 2.0 reference the project does not work.

Saumitra

Posted on 11/11/2006 @ 3:23 AM
Hi Nikhil,
I am a beginner with Atlas.I find Atlas provides a lot of features, but I have a question.Don't you think that calling web services from the client side Javascript will expose the name of the webservice methods to the user?

Nikhil Kothari

Posted on 11/11/2006 @ 1:32 PM
Shyam, there will be a version sync'd to the released version of ASP.NET AJAX soon.

Saumitra, the API names of a Web service are part of its contract with the outside world, so they are exposed publicly by definition, regardless of whether you choose to use them from script or not.
The discussion on this post has been closed. Please use my contact form to provide comments.