views:

106

answers:

1

Hi,
I have been writing webparts for a while and have written couple of portals too but I feel that the portal pages and webparts that I write using .net framework are much more heavy and browser specific. Can some body guide me to write light weight webparts that are browser independent and do not take long time to load or change zone. I want my webparts to be as good as that of my yahoo or igoogle.

Please forward me whatever details you think can be useful in this process, links are also welcomed.

+4  A: 

The use of client-side scripting allows you to load the page once and change it during the navigation, giving the sensation of "speed" to the user.

Javascript programming is not easy and it's hard to mantain, although with the use of framework you can override all the cross-browser problems and glitch (I personally LOVE jquery).

A proper use of AJAX calls allow you to load server-side informations without having to re-post all the page, giving a Web 2.0 feeling to the user too (you can use UpdatePanels in ASP.Net to reproduce this behaviour, but don't over-do it).

Packing the javascript files into one will allow you to reduce the bandwidth required to load the page AND the amount of request made by the browser to load several scripts.
If you use Visual Studio, you can set up a script to pack different .js files into one for production stage only, allowing you to debug & comment your files without any problems.

Last but not least, Firebug. Allows you to debug, console, change javascript while executing it in the browser.

Alex Bagnolini