April 29th, 2009
There are lots of social networking sites like Digg that let you tell others about what is a good read. But you can bypass these sites and directly tell everyone about good reads using Twitter. So I created a simple bookmarklet that you can click to send set the title and link to the page you are currently on to Twitter where you can submit your new post.
Bookmarklet: IJR

I have this bookmarklet on my links toolbar in Firefox and Chrome along with other bookmarklets I have created. Feel free to drag this bookmarklet to your bookmarks bar and start sharing your IJR posts on Twitter.
Posted in twitter, web | Comments Off
April 21st, 2009
In my interview with The Thirsty Developer podcast I mentioned some modern JavaScript techniques. It is hard to explain these techniques in a podcast so I wanted to post them here.
Learn more about JavaScript and jQuery at BootWorks, Wednesday, April 22. [
Details ]
The biggest problem area I work to avoid when working with JavaScript is the scoping issue. It has been very common to simply create a series of functions and call them however you see fit from event handlers in your HTML. This was all fine when you had 300 lines of JavaScript for your entire site because it was just used for a slight site enhancement. Now if you are building a much more complex site with lots of interaction, you will have several thousand lines of code. Every one of these functions and variables that you define are all placed in the global scope, which is the window object. Consider the following code.
This code is equivalent to the following code, assuming this code is in the global scope and not within a function block.
Why is this useful? Well, if you are within a function block and declare a variable the scope of that variable is limited to that function block. If you want to declare a variable and put it into the global scope you can use the window object in this way to do so. (Hint: window is the container for the global scope.)
Read the rest of this entry »
Posted in ajax, javascript, jquery, web | 1 Comment »
April 13th, 2009
Now that ASP.NET MVC has been released and jQuery is included it is time for every ASP.NET developer to start embracing jQuery. I personally have been using jQuery and other JavaScript libraries for the past few years. Ever since JavaScript became popular again thanks to the likes of the Google Mail interface in 2004 and the naming of AJAX by Jesse James Garrett in 2005.
With JavaScript becoming a central piece of a modern web application, I decided that I had to start taking it seriously. For years I only used JavaScript to enhance a page and ensured that if the user had JavaScript disabled the page would still work as required. It was time consuming to add a lot of JavaScript and it was often not worthwhile. Starting in 2004 I started seeing more and more sites start building sites which simply would not work without JavaScript. I decided that since I plan to do web development for many more years to come that I had to learn how this was all done, and I found that these modern sites were leveraging JavaScript libraries that would abstract away browser differences and reduce the effort necessary to implement a rich experience.
Read the rest of this entry »
Posted in ajax, asp.net, html, javascript, jquery, web | 3 Comments »
March 1st, 2009
Packer for .NET has been updated to version 4.1. A major new addition is a new MSBuild task called UpdateWebConfig which makes it easier to prepared your web.config file during deployment. There is also the new Combine mode.
Note: Version 4.1.1 has been released with a fix to the targets file.
Breaking Change
With this release the Utility class has been renamed FileProcessor. If you are coding against the assembly you will need to change Utility to FileProcessor.
Combine Mode
Sometimes you may want to simply combine multiple files together without running the JSMin or CSSMin modes. You may like to spread our CSS across multiple files so they are easier to organize and allow multiple developers to access concurrently. The Combine mode will allow you to combine these files into one either during the build and deployment process or even at runtime if you choose. In the 4.0.3 release I added features to make it possible to push out your files in this way.
UpdateWebConfig
I automate as much as I can on a project. One of the most critical changes during deployment is updating the configuration file. To do this I make use of web site projects along with the web deployment project. This process creates a pre-compiled web site which is ready for deployment and while it does have a feature to replace sections of the configuration file, it needs to be more targeted.
Read the rest of this entry »
Posted in asp.net, code, css, javascript, msbuild, web | 5 Comments »
February 25th, 2009
Back in 2004 I wrote A Great Example of CSS and Javascript in Action which explained how to use CSS and JavaScript carefully due to the varying browser experiences at the time. The situation has changed quite a bit since then. We no longer have to support Netscape 4 or Internet Explorer 5. Now there is a push spreading widely to end support for IE6. (Read The End of IE6) And this time there is a significant amount of resistance. IE6 seems entrenched and there has been push back on not supporting this old browser.
Consider if I were to loan you my laptop that I bought in 2001. It is very slow and cannot run many of the applications that you use today and has a 10GB hard drive. Most iPods have more storage space. You would not want to use that laptop. You may refuse to use it because it is just not worth your time to deal with the headaches of finding old ways to do what takes so much less effort with a computer purchased in the last 3 years.
Read the rest of this entry »
Posted in css, html, ie6, internet, javascript, web | Comments Off
February 20th, 2009

Internet Explorer 6 was released in August of 2001. Since then Microsoft delayed any new releases after achieving dominance in the browser market which effectively ended the browser wars of the late 90's. In a previous post I suggested the dominance of IE6 and lack of releases over several years was bad, but also good because it offered a "stable" base that we could build on. In the late 90's there were frequent releases of Netscape and Internet Explorer with amazing new features and it was hard to keep up. At least with no releases for the browser with 90% of the market share you could stick with what you had. But now it is time to move forward.
Starting with Google Mail everything changed. Suddenly you could build rich applications than run on web sites. And thanks to the rising popularity of AJAX many more sites jumped forward into what became known at Web 2.0. Now it is common for a site like Facebook to act more like an application than a collection of pages. You have a task bar at the bottom to show notifications and keep active chats going with friends even as you browse to different areas to look at photos and post comments on your friend's walls. In order to run as an application a web site requires more resources, and Internet Explorer 6 is just not capable of providing the experience that people want.
Read the rest of this entry »
Posted in ajax, css, ie6, internet, javascript, microsoft, web | 12 Comments »
February 8th, 2009
Packer for .NET has been updated to provide an easy way to return the minified content directly for a web request. Until now the process of "minifying" content was done either on the command-line or with with MSBuild.
The task of creating the compacted content can easily be forgotten during a deployment. And when the source control system locks the output files which are updated with the build script there can be trouble in both writing out the files as well as keeping the files current in source control. So instead of referencing the generate file it would be useful to reference the source files dynamically. Read on for an example.
Read the rest of this entry »
Posted in asp.net, code, css, javascript, msbuild | 3 Comments »
November 23rd, 2008
Packer for .NET has been updated to include a CSS Minify mode which does the same for CSS that JSMin does for JavaScript. Thanks for this addition goes to Chris Lienert who updated the open source project with work done by Daniel Crenna and Michael Ash to port YUI Compressor.
Why Minify CSS?
CSS can be very complex and it helps to place inline comments in your stylesheets to assist with maintenance. These comments can explain workarounds which are used to support cross-browser layouts. We all have workarounds or even hacks to support legacy browsers like IE6. Often these techniques do not make much sense when they are viewed months later without any context. Normally comments are left out of CSS files because they increase the size of the documents and reveal internal details to any curious developer digging through your code. Now you can minify your CSS during your deployment process with Packer for .NET to strip your comments and unnecessary whitespace. The minification process also uses other techniques to further reduce the size of the output document.
More information:
Update: Version 4.0.2 is out which includes updates to includes wildcard expansion for the command-line utility. There was also a bug where the output file could not match the input file which has been fixed.
Posted in css, dotnet, javascript, msbuild, tech, web | 2 Comments »
November 10th, 2008
Tomorrow in Milwaukee and Wednesday in Fox Valley I will be presenting "Embracing jQuery." The presentation is made up of four parts:
- The Basics of HTML, CSS and JavaScript
- JavaScript Tools
- jQuery Basics
- jQuery Advanced
Last week I gave this presentation in Madison and it was very well received. And this presentation is not .NET specific, so if you have any interest just in jQuery and AJAX please feel free to attend this presentation. I will be going through everything you need to know to start building interactive web interfaces with jQuery.
Below is the information for the Milwaukee and Fox Valley meetings:
Milwaukee
November 11
7:00PM
Direct Supply Inc
6663 N Industrial Road
Milwaukee, WI 53223
Map
Fox Valley
November 12
6:00PM
Fox Valley Technical College
Room A161A
1825 N. Bluemound Road
Appleton, Wisconsin 54912
Map
Posted in tech | Comments Off
November 4th, 2008
New hosting services in the cloud like Amazon Web Services and Windows Azure could make for solid torrent servers. Podcast and screencast services like .NET Rocks and dnrTV produce content which is pulled down primarily with torrent feeds. Typically services which release new content do so on a schedule and hit suddenly with a considerable amount of traffic which makes torrents the best option. But then there are times after most users have all of the latest content and the servers sit idle, or worse yet, there is a limited number of seeding servers which causes delays during peak periods for all users. With these new "cloud" services it could be possible to fire up supporting extra seed servers during peak periods and power them down when they are not needed.
The appeal that I see with Amazon WS is the fact that the charges are accumulated by the hour. Amazon WS also has an API to allow developers to create control systems to manage their virtual servers. With the API you could fire up the additional seed servers as new content is pushed to the primary seeding server to replicate the content ahead of publishing the new torrent content in the RSS feed used by torrent clients like µTorrent.
And hosting content is not that expensive. I recently saw hosting for 1 terabyte of bandwidth for about $7 a month. That is really quite cheap if someone wanted to produce their own audio or video content and make it available on a minimal budget. It should not be necessary to rely solely on YouTube to host your video content. You could produce quality video and host it yourself on a virtual servers in the cloud and not have to deal with the low quality video that YouTube is still using. Services like hulu.com are pretty impressive. I have been watching full screen movies on my 37" LCD with my attached LCD TV and it is better quality than Time Warner cable.
Connect the dots and you can see that the traditional media distribution mechanisms are already far out of date.
Posted in cloud, tech, web | Comments Off