After attending a talk on Silverlight 4, MVVM and TDD with Jesse Liberty, I thought it would be an idea to find out more information on MVVM, James Green provided me with a number of worth while links by Jason Dollinger from Lab49. The main blog post is here http://blog.lab49.com/archives/2650 but the actual video is here http://www.lab49.com/files/videos/Jason%20Dolinger%20MVVM.wmv big download (about 1.5 hours).
When using WCF and Rest one thing you’re going to have to consider is the validation of the object, the way to do this is using the Validation Application Block included in the Microsoft Enterprise Library to validate the data transfer objects. This way you can decorate the objects with attributes to validated the objects
With MVC 2 now released, I have found a nice little feature for updating models.
The normal practice is to use, a mapping technique like this
public void Save(EmployeeViewModel employeeViewModel)
{
var employee = (from emp in dataContext.Employees
where emp.EmployeeID == employeeViewModel.EmployeeID
select emp).SingleOrDefault();
With WCF now being around for some time, it supports many protocols, mainly SOAP, but it does also support Rest, the question is how do you do it? Well I have got the sample working from the MSDN Magazine. If you’d like the full detailed explaintation then you can go to An Introduction To RESTful Services With WCF
Some times you need to cast from one object to the other, and then back again, the easiest way of doing this is using Interface casting, I’ve generated this simple project which show how it works.
MVC 2 has been released, I’ve been developing an application using the RC and I am very happy with the new features, there are so many, Areas, Auto-Scaffold UI Helpers with Template Customization which I just love.
Enums are a wonderful addition to .Net, but won’t it be nice to have a real world description that you can display to the user interface? Well you can, and here is how define an attribute (or use existing DisplayNameAttribute) and annotate your enum with names as additional meta-data:
I know that conditional breakpoints have been around for some time, I just keep forgetting how to set it, so I though it should be time write how to set a conditional breakpoint on my blog.
MVC 2 is ready for use and designed to work with both VS 2008, as well as with VS 2010. Click here to download the ASP.NET MVC 2 release candidate for .NET 3.5 and VS 2008. Nice thing is that it can be installed side-by-side with ASP.NET MVC on the same machine.
Many a time you use the <a href’#’ title=’display a message’ /> to display a message when you want some hover over text to display additional information, which is fine, but what if you want to display some more fancy text, lets say in HTML you are stuck.
When you are playing with Web Services you quite often find information held in an Attribute, but how do you get it out?
e.g.
public enum Classification {
[System.Xml.Serialization.XmlEnumAttribute(“Test drive demonstrator”)]
Testdrivedemonstrator,
[System.Xml.Serialization.XmlEnumAttribute(“Showroom vehicle”)]
Showroomvehicle,
By using reflection you can gain access to the attribute, here is how:
It’s a new year and it’s must be time for me to go over what toys I have played with in 2009.
Balsamiq Mockups must be the best application and tool that I have come across this year, after giving a talk to DotNetDevNet on the application I found that many other developers went ahead and bought the application too. NotePad+, which is an extended version of the very basic default NotePad that comes with Windows. Just replace your NotePad with this one and off you go. SysInternals Process Explorer I have used every day, mainly due to the fact that Windows does not handle resources and memory that well, so you have to have a tool to sort it out for you when things go wrong. GhostDoc is an internal tool for use with Visual Studio and cuts down the amount of time required for documentation, and does it right all the time. The biggest and most impressive toy last year has to be the purchase of a MacBook, it’s so much easier than Windows 7, XP or Vista, and things just work as they should do, well designed and well throughout, this gets 10 out of 10 for last years toys. I’m sure I’ve used some other toys last year, but these are the ones that I remember the most.
Having been using LINQ to SQL for some time now, I came across my very first issue “There is already an open DataReader associated with this Command which must be closed first.” it’s been some time since I had this issue.
After playing around with Combo boxes for a while within jQuery I thought it would be good to write down, mainly so I can remember how to find and play with properties from within jQuery. So here we go, here is the HTML that we’ll be using:
Mike Taulty of Microsoft has now sorted out the Videos from the event Scott spoke at: –
Visual Studio .NET
Silverlight
ASP.NET MVC
It’s time for me to upgrade my development computer, in order to do this I have a few requests of my new partnership, mainly due to the fact that Windows 7 has been out for a while, well from MSDN, and it has made a huge step forwards being able to harness the power of the processor.
I was given the task of installing Team Foundation Server on a single server, and there are a few things to check and need to have installed before you can install
First read and the supplied TFSInstall.chm install guide file. This is key – if you are new to the TFS install and do not follow the supplied “checklists” for your chosen set up, you will endure pain and agony.