Skip to main content

Themes in Whidbey...Is it worth it????

Theme management, how were u doing it previously??? I was using simple css files. I define classes for objects, or ids. Go ahead and just mention the styles for these classes in the CSS file. Ok, I want to change the theme??? I change the CSS style sheet. Was happy with the way things were going on. Then came along Whidbey. They even had a simple to use theme management, ok thats what they said.
I rushed forward, got to learn how to use it, and went ahead and implemented it. Wow, I can change themes, on the fly, by just changing the property. Finally, some really cool way of doing this. Great they will be generating a css file automatically. Cool!!!! Something in me decided i need to have a look as to how this css file.
So went ahead and executed the page. Good old IE started up, the goody good looking page opened up, and I did a view source.
Searched for keyword
  • <link,....no matches found
  • stylesheet...no matches

Wow, then how is it done??? I go to one of the text box. Wait a minute, i never put style property for this text box, or maybe i had.......Hey, I am sure I did not mention style for this one and this one. Oh God, all my text boxes have the same style..meaning THE SERVER IS INSERTING STYLE FOR EACH AND EVERY CONTROL I AM DEFINING SKIN FOR, and that means....if i use 10 text boxes, it will put the same style for all text boxes!!! Further, it is doing it at server side, meaning performace degradation. I have been a major performance freak, and this, nope i wont talk about what this feels like. Imagine 10 such controls on your page, 100 users accessing this page. All at the same time, with different themes. I wonder how the performance is. Lets see. I used ACT, simulated 100 users for 5 minutes with 10 second warm up using 2 pages

  • one with 10 textbox page with css
  • another 10 text box page with theming concepts of Whidbey
    • Compared the time to first bytes.

      Second page gives 196.56ms

      First page gives 33.09ms

      So I guess you know what I will be using throughout my life, good old CSS.

      Anyway have lots of other things to do.

      Until the next blog....


      Comments

      Popular posts from this blog

      Theming in Whidbey using CSS

      Continuing my blog titled Themes in Whidbey . I would like to mention some great points I did find out today about Whidbey featrures. How many times have you got sick of developing Sites which have themes???? I mean every page u create has to have, maybe in ASP, something like <link href="<%=Session["ThemeFile"]%>.css"/> I have been doing since a long time. Do mention if you have a simpler method of defining a variable CSS for your page!!! Whidbey simplifies this further. Now in ASP.NET, all you will have to do is Create Themes directory, if not aldready present, Create a directory for each theme required, maybe Black, Gray,etc. Dump your CSS files into this directory. in Page_PreInit method define the Theme as Page.Theme="<Theme directory Name>". Further can be made into Page.Theme=(string)Session["ThemeType"] and viola, your theme management is take care by ASP.NET When you want to change the theme, the...

      My first problem with AJAX

      I was using Callback (AJAX) to retrieve a page i had developed . Lets start all over, I was using AJAX to retrieve a part of the contents of a web page. Cool, simple, it downloaded without a pain, then I innerHTMLed it to a span tag. Worked fine, successful, clapped my hands etc.etc. Clicked on the button which had seemed to appear out of nowhere. And then, it all fell apart. The feared exclamatory symbol appeared on the status bar.... And for the newbies, thats an indication of a JavaScript error in IE. Of course, as usual i was all curses at my IE window......Anyway to make a long story short (i AM quite sleepy u know). the scripts which i seemed to be innerHTMLing to the span tag are not executed. And what i mean is anything between the script tags which have been innerHTMLed to that span tag are not executed. Of course i can see a ray of hope in the distance. I mean the distance till tomorrow morning. And just for kicks, check out a hi-fundoo flash file titled EPIC 2004 . And for...