Dan Wahlin
AngularJS, JavaScript, HTML5, jQuery, Node.js, ASP.NET, C#, XAML
-
LINQ and Lambdas and Sprocs....Oh My!
There's a lot of great stuff in .NET 3.5 and several different ways to work with LINQ technologies such as LINQ to SQL. I'm currently putting together some demonstration code for a talk I'll be giving at DevConnections in Orlando and showing how LINQ, Lambdas and LINQ with stored procedures can be used to do the same thing so that people get a feel for each technique. For shorter queries I generally prefer lambdas since it's more object-oriented feeling compared to LINQ (to me anyway). For more complex queries LINQ is much easier though. Overall, I still prefer stored procedures since you have much more control over security that way and can maintain queries without resorting to C#/VB.NET code changes in some cases. Plus, LINQ makes it really easy to pass parameters to stored procedures without having to create SqlParameter objects (something I've always despised).
-
Simplifying ASP.NET ListView Control Templates
I've been working with the new ListView control in ASP.NET 3.5 combining it with LINQ and Lambda expressions and was finding myself duplicating a lot of code between ItemTemplate and AlternatingItemTemplate templates (I'll be posting the sample application that demonstrates using LINQ, Lambdas and Stored Procedures soon). The AlternatingItemTemplate contained the same code as the ItemTemplate except for a CSS class added to the first <tr> element to change the background color. Here's an example of both templates that were used initially:
-
CS300 Course Samples
Thanks to everyone that attended the CS300 class last week at Interface Technical Training. I had a great time and enjoyed meeting everyone. You can download the on-the-fly demos relating to ADO.NET, events, Web Services and the BackgroundWorker here. The complete set of samples for the course can be download here.
-
Introducing Visual Studio 2008 Course
Thanks to everyone that attended the Visual Studio 2008 course yesterday. It was a lot of fun talking about all of the new stuff available in VS 2008 and .NET 3.5 and hearing the different projects people are working on. As promised, here's the lab code from the course:
-
How Would You Refactor this Code? #1
It's amazing how many different ways there are to accomplish the same task in code. Talk to 2 developers and you'll almost always get two opinions. That's part of what keeps it fun (and potentially why that guy in the other cube is constantly annoying you :-)). In a previous post I wrote, there were several speed enhancement suggestions that were really good so I decided to start a "How Would You Refactor this Code" blog series to get opinions and see different approaches to coding.
-
C# 3.0 Features: Extension Methods
.NET 3.5 is out which means all of the great features available in C# 3.0 are available to use now. Here's a quick list of the main language enhancements available in C# 3.0:
-
New Song: Story of Your Life (Updated)
All code and no play makes me a dull boy I'm told (mainly by my wife) so I've been getting back into song writing and recording a little over the past few months as time permits. I recently finished up a new song called Story of Your Life that was recorded in my home studio (equipment and software used is listed below for anyone interested). My good friend Spike Xavier wrote the lyrics.
-
New Video: Integrating Silverlight and ASP.NET AJAX
I gave a talk at Desert Code Camp toward the end of 2007 that discussed how Microsoft's Silverlight product could be integrated with ASP.NET AJAX to dynamically display albums obtained from an Amazon.com Web Service. It's taken awhile to get the video posted, but it's now available. The audio in the room wasn't great since no microphone was used so you may need to crank it up a bit.
-
Got Code? .NET Framework Library Source Code Released
If you've ever wanted to step into the .NET framework library classes as you're debugging your project then you'll be happy to know that Microsoft has released the .NET Framework library source code. Step in and out of various framework classes, ASP.NET controls, plus more. Read more about it on Scott Guthrie's blog:
-
Bill Gates - The Last Day at Microsoft
My good friend Simon Allardice just sent this link to the Bill Gates farewell video. Funny stuff ! :-)