Microsoft launched their new SharePoint site a few days ago, and for the first time the SharePoint site is actually hosted on SharePoint (!). It’s a nice looking site, with a dynamic user interface, courtesy of AJAX and Silverlight. I decided to take a closer look at the visible source code – that is, the rendered HTML, JS, CSS, and Xap files.
Below are some observations:
- They’re first loading the OOTB stylesheets, including HTML Editor and core.css (all 4K+ lines of it), completely unmodified, then they override the defaults with additional stylesheets (the MSCOMP_Core.css is another 4K+ lines of css) – seems inefficient?
- They only load Core.js if authenticated, through a custom server control:
<!-- RegisterCoreJSIfAuthenticated web server control -->
<span id="ctl00_RegisterCoreJsIfAuthenticated1"></span> - Interestingly MS uses Webtrends
- They use custom js to get around the name dll:
<script type="text/javascript" src="/_catalogs/masterpage/remove_name_dll_prompt.js"></script> - There’s extensive Control look and feel customization through Control specific CSS
- A lot of their stylesheets reference slwp_something – SilverLight WebPart perhaps?
- The viewstate looks pretty nasty but in the end is only 61KB, which I guess is acceptable
- The page includes the standard minified versions of MicrosoftAjax.js, MicrosoftAjaxWebForms.js, and SilverlightControl.js
- The on-page Silverlight initialization code is NASTY, not sure if this is standard for Silverlight, or if this is an ugly exception. Why not use JSON? Why use encoded javascript? Here’s a very short random sample – note that they didn’t bother getting rid of spaces (%20) before encoding:
SiteNavigationDefinition%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FChildSites%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSiteNavigationDefinition%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CSiteNavigationDefinition%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSelected%3Efalse%3C%2FSelected%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSiteName%3EECM%3C%2FSiteName%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSiteUrl%3E%2Fproduct%2Fcapabilities%2Fecm%2FPages%2Fdefault.aspx%3C%2FSiteUrl%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C
Best of luck debugging that. - There’s a mix of absolute and relative references to the same image library, (but that’s a very picky observation)
- YSlow result: D, pinging it on number of HTTP requests, lack of a CDN (why doesn’t MS have a CDN?), Expirations headers, ETags and not minifying JS and CSS, but overall size is not bad for a MOSS page, especially not one this visually engaging – but then it turns out YSlow does not account for loading of Silverlight content – the Xap files for the Top Nav and main control are 240KB and 632KB, respectively:
- The XAP files also contain some interesting content, like this test image for the header – but they’re not actually using fast for the search…
- They use an Image Transitioner component from Advaiya (sidenote – pure Silverlight websites are just as annoying as pure Flash websites), who has supported MS on other Silverlight initiatives – wonder if the SL pieces were outsourced to them?
So – all in all a nice looking site, but I have some questions as to the completeness of the project. Maybe it’s just me, but if I was Tony Tai (MS SharePoint Product Manager), I would spend another week finishing things up a bit…
Labels: design, howto, javascript, microsoft, moss, sharepoint, silverlight