Archives / 2007 / November
  • SourceSafe CTP for VS2008

    Richard Berg (BUGBUG) from the Developer & lifecycle tools at Microsoft says:

    If you plan to use VS 2008 with SourceSafe, make sure to pick up the Update CTP too.  Without it, some features like "Open from Source Control" will not work at all.

    Bharry wrote:

    We are working on an update for Visual SourceSafe 2005 to make it work with VS 2008.  We had originally planned to have it available at the same time as VS 2008 downloads went live but we hit a last minute bug that is taking a little time to work out.  Our current expectation is that it will be available in mid December. 

    Not that I'm using SourceSafe any longer (if I can avoid it...) but I'm sure lots of people have already installed VS2008 and wondered about VSS support.

  • ASP.NET MVC Framework (Part 1) - ScottGu's Blog

    I think Scott Guthrie himself just did a better job than me to describe that basics of the ASP.NET MVC Framework on his blog :)

    Since then I've been answering a lot of questions from people eager to learn more about it.  Given the level of interest I thought it might make sense to put together a few blog posts that describe how to use it in more detail.  This first post is one of several I'll be doing in the weeks ahead.

    ASP.NET MVC Framework (Part 1) - ScottGu's Blog

    Go read it already, it got loads of nice pictures to help get an understanding of it all, including the folder structure which is used as a convention. Somewhat influenced by Ruby on Rails I would say ;)

    Considering what I've seen so far of MCV Framework, together with LINQ for SQL and the test framework it reminds me a lot of RoR, but perhaps not as much "convention over configuration" though.

  • A Quick Look at the Basics of ASP.NET MVC

    I had a look at the demo code that Scott Hanselman made available :) So how does it look when using the ASP.NET MVC framework? Of course, since this is MVC, you got the "model", "view" and "controller" parts, but when listening to Scott Guthrie, it seems to be more about "router", "view" and "controller" and he's repeating the fact that this framework is very extensible - you can go with the out of the box stuff, or hack up your own.

    The aim seems to be to have a very clean separation of these parts, so you can swap out the view enging if you want to, and it should also be easier to test your application for those of you who are into TDD and unit testing in general. Therefore there is also support for dependency injection.

    The old ASP.NET stuff that we know and love is still there - code behind, controls, authentication and roles and such. The default view engine is ASPX, but postbacks are not supported, so obviously the way you use some of the ASP.NET controls will change.

    One big difference with URLs in standard ASP.NET vs. MVC is that they do not point directly at the page (like default.aspx) to be rendered, but at a "Controller" which handles the business logic, processes the data and then renders it to a view (which could be the default.aspx page for example). The trick is to map the URL to a controller, and this part seems to be very "configurable". The REST-style of URLs is used alot in the demos, so for example:


    Thanks to a URL routing engine, the right method, in a specific controller will be targeted for each URL above, with the right parameters supplied, like:


    So, stealing a sample from Guthrie's demo, to set up a Route for URLs like these:


    you would do something like this:

       Routes.Add(new Route("Home", "/Home/[action]/[id]", typeof(HomeController)));

    For the route above, which could be initiated in Global.asax, all URLs that begin with "/Home" will be handled by HomeController which will have methods to handle the "Index" and "PrintNumber" actions. There are several ways to set up default controllers and actions, but I'm now going into that here.

    Note: this was how it was demoed in the ALT.Net video by Guthrie, but it seems that have changed in released demo code. I'll look closer at it later.

    The HomeController class could look something like this:

      public class HomeController : Controller
          //add code here for the default "view"...

        PrintNumber(int number)
          //add code here to print out a number...

    The [ControllerAction] attribute was added for security reasons so that anyone just cannot type in any action in the URL and run methods in the controller that wasn't supposed to be run. If you don't like that attribute, it's a policy that can be overridden.

    To make the Controller Action output something to the browser, you could use the Response object like this:

        Response.Write("<b>You're at the Index Page (action)!</b>");

    or you could (will in most cases) point at a view (like an ASPX page) to handle the rendering like this:


    which would render a "Home.aspx" view page you've created.

    If you want to pass parameters to the view, you could use the ViewData collection and do:

        PrintNumber(int number)
          ViewData("number") = number;

    and the page "ShowNumber.aspx" would have some HTML in it to handle the printing of that number, like so:

              The number waws: <%= ViewData["number"] %>

    There are ways to pass data to the view in a strongly typed way, by letting the Controller class inherit from a Controller<T> where T is a simple class used to hold properties you'd like to pass to the view. Then ViewData would be of type T. Normally, the code behind for the ASPX page used for the view inherits from the class ViewPage (which is a difference from ordinary ASP.NET pages), but when using Controller<T>, the ASPX-page should inherit from ViewPage<T> to get strong typing of the ViewData class too. Nice!

    I guess that's enough to just let you get a glimpse of how this stuff will work. I'm sure things will change over time, but I believe this is the general idea.

  • [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