Software Developement »

[7 Oct 2010 | 0 Comments]

We have recently upgraded our development environments on my project to match the production environment which is running on a 64bit servers. There was a big gotcha which was the delayed signed dll’s in the dev environment were chucking a “Strong name validation failed” error when they were accessed.

There are well documented solutions around using the following command

SN.exe -Vr *,*

However this did not work on the 64bit computer because SN.exe is a 32bit program and put the entry in the 32bit part of the registry. So I moved the registry key this tool enters and put it in the 64bit part of the registry and then everything worked.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,*]

Hope that helps some people out there ;)

MS CRM4, MS CRM, C#, programming, Software Developement »

[17 Sep 2010 | 0 Comments]

Now this might seem like something that would be easy to do but I’ve just spent 2 days struggling to do just this because of what I consider a bug in one of the SDK wrappers. I have now found a work around to enable unit testing which I will share with you now.

The Error message

Test method XrmEntityWrappers.Tests.CaseEntity.GetCaseByTicketNumber threw exception:  System.TypeInitializationException: The type initializer for 'Microsoft.Xrm.Client.Caching.Cache' threw an exception. --->  System.IO.DirectoryNotFoundException: Could not find a part of the path 'appDomain=UnitTestAdapterDomain_ForC:\Projects\Thg.Ohov.Crm\SourceCode\Thg.Ohov.Crm\TestResults\dh27_WIN-51UPWVCUQ6V 2010-09-16 18_21_40\Out\XrmEntityWrappers.Tests.dll:key=Microsoft.Xrm.Client.Caching.InMemoryCacheProvider'..

System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
b__0(Object userData)
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
Microsoft.Xrm.Client.Threading.MutexExtensions.Lock(String key, Int32 millisecondsTimeout, Action`1 action)
Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 millisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService)
Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 millisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService, Action`2 addToCache)
Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Func`2 loadFromCache, Func`2 loadFromService, Action`2 addToCache)
Microsoft.Xrm.Client.Caching.InMemoryCacheProvider.GetExtendedCache()
Microsoft.Xrm.Client.Caching.CacheManager.GetExtendedCache()
Microsoft.Xrm.Client.Caching.Cache..cctor()
Microsoft.Xrm.Client.Caching.Cache.Get[T](String label, Func`2 load)
Microsoft.Xrm.Client.CrmConnection..ctor(String connectionStringName, String connectionString)
Microsoft.Xrm.Client.CrmConnection.Parse(String connectionString)
Thg.Ohov.Crm.Core.XrmEntityWrappers.XrmAdapter..ctor() in C:\Projects\Thg.Ohov.Crm\SourceCode\Thg.Ohov.Crm\Core\XrmEntityWrappers\XrmAdapter.cs: line 28
Thg.Ohov.Crm.Core.XrmEntityWrappers.incident.get_XrmAdapter() in C:\Projects\Thg.Ohov.Crm\SourceCode\Thg.Ohov.Crm\Core\XrmEntityWrappers\incident.cs: line 25
Thg.Ohov.Crm.Core.XrmEntityWrappers.incident.GetIncident(String caseId) in C:\Projects\Thg.Ohov.Crm\SourceCode\Thg.Ohov.Crm\Core\XrmEntityWrappers\incident.cs: line 44
XrmEntityWrappers.Tests.CaseEntity.GetCaseByTicketNumber() in C:\Projects\Thg.Ohov.Crm\SourceCode\Thg.Ohov.Crm\XrmEntityWrappers.Tests\CaseEntity.cs: line 23

The reason for the error

The Microsoft.Xrm.Client.dll tries to create a Mutex object with the

Thread.GetDomain().FriendlyName;

When running ordinary in a console app or web app this is not a problem as the FriendlyName does not contain any ‘\’ characters. However UnitTest frameworks do put ‘\’ characters in the GetDomain().FriendlyName which then causes the Mutex object to throw a ‘System.IO.DirectoryNotFoundException’.

The fix

The real fix is for Microsoft to update the Microsoft.Xrm.Client.dll so that it doesn’t put any ‘\’ characters into the Mutex constructor. However my work around for this is thanks to Nick Watkins who found this article on how to change the GetDomain().FriendlyName

http://www.timvasil.com/blog14/post/2008/11/Fixing-Instance-names-used-for-writing-to-custom-counters-must-be-127-characters-or-less.aspx

The key bit of code being this if you want to set the FriendlyName to ‘Test’ (which doesn’t have any ‘\’ characters!):

typeof(AppDomain).GetMethod("nSetupFriendlyName", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(AppDomain.CurrentDomain, new object[] { "Test" });

To rename the GetDomain().FriendlyName before calling any of the wrapper code in the unit tests. So the test might look a bit like this:

[TestMethod()]
        public void GetIncidentTest()
        {

typeof(AppDomain).GetMethod("nSetupFriendlyName", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(AppDomain.CurrentDomain, new object[] { "Test" });

            string caseId = "1234"; // TODO: Initialize to an appropriate value
            incident expected = null; // TODO: Initialize to an appropriate value
            incident actual;
            actual = incident.GetIncident(caseId);
            Assert.AreEqual(expected, actual);

}

Summary

I’m happy now I can unit test my custom code that uses the xRM Wrappers and I hope that my support call with Microsoft will result in the SDK dll being updated.

WP7, Software Developement, programming, Windows Phone 7 »

[29 Jul 2010 | 1 Comments]

Just writing a quick article about going to the first Windows Phone 7 User Group @wpug last night. With the device release within touching distance I get a feeling there is more and more excitement growing about the device and what developers will be able to do with it.

First off a bit thank you to Matt Lacey for organising the event, EMC Consulting (especially Michelle Flynn)hosting the event and Microsoft for great information about what is happening, buying beer and showing off some prototype phones.

It was a great format, an opening presentation then 5 demo’s from participants an a closing presentation.

Is Microsoft doing any thing new?

Personally I don’t think that there is anything particularly new in what Microsoft is offering. What is new is how it has been packaged up and delivered to the end user with a lovely new handsets and OS. The core components of building applications on Windows Phone 7 are:

  • Visual Studio
  • Expression Blend
  • Silverlight
  • Xna

wpug All these tools are tried and tested, they are well known, they have excellent support from both Microsoft and the development community. I think this is fantastic, it really lowers the risk of developing an app for this device. Microsoft are just leveraging these existing technologies to make development easy.

 

 

 

Is Microsoft doing anything differently?

I think this is a big YES. Microsoft know that it is them ‘on the hook’ for the user’s experience so they are taking ownership of a lot of what controls this.

The devices are new but Microsoft have set a very high minimum specification for the hardware manufacturers. This is again excellent news, I feel that a number of the Windows Mobile handsets were underpowered and gave a poor user experience.

The Marketplace is the only way that you can get apps onto your handset (unless you have unlocked your phone via a Marketplace developer account). Again this is excellent news for two reasons.

  • Before finding an app was hard. They were very distributed with a few 3rd party market places or vendors selling their apps on their own websites. The new Marketplace means that there will only be one place to look and one way to purchase which puts this important part of the user experience right in Microsoft’s control
  • Microsoft can ensure the quality of the apps that are put on the Marketplace. This should mean that people don’t pay for or have to wade through 1000’s of sub quality apps that would reduce that all important user experience.

The last thing which I think will make a difference is how controlled 3rd party software is on the device. While the device is multi-tasking 3rd party apps are not allowed to leverage this. The reason being that badly behaving applications running in the background could drain the battery, use cpu and generally slow down the device. Making 3rd party software exit when a phone call is received for example is a sensible approach but a little frustrating for us developers.

A big thanks to Microsoft’s Paul Foster for his very interesting session about what’s going on with Windows Phone 7 and an even giving me the chance to use his prototype phone.

It is easy to create an application

Yes it is very easy. The development tools are free and can be downloaded from http://developer.windowsphone.com/ .

There are some excellent tutorial labs to follow which are very clear and easy to follow. They touch on all the key points of development using the development tools and the Windows Phone 7 os. I blogged about my attempt to create an iPhone app back in January which was a horrendous experience, I found this process much clearer and painless. I have been a .Net developer for 10 years which probably helped but I’m sure that the Microsoft tools are far superior to Apple’s XCode IDE.

Rob Fonseca-Ensor showed how easy it was to create an Xna game on the phone, and it was surprisingly easy. Create a picture, load it in the app and then pop it on the screen and that was about it.

At the user group there were 5 demo’s of apps that people had created. The app which I thought was the best (although I naturally voted for myself!) was Hosain’s tube app. It was a beautify clean design with lots of useful information being displayed from a data feed on the TFL website. I spoke to him afterwards and he had only spent about a week on the app, very impressive.

Other slick apps that were shown where UkTree’s CryoDefense which was a Tower Defence game. This was a very nice game created by seasoned mobile developers.

 KeyboardP had created a really nice app to store information that can be used In Case of Emergency (ICE) he also had the best line of the night:

“I hope you buy my app and never use it” KeyboardP

 

I didn’t spend much time on my app at all It was a client to read and display skillbooks from my www.skillbook.co.uk website. I spent a day doing the labs I downloaded and then a day writing the bulk of my app and it was really really easy. I had another few hours to do a few tweaks on the app but in total probably about 12 hours, plus it was the first time I had used Silverlight. I didn’t win the X-Box but I hope people found the concept useful, here is a video of my demo:

A video of me demoing my Skillbook App

 

 

 

 

 

 

 

 

 

 

 

Summary

I really enjoyed the event, it was great to see Microsoft engaging with the development community and to also see what other developers are doing on the platform.

I was pretty sceptical about the ‘new windows phone’ when I first heard about it because of the previous pain I have had with Windows Mobile. However Windows Phone 7 is a completely different beast and looks fantastic, and I for one am getting very excited about it’s launch in the not too distance future!

Software Developement, programming, Scrum »

[5 Mar 2010 | 2 Comments]

I have been following a new blog by Tim McOwan called www.devballs.com and it focuses on delivering software using a Scrum Process.

His latest article, Guess What? Scrum Developers should be cutting code, period! has provoked some interesting comments and my comment turned out to be so long I decided it should become an article in it’s own right. The comment I was replying to was from Jason Gorman, in a nutshell it was that Business Analysts are not required developers should work directly with the customer.

While I understood what was being said I could not agree with that point of view and it seems that it would be throwing the baby out with the bath water. It sounded very Us and Them which is a bad place to be and seemed to be describing problems associated with a waterfall approach rather than scrum.


I'm a developer and have learnt some very hard and expensive lessons over the last 2 years about the holistic success of software projects, not just [more] the technical success. This has given me a very different view and appreciation of what non-technical people bring to the overall success of a project, essentially removing that developer chip on my shoulder.

I strongly believe:
1)    That BA's can have an important role but are not always essential.
2)    Having a good manager is a must
3)    Using Scrum properly means that everyone knows and values what everyone else is doing.

The Manager

The reason you need a good manager / scrum master is to protect your developers from the customer and enforce the Scrum rules. They ensure the bits of the project jigsaw will fit together. They should be masters of the political game, they should be setting customer expectations, organising the customer's people to be available, keeping them up-to-date, making sure that the developers don't have any impediments stopping their development, keeping an eye on the team, settle any disputes etc. They don't need to cut code they just need to pull it all together. And if they are good nobody notices how hard/well they are working. (well I notice nowadays).

The Business Analyst (BA)

It is a common experience that developers have of a BA who don't deliver great information. However they do get a first version of this information and that can be a full time job in itself. It is hard to organise meetings with the customer. How many times at a first meeting do you ask someone what they want and they just have not thought about it. How many times does one department know what they do but are not really sure what other departments do and fit in. There's another meeting to organise and another then another. Finding out who does what is really really hard and takes a long time. As a developer I don't want to do that for days or weeks at a time, I want to be cutting code.


Where there is complexity and uncertainty in the business requirements let the BA's at it so that an overall picture can emerge and prioritisation of what delivers the most business value can happen. However if it is a fairly small, well defined business requirement I don't think you would need a BA and letting the developer engage directly with the customer would work very well.


The BA also serves another role which is essentially after sales / customer care. Once the software has been written and made live the BA should go back to the customer and see how well it is working. It could be the new software has thrown up some unforeseen problems. This is all very time consuming and having a highly skilled developer doing this makes little sense. It requires a personal and working relationship between the project team and the customer again this takes time to develop. Let the BA’s do this which frees up the developers to write software.

The Developer

We like creating stuff, we like solving technical problems playing with latest technologies, new software packages, coding techniques. Letting a developer loose with the customer to get requirements could quickly turn into an indulgence of what we want to do rather than solving business problems. We will be coming up with the technical solution to a problem before the problem has been properly thought through. It is fairly easy to persuading the customer they need a more complicated solution than is required.


By giving the developers a first version of the requirements and then let us think of the solution is a much more sensible approach. Yes the requirements will consist of nonsense and contradictions but the general direction has been set and we just need to work through the detail. The BA’s and customer will be on hand to help navigate this minefield.

Scrum

Here’s the kicker, using scrum properly ensures high communication and visibility between everyone involved in the project. There should not be “developers in meeting rooms  gassing about it with analysts and managers”. The analysts should be on hand to sit with you when you develop something, even better – get the customer involved. The dev’s will see what the BA’s are doing and visa-versa which should foster a sense of ‘Team’ and if someone isn’t delivering value it will become apparent pretty quickly. They should either be helped to perform or removed from the team.

 

Summary

So in summary, a scrum team needs these different roles and everyone brings value to the project and if they don’t it will be seen and there should be systems to deal with them. The manager protects the dev team and brings it all together, the BA’s build relationships with the business and get requirements and makes sure that the software has delivered value, the dev team get 3 week sprints to develop working software and are able to call on the BA’s / customers to clarify any nonsense and contradictions.


I read a book about 6 years ago called Coding Slave by Bob Reselman, it was a good read. One bit stuck in my mind and that was us coders are like Charlemagne’s scribes and I think this is very true:
http://www.informit.com/articles/article.aspx?p=170198

It has taken me a long time to appreciate this but now I appreciate the value others bring I am much happier in my own work.

Software Developement, Human Interaction »

[27 Aug 2009 | 0 Comments]

One thing that I have had to do over the last year is to hire people to help build by websites. Anyone that has been in the hiring position will know the pain that follows placing an advert… the deluge of CV’s which are generally very poor quality. I was discussing recently with some colleagues the filtering technique for applicants I use which has been very successful for me. It was pointed out to me that I was essentially implementing a CAPTCHA system – but in the physical rather than virtual world.

The idea is [more] simple, just create a simple task which makes the applicant think and spend a little bit of time on, just to show they are not just carpet bombing jobs with their CV. I generally choose the task to match the job.

For example:

1) If I’m looking for a web developer I might ask them to list 3 websites they like and why and / or write 150 words on an Internet trend they find interesting.

2) If I’m looking for someone to talk to customers I have setup a voicemail box and ask them to call it and read out a simple set passage.

What has been my success? Applicant numbers were well down but I’ve have a high percentage of hires from the people I interview. I am still looking for a MS Access developer after 6 weeks but I am not wasting my time going through sub-standard CV’s or having awkward interviews where the person is clearly not up to the job. I still find it amazing that people submit CV’s and expect me to give then a job worth 10’s of 1000’s of pounds even though they cannot be bothered to complete a simple task for me.

I’m sure people can dream up their own small tests just to make sure that the person applying has properly read the job description and really does want the job – rather than the robotic mass submitting that seems to go on.

Projects, Software Developement »

[28 Jul 2009 | 2 Comments]

It was 2 weeks ago now but I had the privilege of giving a 20 minute talk at the £5 App event in Brighton.

My slide deck of the talk will be at the bottom of this post for download if anyone is interested. The event was recorded by Ian Ozsvald and posted on his blog as well as the £5 App website.

I talked about quitting my job and hiring a small team to help develop the websites I had created into something with more quality and could be a commercial success. I wish I had had a little more time as I didn’t get do demo any of the functionality but it was great to be able to talk about them! The websites are http://www.skillbook.co.uk http://www.safetytrainingnetwork.co.uk and http://www.trainingcoursebooker.com .

On reflection there was one point which I wish I had made. I have spent most of my career working for large companies which we can call ‘The Man’ and at the talk I was congratulated for ditching ‘The Man’ and doing my own thing. However this implies that working for ‘The Man’ is a bad thing and this is where I wish I had made the following point.

In my opinion [more]getting experience working for ‘The Man’ is a very valuable as long as you use it in the right way. There is no doubt that the companies I have worked for have exploited my skills to make them money, however I have learnt a lot about how things should be done and taken advantage of the opportunities they had to offer. I have been sent on lots of training, worked with very experience people, worked on large projects, given teams of people to run, worked with new technologies, been show technical best practice and this is only on the professional side of things. Don’t forget that you can earn a very good salary from The Man and have added benefits such as pensions and health insurance, these are all things that I have had to give up to follow my dream. My main bit of advice is to update your CV every year when working for The Man, if you find you have nothing to add to it one year then it is time to move on or up, don’t get stuck in a rut.

So here I am now after spending all the money I had and borrowing as much as I can to finance my websites. They have just started to generate a trickle of income which seems to be building week on week and I am wondering what options I have in front of me to keep my dream going, as I think I just need more time for things to pick up now. I have looked at grants but this doesn’t seem possible, I have spoken to Business Link who were as helpful as a chocolate teapot, I have spoken to the bank who will want the rest of the equity in my house and proof my website can make money, I’ve maxed out the overdraft at the bank of Mum and Dad, do I start looking for an Angel investor – quiet possibly – but do I need to give away equity at this stage? Get rid of my team? NO NO NO – I have a great team and they have to stay and work on the sites. The solution I have come up with is to go back to ‘The Man’ as a contractor. This time it is a large utility company, the pay is good and should cover the salaries of the rest of the team while the contract lasts and in a few months I am expecting the trickle of income to have swelled to a decent stream or perhaps a river, if it hasn’t then perhaps another avenue will be pursued.

My point here is that having had experience in the past working for ‘The Man’ has given me options now to find a new job for ‘The Man’ in the middle of the recession to continue financing my project. You can only get these jobs if you have the right experience so working for ‘The Man’ is not always a bad thing – just always try your hardest, don’t get too comfortable and become stuck in a rut!

£5 App #18 - David Hawes on Safety Training Network from Ian Ozsvald on Vimeo.

 

My slide deck (very basic I’m afraid!!)

ASP.net, MVC, C#, Software Developement »

[11 Mar 2009 | 6 Comments]

I have managed to arrange Ian Crowther, an ex-colleague from Avanade, to come and do a brown bag session for me and my employees this Saturday 14th March at my office near Haslemere in the UK.

Ian has been working a lot with Microsoft’s MVC.net and Yahoo UI recently. He is going to give a presentation and then run a practical coding workshop on Microsoft’s MVC.net and Yahoo UI showing how to combine them to [more]produce some sexy looking websites. In the workshop we are going to attempt to re-implement a recent asp.net web forms project See The Link have been working on as an asp.net MVC.net project. I’m really excited to find out more about how this will work and what the result will be! If they are good I’m hoping to put the MVC.net version live instead of the original web forms version.

I know that it is short notice but I am opening up this event to any techies who might be interested. I have space for another 3 people so if you want to come along then ping me an email before this Friday. We will be starting at 10am on Saturday going onto whenever (hopefully be about 4-6 hours or so)!

ASP.net, BlogEngine.NET, C#, Software Developement »

[6 Feb 2009 | 6 Comments]

I have been using Blogengine.net for over a year now and have thought it is a great application. In this post I will tell you how I have successfully tweaked it to deliver a lightweight CMS system that I required. (I have published the source code at the bottom of this article)

At the time of writing I have successfully implemented a few websites powered completely with Blogengine.net:

http://www.seethelink.co.uk

http://www.petersfieldparish.org.uk

http://www.tonytinman.co.uk

http://www.marvelav.com

[more]Some of the things that I really like about Blogengine.net is how it can run just using Xml file out of the box and if you want to use a database you can. I like all the Search Engine Optimizations you get for free, I like how it implements semantic web technologies, I like how you can use 3rd Party tools to edit content (Live Writer for example)... the list goes on and on.

I have recently quit my job at Avanade and have setup my own website which I'm hoping to make a living out of. To pay the bills in the mean time I have been picking up small projects along the way. One of these was for a local parish church Petersfield Parish website. The main thing they wanted was a calendar of events & services which I completed using a standard asp.net website. They also wanted to allow members of the parish to contribute news items to the site which I thought was a perfect candidate for a blog solution.

I initially setup the blog with BlogEngine.net in a separate site and created an RSS reader to pull through the latest articles to the main site. However it wasn't the best solution as it would be nicer to have it all under one roof. I was also having problems with the site's webmaster has he used a Mac and Dreamweaver which was having all sorts of problems understanding the asp.net pages and breaking the site when new content was uploaded.

With these two problems to solve I decided to look at using BlogEngine.net to host all the content as well as the blog so the the webmaster could create and maintain content online with no risk of breaking the site and the contributors and blog articles would be under one roof.

I found this article about using Blogengine.net as a CMS solution but it seemed kind of fiddly as all the pages had to be standard.net pages with a usercontrol embedded in them for the content which would still leave me with my webmaster problem and I also thought this is essentially what Blogengine.net pages do.

So I decided to see if I could use the standard BlogEngine.net functionality to create the whole site. To my joy it was pretty straight forward to get 80% of the way there. I created a new theme based on the original site I had created and it looked the business. However there were a number of problems. The pages were in a random order and I wasn't sure how to get my funky calendar controls to work.

Fixing the page sort order was pretty straight forward as I just added a new property to the page entity in the XmlProvider to take an integer. I then amended the PageSiteMap class to sort the pages based on the new value and then Robert is your fathers brother.

I was still struggling with the calendar controls when I spied something in the BlogEngine.net source code

ERROR - UNABLE TO LOAD CONTROL : ~/path/usercontrol.ascx

Here was some standard functionality that I had not known about allowing me to drop usercontrols in to the generated pages. As I had already put my funky calendar controls in usercontrols so it was pretty straight forward to pop them in my new Blogengine.net pages. Then I had exactly what I wanted and a very happy customer (I had over delivered and undercharge.... again!)

Here is a link to the services usercontrol embedded in a page: http://www.petersfieldparish.org.uk/page/Services.aspx

The homepage has a few usercontrols, a couple pulling the last 3 articles contributed through as a summary and one showing today's services.

I then got my graphic designer to knock up a new theme for my company's, See The Link, website and very quickly I had a great looking website which is easy to maintain 100% created with Blogengine.net for us as well.

It has just re-enforced my view that is this a great product!

 

DaveHawes.BlogEngineTweaks.zip (12.59 kb)

C#, Software Developement »

[11 Oct 2008 | 0 Comments]

I was told about a new feature in C# 3.0 called extension methods back in 2007 sometime by the technical architect at my old company. He explained that Microsoft had created it to enable LINQ and that it allows you extend base classes with your own functions, which is pretty cool. But what's a useful example?

Peter (my TA) said [more] that creating a StartOfDay and EndOfDay function for the .Net DateTime class might be useful and today I needed those functions so I have decided to write them blog how I did it.

 

   1:  public static class ExtensionMethods   {
   2:   
   3:          public static DateTime EndOfDay(this DateTime input)
   4:          {
   5:              return new DateTime(input.Year, input.Month, input.Day, 23, 59, 59, 59);
   6:          }
   7:   
   8:          public static DateTime StartOfDay(this DateTime input)
   9:          {
  10:              return new DateTime(input.Year, input.Month, input.Day, 00, 00, 00, 00);
  11:          }
  12:    }
 

So now I can write the following code as the .Net DateTime class now has my new functions included:

 

   1:  private static FieldBetweenPredicate AvailabilityFilter(DateTime selectedDate)   {
   2:        return new FieldBetweenPredicate(PersonAppointmentsFields.StartDate, selectedDate.StartOfDay(), selectedDate.EndOfDay());
   3:  }

Thanks to David Hayden's blog for reminding me how to write them!

http://www.davidhayden.com/blog/dave/archive/2006/11/30/ExtensionMethodsCSharp.aspx

New note 02/Jan/2010: Just found another useful extension method for randomising a list: http://www.vbforums.com/showthread.php?s=51020c99595a4e123140a61ff2b00007&t=585855

Technorati Tags: ,,

Software Developement, MVC, ASP.net »

[6 Sep 2008 | 0 Comments]

While I've had my head stuck in Crm for the last year I appear to have missed a very important release for ASP.net - Microsoft's Model View Controller (MVC).

The majority of people I meet think that ASP.net is Webforms. This is not true.

ASP.net is the framework and [more] Webforms is what Microsoft gives out of the box to developers to create webpages. If you wanted you could write your own rendering engines on ASP.net and not even touch webforms - go back to Asp classic or php style of creating pages. However I like how Webforms is declarative, easy to read and I'm able to leverage work done others in a simple way.

So now Microsoft have released a second 'out of the box' method to create webpages with ASP.net to developers which (from what I've read so far) is superior to the initial Webforms option.

Things that are getting me excited about MVC method are:

  • Easy to write unit tests
  • Much more control over html output to create semantically correct html therefore fully leverage the power of css and get higher ranking on Google ;)
  • Plugable Javascript / Ajax engines

So when I get home tomorrow I'll be downloading, installing and having a play as I think this will enable me to create better quality webpages using ASP.net.

http://www.asp.net/mvc/

http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx