August 2006 - Posts

Dependency Injection Pattern

http://www.martinfowler.com/articles/injection.html

I do like Martin Fowlers articles, such a clever computer guy.

Here's another article on it from the MSDN...

http://msdn.microsoft.com/msdnmag/issues/05/09/DesignPatterns/

Posted by dsmyth
Filed under:

NMock

NMock is a dynamic mock object library for .NET. Mock objects make it easier to test single components—often single classes—without relying on real implementations of all of the other components. This means we can test just one class, rather than a whole tree of objects, and can pinpoint bugs much more clearly. Mock objects are often used during Test Driven Development.

http://nmock.org/

I haven't had a chance to look at this yet, posted this as a reminder.

Posted by dsmyth
Filed under:

XQuery Engine for .NET

AltovaXML, makers of XMLSPY, have made their XML, XSLT and XQuery parsers available as a free download. This includes COM and .NET interfaces.

XQuery for .NET !!

http://www.altova.com/altovaxml.html

Posted by dsmyth | 1 comment(s)
Filed under:

Model View Presenter (the end of MVC?)

Couple of days ago I was asked about the Model-View-Controller and how it works. While I was doing my best to describe it I mentioned the newer Model-View-Presenter pattern but I couldn't quite remember the difference. Just so happens today, while reading an unrelated subject matter, this picture turns up. It demonstrates nicely the difference between the two patterns.

MVP Pattern

If you think of the main three objects as being spread over the three layers of a system, View in the application layer, Presenter/Controller in the business layer, and the Model in the data layer, then in MVC any business rules or logic that might be needed to prepare a model for viewing would have to be either in the View (application layer) or in the Model (data layer) which isn't very good, the MVP pattern solves that problem while keeping the idea behind the pattern. The MVC is a nice handy pattern but that is a bit of a flaw.

Posted by dsmyth
Filed under:

Wink

You know those training video's you get where someone demonstrates on screen an application or a windows feature or how to do something.... well Wink is a free little tool that lets you make them. Check it out.

http://www.debugmode.com/wink/

Posted by dsmyth
Filed under:

Get MAC Address - Windows API

Here is a link to an article that contains Windows API code for getting the MAC address of the computer. I haven't tried the code out in VBA but it's a nice piece of code to keep.

http://www.osix.net/modules/article/?id=2

Posted by dsmyth
Filed under:

SnippetEditor

Here's a nice little tool for adding and editing code snippets in Visual Studio 2005.

http://msdn.microsoft.com/vbasic/downloads/tools/snippeteditor/

 

Posted by dsmyth
Filed under:

Url Rewriting in ASP.NET v2.0

One of the stakeholders I was working for has pulled the plug on their project. They wanted to be established for Christmas and wanted the software ready by the end of the August to give time for search engines and advertising, which was a deadline I couldn't promise to meet. 

So now I have some spare time to port my homepage (currently offline) from ASP.NET 1.1 to ASP.NET v2.0.

Previously my homepage implemented it's own Url Rewriting through a custom HTTP Module, it was adequate but involved a lot of superfical assemblies to get working. ASP.NET v2.0 now supports Url Rewriting... so here's how to use it.

The process simply involves adding a section to the Web.Config file that maps one Url to another.

<system.web>
    <urlMappings enabled ="true">
       <add url="~/london.aspx" mappedUrl="slideshow.aspx?display=london"/>
    </urlMappings>
</system.web>

The example there shows how to add a url mapping between a virtual web page 'london.aspx' and the actual web page, used to display a slideshow of London pictures, 'slideshow.aspx?display=london"

How easy is that!!

Posted by dsmyth | 2 comment(s)
Filed under:
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.