Wednesday, March 08, 2006 9:51 AM
RichardM
The Value of Skins
I've been dubious regarding the value of ASP.NET's new app_themes feature. I mean, I "love" masterpages, been using them for quite a while, and even more I love how easy it is use to use dynamic masterpages. But app_themes? It just didn't seem like something "I" would need.
So then we get a request to start having lasvegasdiscountgolf.com be updated from the same database that updates leisuretime. Right off the bat I knew we'd have to move lasvegasdiscountgolf, since its current server is PHP and I just didn't want to have to try to figure out some sort of XML Web Service solution with php.
So moving LVDG seemed like the right step, then I thought, "Ok, I'm going to have it on the same server as LT, how do I want it to access the database? Straight? Via a web service so it could be moved later?" I thought about their goals, essentially they just want to pull the golf section out of LT and make a website that focuses purely around their golf prducts. They also want ease of management for updating their sites. So why not move LVDG into LT instead of moving the golf out?
I wrote code to detect what domain names are visting the site, and load different masterpages depending, which solved a good portion of my problem.
But then I encountered a bit of difficulty. A lot of the images in the main content area are different depending on whether its LVDG or LT, and merely switching out the CSS file isn't going to fix that unless I do some weird thing where I use a spacer image and a div class assigning the background image in the CSS (which honestly I don't like hacks like that which change how the browser is expecting to read things).
It only took a second for me to realize that .net 2.0 skins were the solution. A skin isn't just a different css file, it can define how different controls work. So any image that needs to change based on the template I just define in either the LT skin or the LVDG skin, and it programmatically changes the image URL as appropriate.
Pretty nifty.
Might as well make this a long post since I don't post in my blog very often.
We're moving, found a 5400 square foot home, there are 8 of us, so its not quite as big as it sounds, but since we're all pretty good neighbors with each other it means we can really take advantage of the space. We each have different foci of course. My focus is the computer lab. It needs to be larger than we already have (8 or so computers in a 30x40 space I think), and needs to be tall enough for our big screen (we have it on a stand Scott built so its tall enough for me and Jenn to see from where we sit in the back, the top of the screen is about 9 feet up).
Bill wants the living room to be the focus. Its gigantic of course, but I won't spend hardly any time there. A good portion of the household is excited about the possibility of a pool being put in the backyard during the summer, not me, I know it would just cost a lot more for something we're unlikely to use much (even a dozen times wouldn't be worth it for me).
Jenn and I haven't even seen the house except through pictures Scott took with his pdaphone. We were tired of looking at great houses and getting them turned down by others within the house. Even after it was pretty much decided we've move there, I made a point of not looking at it. Doesn't do much good until we can actually move in (April 1st), so there you go...
----------------------------------------
The themes on the new forums are coming along. I'm crafting a dndorks-specific theme, then I'll be working on a webcomic.net theme, which probably means webcomic.net will get a better one since I'll have learned my mistakes from dndorks.... They are much easier than last time, more consistent, and I feel more confident about adding new CSS classes because I have a better understanding how it works.
The diceroller plugin hasn't been migrated to CS2.0 yet, it will probably be really quick, its just low on my list of priorites at the moment.
We started doing google ads on dndorks, seems like its doing well. Gotten a bit of interest from our contest. If anyone actually reads this, and its before March 19th, might want to take a look here. We're offering a free copy of DDO or if you don't want that a gift certificate for amazon.com, and the runners up will receive 2 month game cards to DDO or gift certificates.
Ok, thats it for now, I kinda like the interface more now, so hopefully I'll be blogging more.