Internet application development continued the style matching lecture material to assignment requirements. This seems like a very effective way to make the knowledge stick.

The topics this week were:

  • Validation Controls
  • Master Pages
  • Themes and Skins
  • Navigation Controls

All of these were required on our assignment which ensured we revised it in detail.

2007 stats, source: http://www.port80software.com/surveys/top1000webservers/

After working with ASP.NET I was really impressed and wondered how many large companies used it. The chart above is the web server market share for Fortune 1000 companies from mid 2007.

Validation controls in asp.net are:

  • Compare
  • Custom
  • Range
  • Regular expression
  • Required field

ASP.NET automatically creates javascript to allow the controls to show messages on-the-fly. I found the validation controls to be very convenient to create and customize using C#.

Some helpful regular expressions I got from this part of the assignment:

Email – “.*@.*\..*”

URL – “(\w+:\/{2}[\d\w-]+(\.[\d\w-]+)*(?:(?:\/[^\s/]*))*)”

Alphanumeric (6 min) Password – “^.*(?=.{6,90})(?=.*\d).*$”

The custom validations call on C# function but the regular expression validators are as simple as:

MasterPages, combined with Themes (.skin + .css) enabled very quick creation of a consistent, professional looking site.

The master page provides a template and the content page calls on a specific skin and CSS. The seems to be some debate over floating CSS layout vs tables and although I completed this page using tables to assist in layout I concede that floating CSS is probably superior.

Using XML to create a site map, ASP.NET can dynamically generate navigation menus and a user sitemap. This was very fast to complete and easy.

I am quite surprised at how good ASP.NET is and can now understand why a lot of Fortune 1000 use the windows platform for their web applications.

Home page of assignment 2 (using asp.net)