Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Comments

Mike Sampson Sampy And I come back to you now - at the turn of the tide
  • First look at 5 features of IE9 RC

    I like the new tabs Smiley

  • Inside the new Channel 9: Random Team Drive-By

    , CKurt wrote

    Good video Charles! It was awesome to see Dan and Duncam crawling trough the buggs!

    I have a question. The 'post coffeehouse thread' came up pretty late in teh cycle. Did it push back the original Launch Date for Rev 9 ?

    Yeah, we didn't get IE 9 that much ahead of you guys but we have top men working on it.

    Top. Men.

  • Mike Sampson: Inside Rev9

    QueryFactory is actually very simple

    namespace Channel9Controller.Infrastructure 
    { 
        public class QueryFactory : IQueryFactory 
        { 
            private readonly IUnityContainer container; 
            public QueryFactory(IUnityContainer container) 
            {
                this.container = container; 
            } 
            public TQueryType Create<TQueryType>() where TQueryType : IQuery 
            { 
                TQueryType query = container.Resolve<TQueryType>(); 
                query.EnableCaching(); 
                 return query; 
            } 
        } 
    }

     

    The trick is that every query takes an NHibernate ISession that it uses to do its work. I have that session delivered up by the Unity container so all the Query has to do is specify that it needs ISession by taking one it its constructor and it gets the session for this request. Queries can also take addition parameters if they need. Most don't need any but some need to do operations based on when Now is so they take an IClock which is a simple interface that has a single property Now. I use this instead of DateTime.Now to make things easier to test and to ensure that time is tightly controlled in the application. I even have a specialty clock that returns Now as the most recently passed 5 minute mark (10:00, 10:05, etc). I use this for checking things like Published on an Entry or Banned on a user so that the query will cache better.

  • Hanselminutes on 9 - ASP.NET MVC 3 and NEW ASP.NET Futures with Phil Haack and Morgan the Intern

    I can't wait to move to this.

     

    I'm going to get to delete so much code.

  • A screenshot tour of the new Channel 9

    Where do you mostly run into this content in other languages? My guess is the Related Videos and What you are watching sidebar boxes.

    I'll see if I can get a fix in to have related only show things in the same language as the current video (or at least English + current video's language).

  • A screenshot tour of the new Channel 9

    We still have the user CSS feature so you can change it if you want Smiley

  • TWC9: The First Look at the New Channel 9!

    memcached. I'll talk on Monday about how I do elastic scaling of the cache nodes. It's pretty well known stuff but it integrates well with Azure.

    But the cache model is fully abstracted from the rest of the code. In fact, in dev it uses the ASP.Net cache and swaps to memcached in production. If we ever wanted to change to AppFabric, it wouldn't be very hard.

  • A screenshot tour of the new Channel 9

    As in on your Xbox? Yeah, that's not really up to us Smiley I don't think that kind of integration is possible.

  • TWC9: The First Look at the New Channel 9!

    Only comments have no paging. Forum threads still page.

     

    I'll talk about this more in Monday's video but the forums are completely separate from the comments on an entry.

  • TWC9: Silverlight 4, SQL Server R2 & Ent Library 5.0 all RTM, Why code comments aren't bad

    I don't write comments pretty much ever. When I TDD (which I do for everything these days), I don't need them. What I was thinking and what I meant for the code to do is much better expressed through good names, solid patterns, and great tests. I can even read the tests sequentially and watch the class evolve. Ditch those comments and up your code reading skills! It makes you a much better developer.