//Monday, 17 December 2007

Toolset (Part 2) - HTML and CSS

W3C Markup Validation Service
Visual Studio will validate your HTML but this won't tell you if your final page is compliant with W3C Standards since server controls may output invalid HTML or you may write out HTML in your code behind.

http://validator.w3.org/

I usually use the Validate by Direct Input tab because often your site won't be publicly accessible during development. I just View Source and copy and paste the HTML in manually.

Having valid (X)HTML is not necessarily a requirement for intranet sites/applications because often a particular platform is being targeted. Internet Explorer (certainly pre v7) tends to be quite forgiving of errors in your markup. However all public websites should be valid to ensure they are accessible to as many users as possible.

Internet Explorer Developer Toolbar
This is a toolbar addin for Internet Explorer that helps you to diagnose HTML/CSS problems. Particularly useful is the function that allows you to select HTML elements on the page. This is good for analyzing layout problems to identify which element is giving you problems. You can also edit the CSS of elements on the fly to allow you to try out attributes like widths and heights which can be a lot quicker than going through lots of cycles of editing the code, refreshing the page, etc.

Internet Explorer Developer Toolbar

Firebug
This is an add-in for Firefox that does basically the same thing as the above add-in for Internet Explorer. Additionally, you can use it to debug Javascript.

Firebug

In combination these two add-ins usually allow me to diagnose my browser-specific CSS or Javascript issues.

//Monday, 10 December 2007

Toolset (Part 1) - SysInternals

I thought I'd do a regular post on the free tools I often use in development. Some are nice to have, some I now find completely indispensable.

The SysInternals website (acquired by Microsoft in 2006) provides a number of tools which can be very useful to help developers diagnose system problems.

http://technet.microsoft.com/en-us/sysinternals/default.aspx

Here is a brief summary of some of the most useful:

Process Explorer
This tool allows you to identify what process has a particular file locked. This can be useful when you are trying to delete a file and you keep getting an Access Denied error. If you run ProcessExplorer and select Find...Find Handle or dll... and enter the file or folder you are having problems with it will display the process that has it locked.

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

FileMon
This tool is useful for identifying the source of access denied errors that you suspect are the result of access rights problems. Often you can get access denied errors from a web application when trying to access certain files and it will turn out that you are not running as the user you expected to be. FileMon allows you to monitor all file activity on your PC. Consequently the log can fill up pretty quickly as such you will need to filter your results to the application you are interested in e.g. aspnet_wp.exe (or w3wp.exe on IIS 6).

http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx

RegMon
This tool allows you to diagnose access problems that effect the registry. Similar to FileMon above you will need to filter the results to the application you are interested in e.g. aspnet_wp.exe (or w3wp.exe on IIS 6).

http://technet.microsoft.com/en-us/sysinternals/bb896652.aspx

ProcessMonitor
According to the sysinternals website ProcessMonitor replaces FileMon and RegMon for Windows 2000 and upwards and contains a number of enhancements. I haven't used this before but it might be worth checking out.

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

SyntaxHighlighter