Archives / 2006 / October
  • Getting Started with Windows Communication Framework

    One of the talks I'm giving at the upcoming DevConnections conference in Las Vegas the week of November 6th covers moving from Web Services to Service Oriented Architectures (SOAs).  Part of the talk will discuss how well Windows Communication Framework (WCF) satisfies SOA principles so I thought I'd put together a step by step tutorial on building a simple WCF service and client.  To run the examples you'll need the .NET 3.0 components from Microsoft as well as the VS.NET 2005 "Orcas" additions (optional).  At the time this blog was written .NET 3.0 wasn't available in a production release but that will change very soon.

  • Nullable Types in C# 2.0

    I'm teaching a C# 2.0 class at Interface Technical Training this week and thought I'd blog about two features I really like in C# 2.0 that save some typing (although they may arguably lead to more cryptic code) and are really useful.  Sure, there's all the goodness associated with generics, anonymous methods, partial types, etc. in C# 2.0 but two nice language enhancements are nullable types (which relate to generics) and the ?? operator.  If you've ever retrieved a null value from a database and then tried to assign it to an int or DateTime variable then you'll definitely appreciate nullable types if you haven't already used them.

  • RSS Blog Roller Code Update

    I've updated the original blog roller code posted awhile back since a few minor changes were made.  On the homepage of Interface Technical Training we only show the first 250 characters of employee blogs.  However, people were using tools that injected so much HTML/CSS into their blog that no real text from the blog could be found in the first 250 characters (just HTML tags).  To remedy this problem, all HTML is now stripped out of the summary text and a small routine was added to cut-off summary text on a space rather than splitting a word in the middle. 

  • New Features in ASP.NET AJAX Beta

    Microsoft released the intial beta of ASP.NET AJAX today with many, many new enhancements. One of the biggest changes is that the JavaScript files that ASP.NET AJAX controls rely upon to perform their magic have been refactored and significantly reduced in size. For example, the file used to support UpdatePanel operations is now only 6.4k in size which is a huge improvement and should result in pages loading much more quickly the first time they are hit. This release also fully supports the Safari browser which means the UpdatePanel will now work properly with Safari. Opera support is also in the works but not supported at this point. One of my favorites new additions in this release is the ability to dynamically create UpdatePanel controls and inject them into a page's control hierarchy. That feature will prove useful in cases where control developers want to easily AJAX-enable their controls or when an ASP.NET page needs to have AJAX capabilities dynamically added into it.

  • Calling Web Services Asynchronously

    I had the opportunity to give a talk on Asynchronous Web Services in .NET V2 last night to the Orange County, California VB.NET and C# Users Group.  Thanks to everyone that attended and to Mike Vincent for inviting me.  I had a lot of fun and met a lot of great people.

  • Also Blogging At...

    In addition to this blog, I'm also going to be adding how-to and tips and tricks articles to the following weblog.  If you'd like to subscribe to that one as well here's the link:

  • Speaking at the Orange County C# Users Group - October 17th

    I'll be giving a talk this Tuesday, October 17th at the Orange County C# Users Group on Asynchronous Web Services in .NET V2.  If you live in the area and are interested in seeing how Web Services can be called sychronously and asynchronously swing on by for a discussion of callbacks, polling, WaitHandles and the new event driven model. 

  • Creating a Project Status Dashboard using ASP.NET 2.0

    When I was working as a contractor for Maricopa County in Phoenix, AZ  I was asked by the CIO to create a "quick" prototype application that would track strategic priorities, related initiatives (projects) and organizations working on the initiatives.  He wanted to track how initiatives where meeting the priorities and the status of the initiatives (on time, past due, over budget, etc.).  He wanted to see everything with a simple dashboard style Webpage that showed green lights, yellow lights and red lights.  A screen shot of the solution I threw together for him in (about a day total) using ASP.NET 2.0 is shown below:

  • GUIDs and DataSource Controls

    The DataSource controls built-into ASP.NET 2.0 make it much easier to bind data to a variety of controls.  However, as you start to customize your applications you may experience a few issues (that are typically easy to resolve).   I came across one such issue when I first used the SqlDataSource to create some admin pages awhile back.  The database I was integrating with had primary keys of type UniqueIdentifier (GUID).  The insert stored procedures accepted the key as an OUTPUT parameter and when I tried to insert a row an error was raised saying that an invalid cast occurred on the key parameter (Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query).  At first I was a bit puzzled because the parameter I specified was of type Object (the closest thing available to GUID for asp:Parameter types) and I figured that everything would automatically be figured out behind the scenes.  The StrategicPriorityID parameter shown below demonstrates how I originally defined the code in the .aspx page:

  • Converting XML Data to Relational Data with SQL 2005

    SQL Server 2005 has many features that allow XML data to be queried and manipulated. One of the features I really like is the ability to convert XML data into relational data with a minimal amount of code. For example, if you had an RSS feed stored in a column typed as "XML" but wanted developers to be able to view it in a relational manner you could use the new CROSS APPLY syntax combined with the nodes() function:

  • SQL Server 2005 CLR and XML Demos

    SQL Server 2005 provides many new features that can substantially enhance developer productivity and make it easy to perform tasks that used to be difficult in previous versions.  The download available below demonstrates several new SQL Server 2005 features including:

comments powered by Disqus