Site Improvements

Sun May 23 2010 by MarkP

Over the last month some minor improvements have been made to this site. One of the main issues was implementing a CAPTCHA system to prevent "spam attacks" when submitting form data. Initially I was a bit wary of using a CAPTCHA based system due to issues with accessibility and the negative feedback it tends to receive in general.

I reviewed a few alternatives which tended to rely on javascript, the basic premise being to distinguish between an actual form post orignating from the actual page rather than a faked post as implemented by many of the spam bots trawling the web.
Not being 100% convinced by this decided to research third party CAPTCHA systems that can be easily plugged into a website with very little configuration. After some "googling" I decided to implement Recaptcha onto the site.

All in all its a really neat plugin, my only issue being that I can never understand the audio that is generated, so may revisit this at a later date.

Another improvement was to include the facility to be able to retrieve my CV as a Microsoft Word docx or Adobe PDF file. Many employment agencies wanted to be able to retrieve a Word version of my CV so this option was added to the CV request form.

As the blog engine is generated using XML there was an issue relating to the HTML being stripped out when retrieving data from an XElement value in Linq. To work around this an extension method was created:

           1:  public static string PreserveHtml(this XElement xElement)
      
           2:  {
      
           3:              if (xElement == null) return string.Empty;
      
           4:   
      
           5:              var content = new StringBuilder();
      
           6:              foreach (XNode node in xElement.Nodes())
      
           7:              {
      
           8:                  content.Append(node.ToString(SaveOptions.DisableFormatting));
      
           9:              }
      
          10:   
      
          11:              return content.ToString();
      
          12:  }
      

This ensured the HTML in the description was preserved and formatted correctly in the RSS Feed.

Tags: MVC   CAPTCHA   XML  

Introduction

Sun Apr 11 2010 by MarkP

Welcome to the M P Consultants Ltd website. The site is built around the ASP.NET MVC Framework, using C#. The site has recently been redeveloped to include a blog facility, built directly for the ASP.NET MVC framework.

Due to certain restraints in hosting, there were limitations into what "backend" would be used to persist the data, which also limited the choice of third party blog engines which could be used.

The solution eventually was based purely around XML, which is lightweight, of a defined structure and can easily be imported into a database solution at a later date if required.

The development is ongoing (the blog engine is still in beta) and additional facilities will be added over the coming months.

Key areas I have focused for the first phase were as follows

  • XML data used to store articles, is RSS 2.0 compliant
  • Links are Search Engine Optimised (SEO) and articles can be filtered by title, category, year and month
  • Comments
  • Implementation of a Tag Cloud
  • Caching
  • Archive and latest articles display
  • XHTML Strict Compliance

Improvements will be being made over the coming months with any updates being posted as and when they occur.

Tags: MVC   ASP.NET   XML