Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Dev Blog - Johan Danforth

I'm Johan Danforth and this is my dev blog - a mix of .NET, ASP.NET, Rest, Azure and some other random coding stuff.

  • [Service Factory] Modeling Edition (VS2005) Released

    The "modeling edition" of Service Factory was released yesterday on the Codeplex site:

    The Web Service Software Factory: Modeling Edition (also known as the Service Factory) is an integrated collection of resources designed to help you quickly and consistently build WCF and ASMX Web services that adhere to well-known architecture and design patterns. These resources consist of models with code generation in the form of tools integrated with Visual Studio 2005 and patterns and architecture topics in the form of written guidance.

    patterns & practices: Web Service Software Factory - View Release

    If you are looking for a way to build several WCF based enterprise services in a fast, consistent way but with great flexibility, you should look at this package which plugs into VS2005. A VS2008 version shouldn't be far away.

    I've been using the previous version of Service Factory since for almost a year, and it's been working just fine. One thing I was missing was a good modeling tool for designing our services, and now it's here.

    Check out Don Smith's video of an earlier version of Service Factory if you want to get a hunch of what it is all about.

  • MVC Demos Source Code

    I've been curious about the ASP.NET MVC project ever since I saw that first video from the Alt.NET conference. Scott Hanselman just wrote this on his blog:

    I talked to BradA and got permission to share with you the source code of all the demos that Phil, Chris, myself and others worked on and showed at the two conferences minus all DLLs.

    Scott Hanselman's Computer Zen - DevConnections and PNPSummit MVC Demos Source Code

    The source code for the demo, not the MVC stuff itself, is available for download from that link above. There are too many things right now that I would like to delve into when it comes to .NET, but I'll definitely look at ASP.NET MVC because of it's ease of use and possibilities (what it seems) to extend it. I think solutions based on the REST style of architecture may become more common when this becomes available, especially with project Astoria also adopting the REST style.

    Is REST + POX growing more and more popular because WS-* is getting way to complex? I think so...

  • Buck Hodges : Windows Live Writer 2008 is now available

    I just caught this on Buck's blog, and I must agree with him as Live Writer seems to be the coolest blog-tool I've used so far (not that I've tried them all).

    The first version of Windows Live Writer is now available.  I've been using the betas for a long time, and I think it's a great application (and it's free).  I use it to write all of my blog posts.  If it weren't for Live Writer, I wouldn't have written nearly so many blog posts.

    Buck Hodges : Windows Live Writer 2008 is now available

    Read that post and check out some of the plug-ins that are available for Live Writer.

    Live Writer Plugin Gallery

  • Mediacenter Development

    In my previous post I wrote something about trying to code something for Mediacenter on Vista, and I did that. I spent a couple of hours and downloaded c# Express and the MC SDK and followed the getting started guide that was included with the SDK. It worked :D

    The markup language for MC (MCML) is a bit weird though, and it will take some time getting used to. If you're not going to write MCML every now and then, it will will probably be slow going and loads of trial and error for you. There are some tools (included in the SDK) to help you verify your markup, but it's not like coding (X)HTML or XAML... you've been warned :D

    Anyway, I spent 30 minutes and tried to develop a "background" app for Mediacenter, which popped up a message with an image on the screen, and it was pretty easy - I just used the dialog() function with a timeout, which feels a bit like cheating, but it works.

    Next step is to have my logitech quickcam ta a snapshot whenever someone rings the doorbell. Either that, or have the doorbell trigger something else which the MC background program can act on. I don't want to make a motion detector, but perhaps I can set up a microphone to detect the doorbell ringing? *weird solution* Should be possible with some minimal activex code I guess... I don't want to replace the doorbell if I really don't have to.

  • Resources for Developing Media Center Apps on Vista

    The guys that run the Windows Media Center Sandbox blog posted a nice one listing all the resources they talked about on the Hanselman #82 webcast a short while ago. It's a long list of SDKs, tools and samples and looks just like the right stuff to look at if you're interested in developing something for your Media Center setup.

    I believe you need to have Vista to use the lastest SDK though, so if you're still on XP Media Center, maybe it's time to look at an upgrade? I just upgraded my XP MCE (yesterday) and it went pretty well except for a few driver problems I had with my HP printer, EPSON scanner and integrated SoundMax audio. I also had to upgrade the drivers for my tv-card (FloppyDTV) but I managed to find Vista drivers for everything eventually!

    I'm about to download everything I need to develop something very small for MC and see if I can make it play on my XBOX 360 extender. Scott talked about hooking up a webcam to the door bell and display the picture on the screen. Sounds like a cool idea, but maybe just a bit too complex to start with. I have no idea how to trigger a program from a door bell on a Windows machine in the first place. I used to do stuff with IO ports on my ZX Spectrum some 25 years ago, but I have no clue how to do IO now... ;)

  • [VS2008] Finally had Time to Sit Down and Play

    I finally had some time to play around with VS2008 for a few hours, and I must say I do like c# 3.0, linq and all that. What I most wanted to try out was linq to sql, which I did. Nothing too complex, but I think I got the hang of it now. While looking at linq for sql I also tried out some of the other new featurs like the object and collection initializer (nice), some extension methods and of course the query language.

    I'm still thinking about the extension methods and I think developers need to be a bit careful and not start using the feature just because it's there. I was glad to see the information that pops up in Visual Studio when you hover above the extension and the special intellisense icon, which makes it easier to spot them.

    The linq to sql graphical designer was easy to use, but it doesn't seem to support file databases, I had to create a db in sqlexpress instead. Perhaps I did something wrong.

    Something i noticed was that a stored procs which selects * from tablex returned a specific results class instead of a collection of tablex. Perhaps it's possible to cast or convert the result from the sp to a list of tablex or something, but I doubt it. The sample code from ScottGu's blog indicates it should work... I'll try again later :) 

    UPDATE: Thanks to Raj for pointing out that you have change the return type of the stored proc in the designer properties to be of the type you wish it to be. *cheers* 

  • [VS2008] CTP1 of XML Schema Designer for VS2008 Announced

    I completely missed this announcement from the Microsoft XML team a month ago, that they will release an XML Schema Designer for VS2008. What can I say - finally!

    See a short video here. 

    Download the CTP here

    It looks promising so far, but I'm still waiting for some screenies of the graphical view of the designer.

    EDIT:

    I snapped up this from a forum post:

    The original schema designer in VS has been removed from the product.  There will be a new schema designer, but it will ship in off-cycle release after the Orcas is shipped.  Currently, you have to use VS2005 to edit the schema file, or use the Xml Editor, which looks like a text editor, but does provide intellisense and schema validation.


     

  • [Tools] GhostDoc

    Another plugin for VisualStudio which has been around for a while, helps you write code documentation for your c# classes. This is the summary from Roland Weigelt's blog about his tool:

    GhostDoc is a free add-in for Visual Studio that automatically generates XML documentation comments for C#. Either by using existing documentation inherited from base classes or implemented interfaces, or by deducing comments from name and type of e.g. methods, properties or parameters.

    Just right click the code and select "Document This" from the popup menu:


     

  • [MSBuild][Tools] MSBuildShellExtension - Nifty Tool for Builders

    This little project from CodePlex is quite useful for those of you who are responsible for the Build process, Team Build, CruiseControl.NET, NANT, etc. This is the project description from their website on CodePlex:

    MSBuild shell extension gives you what you've always wanted: A way of cleaning, building and rebuilding your .net projects from the explorer without needing to open Visual Studio 2005 or the Visual Studio 2005 Command Prompt. 

     It looks like this:

    and when you run it, it builds the project or solution in a command window and displays the error/warnings dialog similar to the one in VisualStudio. Nice! 

  • [Team System] TFS 2008 - Better Build Support, But Good Enough?

    I picked up the blog post written by Buck Hodges today about some of the new features related to Build in TFS 2008. I'm glad to see CI built into the product and better control of the build process as well as better support for editing the build steps. Not that I fear editing some XML, but GUI support is always welcome as long as you can do some 80% of what you normally need to do in that interface.

    The build support in TFS 2005 is, compared to some other build servers out there, not top notch. When we started a version 2 of a project just recently, I moved our whole build process to CruiseControl.NET. It took me a day or so to get the basic structure of 10+ solutions (and CI projects) to build and deploy. The same stuff took me days and days to set up in TFS. So now we're building and deploying wcf services, generating data contracts from schemas, generating service proxies from those services and even generating service proxy documentation with reflection. Everything controlled by Cruise Control. And I like cctray :)

    It looks like MS is trying hard to step up to the features offered by solutions like CC.NET, but I think it will take some real effort to make developers used to CC, NUNIT and NANT to make the final move.