There are many tasks developers do over and over again in many projects. One of these for me has been creating a list of countries for a database table. Using the ISO 3166 English country names and code elements I've created a T-SQL script for public consumption. Just change the use statement to your database name and find and replace the table name to your spec. Hopefully this saves you some time.
I've been neglecting this blog for the past couple months and its been stressing me out. To alleviate that stress I'm going to be self indulgent and talk about what's going on in my world.
The biggest thing has been assisting my wife startup her party planning business. The current task is locking down the branding and meeting with the designer tasked with designing the website. Earlier this month she threw an awesome sweet 16 party for my niece as a test run. Everyone loved it so we are optimistic.
As if that wasn't enough I've got a few ongoing web development projects that are keeping me busy in the evening and on the weekends. Those projects plus my day job at CDC equal a lot of C# and ASP.NET. This coding will inevitably spawn some new blog posts related to coding so look out for those if that's your bag.
On the fitness front I've been running again since time sprung forward. In the early evenings I like to run along the Chattahoochee River near my home. It's a relatively flat course so I'm going to need to find some routes with hills to get in shape for the Peachtree Road Race in July. Hopefully by then the training plus my reduced beer intake will enable me to loose the 25 lbs I've needing to loose for some time.
Now I'm even more stressed. Writing all this stuff down makes me realize all the crap I have going on. Did I mention I've got my sister's furniture for sale? I need a beer…wait…forget that.
I came across an informative blog post today by Stephen Walther that talks about ASP.NET and HTML5 local storage. It explains this exciting feature by discussing details relating to client/server concurrency, difference between local storage and cookies, intracting with WCF and more. If you are an ASP.NET developer who wants to stay on top of things go check it out.
There's been a lot lately of talk in web development circles about CSS sprites lately. Using them dramatically increases the speed of downloading a webpage with several background images by reducing the amount of HTTP requests the client browser has to make. This is accomplished by consolidating each individual image into a single image. Once consolidated the background-position, height and width CSS properties are tweaked to show only the appropriate part of image. Check out articles from A List Apart and Smashing Magazine for more information and tutorials.
The fun was testing the before and after using YSlow in Firebug. The test subject was a client's website where there were four tabs with different images for three states. The CSS Sprite Generator from Project Fondue can help with the tedious task of making the sprite. The original cluster of transparent pings totaled 6.77 KB which consolidated to 3.83 KB. Combine that with the reduced HTTP requests and that's quite a savings.
Before making the sprite Yslow reports a score of 83. After making the sprite bumped that score up to 88. The total page size was reduced by 43K. This test seems to indicate it'll be worthwhile to make more sprites on this site.
My friend and coworker published an article about list elements; <ul>, <ol>, and the little used <dl>. He explains why and how you should use them and their relationship with CSS. Check it out over at Subtypical >.
There are a lot of new elements in HTML5 and it may be confusing what tags are included, added, or removed and what they are for. A coworker today found the Periodic Table of the Elements from Josh Duck. I like it because it groups the major elements making them easier to conceptualize. Each element contains a concise summary of the purpose of the tags and the colors are keys to the following categories:
- Root elements
- Metadata and scripting
- Embedding content
- Text-level semantics (Web 3.0, here we come)
- Grouping Content
- Document sections
- Tabular data
- Interactive elements
Josh Duck is an Australian LAMP developer working in London. Nice work!
The mix of Web Deployment Projects and YUI Compressor is the most efficient method for me. I don’t have to think about it because it’s integrated to my deployment build process. It provides the flexibility to either minify the files individually or merge them into one large file that my visitors only have to download one.
- Visual Studio 2010 Web Deployment Projects
– or –
Visual Studio 2008 Web Deployment Projects
- Yahoo! UI Library: YUI Compressor for .Net
- Firebug for Firefox
- YSlow by Yahoo!
Example of CSS Minification
A couple years ago I started using T4 templates in my Visual Studio projects. They provided me with a quick and efficient way to generate source files (C# and SQL in my case) based on the application’s database schema. T4 is also extremely useful for generating code for ASP.NET MVC (more information below). The problem only problem is that Visual Studio 2010 by default applies no Intellisense or code coloring. This makes it difficult to edit resulting in a wall of code.
This problem was originally solved for me in Visual Studio 2008 in 2009 when I downloaded and eventually purchased the Clarius Visual T4 editor per recommendation by Microsoft. Clarius stopped developing their T4 Editor plug-in in late 2009 and there is no support for Visual Studio 2010. Last Winter the lack of development made me optimistic that T4 Intellisense would be in Visual Studio 2010. Usually canceling development by a plug-in vendor Clarius indicates that Microsoft is about to make them redundant. Unfortunately this was not the case and I was left without this handy feature in Visual Studio 2010. Fortunately I can across a post today on stackoverflow that offered a FREE solution from Tangible Engineering. I downloaded and installed this software today and Intellisense was back (on most things).
It appears Tangible Engineering (@tangibleeng) has adopted a crack-dealer business model like other plug-in vendors. The FREE version doesn’t support all of the C# language. It does provide enough though for developers to decide if they need to to pay 99.98 USD for the PRO edition. If you use T4 often it’s worth it, I just don’t know if I want to spend $100 again just to have the vendor flake out on the next version of Visual Studio. My hope is that the Visual Studio team bakes this feature into the next version.
Update – 8/26/2010
I appears that Clarius posted some news regarding a Visual Studio 2010 version shortly after this original post. Read about it over at the Visual T4 blog.
T4 templates in Visual Studio 2010 require the “T4 Toolbox” available FREE on Codeplex.
This reading has set me on the mission to discuss the strengths and weaknesses of the version incremented standard (with no space). These standards have been shaped by the market forces that make up the governing body of the World Wide Web known as the W3C. The market reality of these corporations have shaped and guided the development of industry standards for years1. These corporations are responsible for developing software, lower-level coding standards, and training to build webpages, mobile apps, and other software and hardware that interfacing the public with the World Wide Web.
These standards are the bedrock of the what some term “Web 3.0” or “The Semantic Web”. On this bedrock developers are creating the platforms and applications enabling humanity to consume information that influences society. I will be discussing this in the coming weeks, months, and years as developers write code taking advantage of HTML5. All you have to do sit back, grab a frosty beverage and tune in after the break.
1 World Wide Web Consortium (W3C)
This blog begins like so many other things do for developers; Hello World. I’ve been wanting to start a blog for years but procrastination has gotten the best of me. No more! My plan for now is write about notable experiences and revelations in my web development career, geeky personal life, and whatever else bounces around in my head (except the voices, that’s personal). So grab a frosty beverage and follow me on Twitter, more after the break.