Saucy Chronicles I: The Unicorns
0In January of 2008, I helped found Blog Azeroth, a forum to help facilitate the exchange of information within the World of Warcraft blogging community. Just today, I saw that three of those authors — Angela Bamblett, Arleen Barros, and Steve Hall — went on to join a writing group that wrote and self-published a book of fantasy short stories entitled Saucy Chronicles I: The Unicorns. First of all, WoW bloggers are awesome. Second of all, the fantasy genre is awesome. Finally, unicorns are AWESOME!!!
Pick it up for Kindle over on Amazon or read more about it on Steve’s blog or Arleen’s blog.
A fantasy-themed boys room
4With Chad and I for parents, our now 2-year old son doesn’t really have a chance. From birth, he and his father wore matching Huff 1.0 / Huff 2.0 shirts I had custom printed for the Father’s Day prior to his arrival.

Father-Son Shirts
And when I was deciding how to decorate his bedroom, I eschewed traditional boys’ room themes such as sports, dinosaurs, race cars, or — for those who can afford to shop at Pottery Barn — sail boats. Instead, I decided to indoctrinate him early with my love of all things fantasy, decorating his room with knights, castles, and dragons (my mother-in-law should just be thankful I omitted orcs and Uruk-hai … for now).
If the execution of such an idea sounds like it would be easy, it’s probably because there’s no shortage of medieval-esque room decor that also happens to be pink and girly. Trying to find dragons that wouldn’t give a toddler nightmares or princes that don’t look like Lord Fauntleroy proved a lot more difficult than I would have thought. Even frogs — an iconic fairy tale creature — seemed destined to come attached to princesses.
Using jQuery and CSS to provide data editing without PostBack
0Editing existing data is a task common to many .NET-driven applications. In the ZSpeed application, for example, Admissions representatives contact prospective leads via phone and often need to update their interests and contact information. Previously, a PostBack was necessary to switch from viewing information to editing information. I recently updated the lead detail screen to accommodate this "mode change" using jQuery and View- and Edit-specific CSS classes, making the process of switching between the two modes seamless and reducing the load on the server.
I was able to make this interface improvement by doing the following:
- Changing my ASP.NET code so that both the View and Edit controls are visible and populated when loading a lead's information (edit controls previously used Visible="false" when initially rendered)
- Applying an unstyled .View class to view controls
- Creating an .Edit class with { display: none; } styling and applying it to the textboxes, checkboxes, and other inputs used to make changes to the lead information
- Replacing the postback-triggering <asp:Button> with a standard HTML <input> (note that the Save button still posts back to update information but may later be changed to perform the update task behind the scenes using AJAX)
- Adding a ViewState-enabled <asp:HiddenField> field to persist the view/edit state of controls across PostBack (since other controls on the page do cause PostBack).
- Attaching a jQuery-based function to a) toggle the visibility of View and Edit controls based on the .View and .Edit classes, b) change the text label of the Edit button, and c) toggle the value within the <asp:HiddenField>
Tidy your CSS to improve maintainability
3Most designers and developers eventually arrive at standards and best practices for their work. I admit that CSS was one of those areas I long neglected, often ending up with stylesheets that were the designer equivalent of that "utility" drawer you have at home that's full of batteries, screwdrivers, pennies, (long-expired) coupons, and keys you've had with you since your first apartment and still don't know what they go to. Here's a (slightly exaggerated) example from an old stylesheet I created when I first started working for UCMT:
|
1 2 3 4 5 6 7 |
.col-left { float: left; margin-left: 10px; margin-right: 10px; margin-top: 0px; margin-bottom: 10px; padding-left: 25px; }
.col-right { float: right; }
body .main_container .sidebar ul li { font-weight: bold; }
.main_container { clear: both; }
#header { background-color: red; background-image: url('somepicture.png'); background-position: top right; background-repeat: no-repeat; }
h1 { font-family: Boxty; color: blue; }
h2 { font-family: Boxty; color: blue; } |
There are many problems with the conventions used in this stylesheet, described line-by-line as follows.
Continue reading “Tidy your CSS to improve maintainability”…
I'm a Web Developer currently working in Salt Lake City. My technical background includes ASP.NET/VB.NET, MS-SQL, JQuery, PHP, ASP Classic, CSS/HTML, and WordPress. My field exposure has been primarily in academics, especially the departments of Admissions, Career Services, and Marketing. Want to 
Recent Comments