Tips and Tricks for Building High Performance Web Applications and Sites (Giorgio Sardo)
The title of this session covers the content completely.
The first item Giorgio Sardo wanted to show, is what determines the performance of websites in IE.
I have always thought that the big performance issues were caused by JS/DOM-operations,
but thes operations only cause 33% of the CPU-load.
67% procent is caused by Layout, Rendering, Formatting,… of a web page.
Performance tricks were divided into 5 categories:
1. CSS performance
Unused styles cause performance problems. The speaker demonstrates a bookmarklet to find styles that are included, but not used on a web page.
It is also good to replace dependency selectors (i.e. ul li) to child selectors (ul > li)
2. Optimizing symbol resolution
- Avoid global variables.
- Minimize DOM interaction, because this is very expensive.
this seems to be a very usefull tool.
4. HTTP performance
- Use HTTP compression, this can be configured in IIS 7 (option enable static content compression).
- Combine images in sprites, using SpriteMe.
- Make use of Doloto: this new application from MS DevLabs creates a tree of your navigation to each single function in your application.
5. Layout Performance
- Use Expression SuperPreview to see how pages are rendered in different browsers.
- Another usefull tool is Fiddler.
What’s New in Microsoft ASP.NET Model-View-Controller (Stephen Walther)
Stephen Walther is an excellent speaker, showing some great demos in this session.
- In ASP.NET MVC 2.0 there is a “better separation of concerns”: Use RenderAction to invoke a controller action.
RenderPartial() in MVC 1.0 only generates the UI, RenderAction() invokes a controller action before rendering the UI.
- Areas are introduced: some kind of mini-applications integrated in a big application (i.e. admin section)
- Model validation: decorate model classes for validation (this looks very similar to .NET WCF Ria Services).
- Templating is also improved.