Adding An XML Sitemap to a Website

In 2005, the search engine Google launched the Sitemap 0.84 Protocol, which would be using the XML format. A sitemap is a way of organizing a website, identifying the URLs and the data under each section. Previously, the sitemaps were primarily geared for the users of the website. However, Google's XML format was designed for the search engines, allowing them to find the data faster and more efficiently.

Even the most simple sitemap to a website is quite important in order to allow search engines such as Google and Microsoft Live Search to crawl your website for any changes. The following example shows what a basic XML sitemap contains:

<?xml version="1.0" encoding="UTF-8" ?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>/blog/</loc> 
<priority>0.5</priority> 
<changefreq>weekly</changefreq> 
</url>
</urlset>

As you can see the sitemap contain the following:
  • <loc> = Location of the page
  • <priority> = The priority of a particular URL relative to other pages on the same site. The value for this tag is a number between 0.0 and 1.0, where 0.0 identifies the lowest priority page(s) on your site and 1.0 identifies the highest priority page(s) on your site.
    The default priority of a page is 0.5.
  • <changefreq> = This value indicates how frequently the content at a particular URL is likely to change.

Thankfully, there is a site that will automatically generate an XML sitemap for you: http://www.sitemapspal.com/

I have written a blog post a little while back on how to manually submit your sitemap to search engines which proves to be quite useful if you find that your site has not been crawled for a long time. You can find that blog post here.

Making my way through an MCTS book

Over the last couple of months I have been reading through the "MCTS .NET Framework 2.0 for Web Applications" book in order to gain the first of what would hopefully be one of many Microsoft certifications. After reading the first couple of chapters, I found it to be a little daunting to say the least due to the fact that there are many coding techniques to get your head around. At the same time I have found it to be very useful in understanding good programming practices. Previously when I coded anything my motto was along the lines of "as long as the website works..." Not a good motto...

I found the first couple of chapters were the most straight-forward and really showed me how much of a crap programmer I am. Even though the "MCTS .NET Framework 2.0 for Web Applications" book is very good I found that it lacked a bit more explanation in the more technical chapters as you carry on reading. So I decided to use a another C# book (unless you are going to read Visual Basic) to fill in the missing gap.

The book I recommend is Murach's C# 2005 book which you can purchase here. It teaches you all the basic C# features that have carried over from earlier editions of C# that you'll use every day and underlying OOP concepts and features like inheritance and interfaces that make you a savvy, confident developer. This way you can use the MCTS book as a guide on what you need to learn and the C# book for further info.The same author has also written a coding book for VB as well which will be worth a read for people attempting the Visual Basic coding format.

I just hope I have the energy to carry on reading...

Could Writing a Blog Post Get Any Easier???

I have just installed Window Live Messenger 8.5. Yes, you might be thinking I have been a little late installing the latest version of Messenger. The reason for this is because I really had no reason to. After all I use Messenger just to talk to my friends. Nothing more, nothing less.

Anyway. Back to this blog post. Windows Live Messenger 8.5 has a really neat tool to manage you own blog. It is called Windows Live Writer (WLW). WLW has to be the most useful application for anyone who is an avid blogger. It features a WYSIWYG authoring, photo-publishing and map-publishing functionality, and is currently compatible with Windows Live Spaces, Blogger, LiveJournal, TypePad, Wordpress, Community_Server, PBlogs.gr, JournalHome, the MetaWeblog API, and the Moveable Type API. Even if your blogging engine is not listed here I am sure WLW will be compatible. For example, my blogging engine is BlogEngine and I was able to connect WLW to it really easily!

There are many extensions available to add extra functionality to WLW which you can find here. I highly recommend downloading "Code Snippet". This extension makes inserting code a breeze!

Code Snippet In Use:

// Hello1.cs
public class Hello1
{
   public static void Main()
   {
      System.Console.WriteLine("Hello, World!");
   }
}

 
WLW user interface is just as what you'd expect from the Microsoft product family. Very easy and intuitive to use:

WLWScreen

If you have not already tried WLW I highly recommend it. You can download WLW without installing Windows Live Messenger here.

Is an Arraylist still in use?

When I first started using ASP.NET 1.1, I always used an Arraylist to iterate through most of my collections. However, when I started using ASP.NET 2.0 I was introduced to Generic Lists. The List<T> class is the generic equivalent of the ArrayList class. It implements the IList<T> generic interface using an array whose size is dynamically increased as required. This means the List class performs much better in most cases and more importantly it is "type" safe.

So I am not too sure why you would ever need to use an Arraylist since a Generic List class is able to do exactly the same thing with the added benefit of extra perfomance. So is the Arraylist still widely used in todays standards? I guess it still must be in use if Microsoft has not omitted it from their Framework. Maybe Microsoft has something in store for the Arraylist in their grand plan.

Here are a few useful links:

C# Corner - C# Generics
Josh Williams MSDN Blog - Arraylist vs. Generic List
MSDN Network - List (T) Generic Class