Tim Sneath

Musings of a Client Platform Guy

September, 2003

  • Tim Sneath

    You Couldn't Before, But Now Yukon...

    • 4 Comments

    (groan)

    I'm away this week in the south of France attending an internal briefing on Yukon / CLR integration prior to the PDC. Whilst the tools themselves have still got a little way to go before they're mature enough for production use, I've picked up a lot of things that are not covered in the current documentation.

    One particular feature I've been experimenting with is user-defined types (UDTs), which allow you to create a custom type in C# that can then be used from within Yukon - as a column type, a function return value, a stored procedure parameter, a variable etc. There are some great potential uses for this - a few that sprang to mind include:

    • A Currency type that handles both units (dollars, euros, pounds) and the value.
    • A PostalCode type that could do smart things like validation and even generate part of an address automatically using MapPoint(similarly, a TelephoneNo type).
    • Many custom structures such as complex numbers, grid co-ordinates, and so on.

    What really makes this feature work for me is that a DataSet could retrieve UDT values out of the database, and the same Currency class used in the database could be used in an application's business logic to manipulate it. This way, you always deal with the object in the same way, using the same methods whether you're using T-SQL or C#. In your database you can write:

            SELECT unitSKU, quantity, price::ToString() FROM Orders
        

    In your code you can write:

            Label1.Text = price.ToString();
        

    It's the same either way. You can even do things like operator overloading to ease usage of the class in C# and attribute that same function to make it more accessible from T-SQL. For instance:

            [SqlFunc("AddCurrency")] 
            public static override operator +(Currency c1, Currency c2) 
            { 
               // do stuff 
            } 
        

    Lots more to say about Yukon - I'll start saving up some stuff to post during the PDC.

    Now off to file some bugs...

  • Tim Sneath

    .NET and J2EE Interoperability

    • 1 Comments

    Just noticed that Microsoft Press have recently published a new book by Simon Guest on interoperability between .NET and J2EE. I've not seen it yet, but a book like this is desperately needed. I'm regularly asked about this and even if the question is not asked, you can be sure that it's on the mind of most IT Directors who want to avoid being trapped down one architectural path without hope of escape.

    People often assume that the only option for getting .NET and J2EE to talk to each other is web services; with the recent joint announcement from Microsoft and IBM and the separate announcment from Sun, this is an increasingly viable option. But there are some great third-party alternative solutions that integrate at the .NET Remoting / CORBA level, such as Intrinsyc Ja.NET, JNBridge and Borland Janeva.

    In the modern enterprise environment, it's not reasonable to presume that .NET or J2EE will win out completely; most large companies could write a shorter list of what technologies they don't have than the list of technologies they do have. Software companies from all backgrounds need to be more mature about coexistence, which is why it's good to see the WS-I Basic Profile gaining some traction amongst the major players.

  • Tim Sneath

    Ahoy There, Shipmates!

    • 0 Comments
    Arrr! Shiver me timbers! Today is Talk Like a Pirate day.
  • Tim Sneath

    Snippet Manager Extended

    • 0 Comments

    Some time ago I wrote a tool called Snippet Manager which manages all those little bits of code that I find myself needing repeatedly, such as the Dispose pattern. (Of course, you can drag snippets to the toolbox in VS.NET, but I wanted something that would also work with Notepad or ASP.NET Web Matrix).

    Now Andi Fleischmann has taken this several stages further by adding support for multiple tabs and tooltips. You can find his extended version at this Code Project page. Very cool, Andi!

  • Tim Sneath

    Blog Log Analysis

    • 3 Comments

    I've been keeping a blog for about two months now, and I thought it would be an interesting exercise to do some analysis of the logs. The blogging application that this site uses (BlogX) records the daily hits each blog gets into a tab-delimited file, so I used Data Transformation Services to clean the data up a bit and import it into SQL Server, and then finally used Analysis Services to create a multidimensional cube that I could manipulate with Excel. This process worked very smoothly, and saved the need to purchase a specialised web reporting tool. I'll document this process more fully at a later stage, but the information gleaned from the analysis was quite revealing about the current status of the blogging world:

    • At the moment my blog averages around 40,000 hits per month. I've no idea how that compares to other blogs out there, but knowing that your blog is read is definitely a motivating factor when writing new entries! I suspect that most people stumble across this blog because it's posted on the main GotDotNet blogs page; I'm certainly under no illusions that it's to do with any personal fame. Like any other website, one of the biggest challenges of a blog is capturing and maintaining traffic to the site. For bloggers without the inherent advantage of working for Microsoft, aggregation sites such as PDC Bloggers are probably one of the best ways to spread the word.
    • I'm amused and amazed at how many people have wound up at the blog by means of a Google search. Unsurprisingly, searching for "Tim Sneath" brings the blog more or less to the top of the results, but I've had hits that have come from such bizarre search terms as "lossless wma", "Sitar music that you can listen to on the net", and "Frank Zappa AND Albanian Music"! Approximately 5% of browser hits to the site come via Google; other search engines might as well not exist for the traffic they bring.
    • There's an astonishing variety of blog aggregators and browsing tools in use: I counted over 500 distinct user agent strings. Of the aggregators, various variants of SharpReader are the most popular, with a 46% share; Newsgator comes next with 23%; NewzCrawler has a 5% share, and many others have a smaller share. (Incidentally, 8% of visitors have an empty useragent string, a surprisingly high number.) I'm a SharpReader user myself; although I've never done an exhaustive survey of aggregation tools, I've certainly heard good things about Newsgator. What's NewzCrawler like (I've not come across it before)?
    • The most popular blog entries have been ADO.NET Tips and Tricks, Mind Mapping and New C# Features in Whidbey. The last of the three can be explained by a link from Robert Scoble's immensely popular blog, but the other two were a little more unexpected. I'll write more on ADO.NET shortly.
    • Traffic drops by about 20% at the weekend. I was expecting that to be higher, but I guess many people leave their computers on permanently, so the aggregators continue to poll for new content.

    Overall it's been an intriguing experiment. I look forward to repeating it in a couple of months to see whether there have been any noticeable changes of trend as weblogging continues to mature.

Page 1 of 3 (15 items) 123