Dan Wahlin
AngularJS, JavaScript, HTML5, jQuery, Node.js, ASP.NET, C#, XAML
-
Video: Creating Web Services with the .NET Framework
I've had several people email me and ask if I could do a video covering the fundamentals of creating a Web Service using the .NET framework. Since I enjoy working with Web Services I decided to make some time and do that.
The video discusses how to create a Web Service from scratch but also discusses some of the pros and cons that you should know about. For example, many people will return a DataSet from a Web Service. While that works, it's not very interoperable with non-.NET clients since the generated WSDL will be quite vague about what the Web Service actually returns. By creating custom types (classes) the WSDL can more accurately show a client exactly what they're going to get back. I've also seen many people put all of the code for a Web Service into the Web Method. That works, but you can achieve better code re-use by creating distinct layers for business and data functionality. These concepts and a few others are discussed in the video. Other topics covered include consuming a Web Service from an ASP.NET Web Form. -
C# Programming Class Samples
I just finished up the C# 2.0 Programming course at Interface Technical Training and wanted to get some of the code posted that we did today covering events and delegates and ADO.NET. Thanks to everyone who attended. It was a really fun week.
-
Digging WPF
I'm really digging WPF these days. While there are a lot of cool technologies out there, WPF seems to offer a lot of promise for desktop apps or even apps running within Internet Explorer when .NET 3.0 is installed on the client.
Simon Allardice (one of the cool/smart people I work with at Interface Technical Training) showed me a great WPF application today from the British Library that allows people to inspect some really old books and documents. I've always enjoyed Mozart's compositions (I enjoy writing music on an amateur scale) and have been checking out some of his manuscripts. -
WPF/E and ASP.NET AJAX AlbumViewer Application Now Live (Updated)
-- 2/25/2007: Added user driven carousel movement to the albums --
-
Passing an Array of Values to a Stored Procedure in SQL Server 2005
I've always dreaded handling the situation where I need to pass an array of values to a stored procedure. Yeah...there are several ways to do it, but none of them are really pleasant IMHO. I came across the following post by Jon Galloway that puts to use SQL Server 2005's XML capabilities to allow an XML fragment containing multiple values to be passed in as a single parameter and parsed. Sure, there are pros and cons to this approach, but this technique makes reaching the end goal faster and easier than some of the alternatives. Especially if you consider using the XML serialization capabilities in .NET to automatically serialize object properties to XML that is then passed to a sproc.
-
Live Search for Windows Mobile Released
Microsoft recently released the final build of their awesome Live Search for Windows Mobile application. It's probably the coolest and most useful application I have on my Mobile 5 phone since it does the following types of things:
-
Free ASP.NET 2.0 Webcasts and Labs
Microsoft recently announced several different free Webcasts and virtual labs for those interested in learning to develop ASP.NET 2.0 applications. Available tracks include ASP.NET 2.0 for existing ASP.NET developers, ASP.NET 2.0 for PHP developers, ASP.NET 2.0 for JSP developers and ASP.NET 2.0 for ColdFusion developers. More details on the training can be found here.
-
WPF/E Now Includes a Downloader Feature
WPF/E is getting better and better as new CTP releases come out. The February CTP includes several nice additions including a new downloader that allows resources used by a WPF/E application to be downloaded dynamically. As the resources are downloaded their progress can be monitored and displayed. This can be useful when images, movies or music need to be downloaded "on the fly" so that the end user can see the progress of the download. More information on the downloader API can be found at http://msdn.microsoft.com/en-us/library/bb232904.aspx.
-
Video: Creating an N-Layer ASP.NET Application (Updated)
In this video tutorial I walk through the fundamentals of creating an N-Layer ASP.NET application. What's "N-Layer" you ask? N-Layer can be interpreted many different ways, but I generally use the term to mean separating presentation, business and data code into individual code layers. Doing this allows code to be re-used throughout an application and prevents unnecessary clutter in ASP.NET code-behind classes. This video covers creating presentation, business and data layers and also covers another layer I normally add to projects that I refer to as "Model". The model layer contains data entity classes that are used to pass data between the different layers.
If you're currently embedding all of your code directly in ASP.NET pages, this video will help get you started on the road to recovery. I'm kidding of course, but if you want to build more re-useable and maintainable applications you'll want to segregate your code into different layers at a minimum. Other types of architectures can certainly be applied as well. -
Video: Creating a Web Service with Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF) provides a robust framework that allows Web Services and .NET Remoting applications to be built and consumed using a consistent object model. In this video tutorial I walk through the fundamentals of creating a WCF service exposed through HTTP and IIS. Topics covered include defining a data contract using XSD schemas, generating data entity code using svcutil.exe, creating a service interface, implementing a service interface and consuming a service through a client-side proxy.