Monday, August 28, 2006
Over the weekend, I gave my first talk on Atlas at the Memphis Code Camp 2006.  Here is the general outline for the talk I gave:
  • Atlas javascript objects
  • XML/Atlas Script
    • Bindings
    • Events
    • Behaviors
  • Creating an Atlas behavior
  • Creating an Atlas extender
And here is the source code: MemphisCodeCamp2006.zip (653.9 KB)

If you were at the talk, I welcome any feedback you have.  Remember to visit CodeCampEvals.com to register to win the grand prize!

Jerry has already informed us that there has been a lot of positive feedback for the entire day.  If you missed the camp this year, don't miss it next year - great content, great people, and a lot of fun.  In the mean time, we do the same thing on a smaller scale every month at the Memphis .NET User Group.  If you're in the area on the third Tuesday of the month, come by at 6 PM and enjoy the pizza and content.  Click here for the map.

For pictures of the camp, see Wally's site.


Monday, August 28, 2006 6:07:50 PM (Central Daylight Time, UTC-05:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, August 21, 2006


If you're missing the Google "Groups" link like I have been, take a look at this post by Dennis Gurock.  It shows how to use Chicketfoot, a Firefox extention, to dynamically show the link when you visit Google.
Monday, August 21, 2006 4:57:27 PM (Central Daylight Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  | 
 Wednesday, August 16, 2006
In JavaScript, I commonly use the "OR" operator to determine the first non-null value. This trick allows me to quickly write cross-browser event handlers:
 
    1 function myEventHandler(evt) {
    2    evt = evt || window.event;
    3    // handle event here
    4 }



This long-hand version is functionally equivalent:
 
    1 function myEventHandler(evt) {
    2    if(typeof evt != "undefined") {
    3       evt = evt;
    4    }
    5    else {
    6       evt = window.event;
    7    }
    8    // handle event here
    9 }



Well, I just discovered that C# has an equivalent construct to JavaScript's "OR" assignment - the "??" operator:

    1 static void Main()
    2 {
    3     string str1 = null;
    4     string str2 = null;
    5     string defaultValue = "My default text";
    6     string display = str1 ?? str2 ?? defaultValue;
    7 
    8     Console.WriteLine(display);
    9     // output: "My default text"
   10 } 



Ah, sweet syntactic sugar... is there an equally elegant way to do this in VB.NET?
Thursday, August 17, 2006 12:42:07 AM (Central Daylight Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, August 12, 2006
It is common for developers new to Atlas to ask “So what’s the deal with this ‘xml-script’ stuff?”  Well, I had the same question myself, so I went out and found the answer.  Interestingly, the answer is remarkably similar to the reasoning for XAML with respect to WPF.   Here’s Nikhil Kothari’s take on it:
  1. First and foremost declarative markup is more designable that code. This approach will facilitate tool development in the future.
  2. Second, it is actually simpler for atlas-enabled server controls to emit or render their script-based functionality in the form of markup (similar to HTML markup) using constructs such as XmlTextWriter.
  3. Third, declarative markup enables you to specify what the app needs to do, and not necessarily how. Frameworks can capitalize on the ability to interpret semantics and do interesting things - for example imagine running script functionality on the server to generate an initial view of the page, or a view of the page more suitable for search engines.
  4. Lastly, it may be simpler to represent simple scenarios where JavaScript code would require script coding, several event handlers to keep all components in sync (in the example, see how the enabled state of the button is keyed off text entry, and is automatically synchronized without having to write a change handler), which is error prone and hard given the lack of mature tools.
For more on this, read his blog post from September of 2005.

Saturday, August 12, 2006 11:47:09 PM (Central Daylight Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  | 
This morning, I woke up to find my new Dell E1505 laptop freaking out (new processes would start, but their windows would never display - usually followed by complete system lockup.)  Hard restarts produced the same symptoms on startup.  A new laptop - less than 2 weeks old - already completely hosed.  I am not pleased.

On one restart I noticed some error messages indicating a null reference exception in unmanaged code (gee, that's helpful) so I took a look in the event viewer for more information:


Faulting application svchost.exe, version 5.1.2600.2180, faulting module msi.dll, version 3.1.4000.2435, fault address 0x00012780.
Interesting - seems like something is trying to install/uninstall?  I couldn't remember do either recently (well, the day before anyway) so I turned to Google.  The second hit in my search results was a blog entry by Scott Swigart about my very problem.  About 2 minutes later, problem solved.  Thanks Scott!
Saturday, August 12, 2006 5:15:57 PM (Central Daylight Time, UTC-05:00)  #    Disclaimer  |  Comments [2]  |