Daniel's profileDaniel Larson's Develope...BlogListsGuestbookMore Tools Help

Blog


    August 27

    Democratic National Convention Scavenger Hunt: Day 2

    DNC 002 DNC 037 DNC 041 DNC 055 DNC 060 DNC 012 DNC 028 DNC 029 DNC 015

    More pics from the DNC... check out Josh, one of our software test engineers, standing with a Gitmo escapee. And the guy protesting for bigger signs. I hear you dude. And there he is-- one sane guy with the Jesus Saves sign. Yes He does. Nice to see some Christian love at the DNC...

    What an event-- this is a great party, no matter what your party is!

    Stop Bird Porn!

    (Spotted at the Democratic national Convention, 8/27/2008)

     
     
    bird porn DNC 016

    Democratic National Convention Scavenger Hunt: Day 1

    This week, the NewsGator camera crews are out in force at the DNC for the lunchtime scavenger hunt (we right software most of the time, actually). These are pictures I took on Tuesday, 8/26. We're still looking for some photos inside Gitmo on the Platte, but we've got plenty of other cool pictures. You gotta love dead people walking the streets, and the lost brigade roaming the streets looking for weapons of mass destruction in Denver. I think they heard Osama bin Laden-- but instead it's Osama and Biden in town.

    DNC 057 I was told not to take this picture... it's kind of freaky to see part of the town barricaded off. You couldn't get near the Pepsi Center where the convention is, and this tent-bridge was the gateway through the corridor between downtown and the convention.
    DNC 043
    DNC 029
    I must also say, Denver has the nicest police force. The police were out in numbers ready for action though, don't screw with our town!
    DNC 005
    We saw a few dead people walking the town.
    DNC 006
    DNC 062
    Dead people, and robots with afros.
    DNC 099

    But where's the monkeys?  No monkey sightings this week so far.  But you gotta love horses with riot gear!
    DNC 012

    DNC 064

    We really didn't need more of these nutjobs, with the whole liberal army of democrats in town. We actually need a little more left-wing deprogramming this week. Like these sweet ladies:
    DNC 003

    DNC 081

    To those of you visiting: welcome to Denver.

    And we're not all like these guys:
    hell
    Way to misrepresent, guys! Jesus didn't come to condemn, but save. The message of the gospel is not one of condemnation, but of salvation. Pissing people off probably isn't the best approach to sharing the love of Christ.
    August 15

    VII

    Check out this year's birthday present!!!

    birthday

    August 11

    Client Side AJAX History Support with Sys.Application

    One of the cool new features of the 3.5 SP1 Microsoft AJAX Library is a history framework, which adds support for backwards and forwards navigation using history points. History points can be added any time, and contain a JavaScript dictionary that helps you serialize and deserialize the state of the application or control.

    To enable history, the ScriptManager must be set to support history:

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="true" />

    To add a history point, simply add a JavaScript dictionary object and a title for the history point:

    var state = { message: "Hello World!" };
    Sys.Application.addHistoryPoint(state, "Welcome");

    To handle the navigate event which is fired by Sys.Application upon client back button usage, create a handler:

    function onHistoryNavigate(sender, eventArgs) {
        if (eventArgs == null) {  // Adds intellisense to the method body
            eventArgs = new Sys.HistoryEventArgs();
            throw Error.invalidOperation('Expected HistoryEventArgs');
        }
        var state = eventArgs.get_state();
        // Do something with the state object here!
    }

    Finally, you'll need to add the handler to Sys.Application. Note that because navigate is an event, multiple consumers can add a handler to the event:

    Sys.Application.add_navigate(onHistoryNavigate);

    In a control, you'd want to call remove_navigate to clear your event handler.

    Finally, the following sample page demonstrates the use of history through the creation of 3 history points. As each history point is added, the navigate event is raised (synchronously) causing the final state of the page to have the 3rd history point loaded. The user can then navigate back and forth between the 3 languages of Hello World.

    <%@ Page Language="C#" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>A simple history demo, from the book Service Oriented AJAX Applications (MS Press 2008)</title>
        <script type="text/javascript">
            function pageLoad() {
                Sys.Application.add_navigate(onHistoryNavigate);
               
                var state = { message: "Hello World!" };
                Sys.Application.addHistoryPoint(state, "Welcome");

                var italianState = { message: "Ciao mondo!" };
                Sys.Application.addHistoryPoint(italianState, "Benvenuto");

                var frenchState = { message: "Bonjour monde!" };
                Sys.Application.addHistoryPoint(frenchState, "Bienvenue");
            }

            function onHistoryNavigate(sender, eventArgs) {
                if (eventArgs == null) {
                    eventArgs = new Sys.HistoryEventArgs();
                    throw Error.invalidOperation('Expected HistoryEventArgs');
                }
                var state = eventArgs.get_state();
                if (state.message) {
                    $get('Greeting').innerHTML = state.message;
                }
            }   
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="true" />
            <div id="Greeting"></div>
        </form>
    </body>
    </html>

    With just a few lines of code, you can utilize the AJAX Library's history support in your production applications using similar techniques. You'll want to serialize the state of your control in the state parameter, and you'll also want to ensure that the history you're handling is your own and not another AJAX control's.

    Also note that this is new functionality in the 3.5 SP1 release-- the server control syntax will cause a compilation error in earlier frameworks. Finally, a shameless plug: I've got more details on history management as well as the rest of the AJAX library in my new book, available later this year: Developing Service-Oriented AJAX Applications (Microsoft Press 2008).

    August 08

    .NET 3.5 Service Pack 1

    The .NET 3.5 Service Pack 1 RTM release is now available through the SQL Server 2008 install media, available on MSDN. Be sure to uninstall any previous 3.5 SP1 betas before installing it. I've already implemented the new JavaScript history manager support into our product, which I'll blog about shortly.

    August 01

    The Cuil Search Engine

    Cuil is now my favorite search engine. Why? Because it adds my pic to all sorts of results that I am vaguely related to. Search for NewsGator and you'll see what I mean...