Click to Rate and Give Feedback
Articles by this Author
Host a wiki the easy way, get the screen shots you need and mark them up, and read about LINQ this month in Toolbox.

By Scott Mitchell (July 2008)
This month test your web site on many platforms and browsers without setting up a test environment, use mock objects for unit testing, and visit Raymond Chen.

By Scott Mitchell (June 2008)
This month the Toolbox column takes a look at database logging, Joel Spolsky's blog, printing code projects, and ASP.NET reading.

By Scott Mitchell (May 2008)
See how to log Web application errors for better health monitoring, what to read if you’re thinking about LINQ, and which blog Scott recommends reading this month.

By Scott Mitchell (April 2008)
This month, a better design-time experience for Web apps, Scott Guthrie's blog, extending Extend Lutz Roeder's Reflector, and more.

By Scott Mitchell (March 2008)
This month, more of the tools you need to get your job done.

By Scott Mitchell (December 2007)
This time: Windows Forms grids, professional-looking date textboxes, file merging, and more.

By Scott Mitchell (November 2007)
This month's products include DatabaseSpy, FileZilla, NCache, and more.

By Scott Mitchell (October 2007)
More ...
Popular Articles
Joel Pobar presents an introduction to how compilers work and how you can write your own compiler to target the .NET Framework.

By Joel Pobar (February 2008)
Systems that handle failure without losing data are elusive. Learn how to achieve systems that are both scalable and robust.

By Udi Dahan (July 2008)
Efficient parallel applications aren’t born by merely running an old app on a parallel processor machine. Tuning needs to be done if you’re to gain maximum benefit.

By Rahul V. Patil and Boby George (June 2008)
In this article, author John Torjo presents a guide to his C++ GUI library called eGUI++ and explains how it makes user interface programming easier.

By John Torjo (June 2008)
More ...
Read the Blog
There are many things called threat modeling. Rather than argue about which is "the one true way," a good practice is to consider your needs and what your skills, abilities, and schedules are, and then work with a method that's best for you. In the July 2008 issue of MSDN Magazine, ...
Read more!
Want to develop games for Xbox Live? Want to get paid for it, too? Click on over to the XNA Team Blog to learn more about their initial rollout of the XNA Creators Club for XNA Game Studio. ...
Read more!
The Microsoft Entity Data Model (EDM), based on Dr. Peter Chen's Entity Relationship (ER) model, is the driving force behind the ADO.NET Entity Framework. The EDM is also the feature that most significantly differentiates the Entity Framework from other ORM-style technologies in the marketplace. In the July 2008 issue of MSDN ...
Read more!
System.IO.File is a handy helper class for reading and writing data, but its methods support only synchronous operation. Is there an easy way to provide File’s functionality for asynchronous file I/O? In the July 2008 issue of MSDN Magazine, Stephen Toub walks through several ...
Read more!
Remember .NET Terrarium, the interactive game meant to introduce .NET development techniques? Well, the Windows SDK team has released the source code for .NET Terrarium 2.0 on CodePlex. You can read more about this release on the Windows SDK blog and at Microsoft ...
Read more!
The Enumerable class plays an important role in every LINQ query you create. Because the Enumerable class's extension methods can process many other classes—including Array and List—you can use methods of the Enumerable class not only to create LINQ queries, but also to manipulate the behavior of arrays and other data structures. In the July 2008 issue of MSDN ...
Read more!
More ...
Toolbox
Networking, Rich UIs, and More
Scott Mitchell

Perform Network-Level Operations
End users today expect a level of interconnectivity between applications that was unheard of a mere five years ago. Many applications periodically determine if a new version is available and, if so, offer to download and install it. Financial applications will connect to the Internet for the latest stock quotes. Games seamlessly integrate with online services to keep track of a user’s high scores and how she ranks among her peers. These operations can be performed using a variety of technologies, from low-level TCP or UDP messages to HTTP or FTP requests; they may involve custom message-level protocols or industry standard ones.
Adding connectivity features can be daunting for developers who are mostly experienced in traditional application development paradigms. Network operations are built atop very precise, low-level specifications that leave no room for error. There are many different ways a network operation can fail, which introduces many edge cases that need to be handled. For these reasons, it’s often foolhardy for developers to tackle network-level operations on their own. They should instead rely on a framework or third-party component to provide high-level abstractions for the low-level networking needs.
The Microsoft® .NET Framework provides some classes for network-level operations in its System.Net namespace. There are classes designed for making HTTP and FTP requests and for working with socket-level communications, among others. For a more in-depth set of networking functions, you’ll need to turn to a third-party component. One such component suite that offers the gamut of networking functionality is IP*Works! Version 6 by /n software. IP*Works! is a collection of components that supports a wide array of low-level protocols.
IP*Works! simplifies working with these technologies through high-level libraries. Want to work with a Web site’s RSS feed? There’s no need to programmatically parse the XML; just use the IP*Works! Rss class’s GetFeed(url) method. This populates the Rss class with the items defined in the RSS feed. The particular elements of each item can be accessed with properties like ItemTitle and ItemPubDate.
Part of the challenge of creating networked apps is the inherent asynchrony. When receiving network traffic, the responses come in as chunks at undeterminable times; when transmitting a file over the network, it’s not clear when the transmission will complete. To further complicate matters, during these asynchronous processes, things may go awry. That connection to the FTP server may reset, or the network connection may be lost. IP*Works! simplifies these operations by offering various classes with an expansive list of events for which event handlers can be created.Virtually all of the components use the standard .NET asynchronous programming model to make starting and managing asynchronous operations a familiar exercise.
Price: $499 per developer workstation (royalty-free distribution).

Slick UIs for ASP.NET Web Apps
For me, designing the user interface for an application can be quite challenging. I am a backend ASP.NET developer by profession and, honestly, lack any and all semblance of artistic acumen. (My user interfaces have been compared to the green and black monochrome mainframe applications from yesteryear.)
Creating a user interface isn’t hard—ASP.NET ships with a number of controls that provide the common UI patterns. It’s a breeze to add a textbox, dropdown list, checkbox, or an editable grid of data to a Web page, but it’s not as easy to make it look good.
True, Visual Studio® offers its Auto Format wizard (to which my end users are eternally grateful), but that’s just window dressing. While visual aesthetics are important in UI design, the overall usability of the interface is equally important. Here, too, there is little help from the built-in ASP.NET controls, which provide the building blocks of a user interface but leave the design work to the page developer.
For design-challenged developers like me, it’s often more cost effective to turn to a third-party control vendor than invest the time and energy in attempting to create a usable, eye-pleasing user interface. One such ASP.NET control vendor is telerik, which offers the r.a.d. controls suite. The r.a.d. controls suite is a collection of 18 custom controls that provide polished, professional-looking results for a variety of common user interface scenarios.
The r.a.d. editor provides a rich, WYSIWYG editing experience in a Web page, the r.a.d. grid displays and modifies data, and various navigation and categorization controls are offered.
The r.a.d. controls use themes to easily manage the aesthetics of the rendered output, and ship with a number of predefined themes, making it easy to create UIs that look like they came from a highly paid design shop. The r.a.d. controls offer more than just eye candy, though, as their rich feature set, coupled with AJAX support, allows for the creation of very fluid and straightforward user interfaces.
For example, the r.a.d. treeview allows a page visitor to change the name of a treeview node in place, supports dragging and dropping (both for the repositioning of nodes in a tree and moving nodes from one treeview to another), keyboard support, and context menus. Best of all, adding the rich user interface and wiring up the backend code is incredibly simple. Configuring a control to use the more involved user interface features is as simple as setting a few properties, and handling the complex user interface typically involves just creating an event handler.
If you are an artistically-challenged Web developer like yours truly, check out telerik’s r.a.d. controls suite. It will help you move from ho-hum user interfaces to ones that will bedazzle.
Price: $799 per developer license for the control suite.

Manage Your Font Library
Choosing the right font for the user interface in an application can be a trying task for developers who don’t have an art department backing them up. Most developers opt for whatever font Visual Studio recommends, in part because seeing how a particular chunk of text looks in different fonts is not readily accessible in Visual Studio or even in many word processor programs.
To help with the task of choosing a font, check out Advanced Font Viewer 2.6 by Styopkin Software. Advanced Font Viewer allows you to enter text and then display it in all of the fonts installed on the system. You can make the text bold, italic, underlined, or strike-through, and can adjust the font size. Additionally, you may select a single font and view samples of the inputted string with differing font sizes, explore the font’s character map, or inspect the font’s embedded information. You can also easily print fonts or view them in a Web browser to see how they appear in other media. Advanced Font Viewer also makes it easy to install new fonts and remove existing ones.
Picking the ideal font for your application can help improve the user experience and should not be a random choice or one based on Visual Studio presets. While Advanced Font Viewer is no substitute for a trained graphics designer, it can help those less experienced at font selection to quickly view their font choices and make a more informed decision.
Price: $39 per developer license.

The Bookshelf
In the past, a sure-fire way to determine the intended audience for a book was to peruse its figures. Beginner-level books were ones rife with screen shots showing step-by-step instructions; the advanced titles had a higher text-to-figure ratio and their figures were more likely to be fancy architectural-level diagrams. I say "in the past" because O’Reilly’s new series, "A Developer’s Notebook," turns that assumption on its head, providing step-by-step, visual tutorials from intermediate to advanced.
In ASP.NET 2.0: A Developer’s Notebook (O’Reilly, 2005), by Wei-Meng Lee, each chapter is broken down into a number of labs, with each lab focused on how to accomplish a particular task. You won’t find any high-level architectural discussions or best practices ruminations here—just a quick, step-by-step list and plenty of screen shots to help you follow along. Despite the straightforward step-by-step nature of these labs, they are clearly targeted for developers who know their stuff.
For example, the Chapter 4 labs focus on working with data in ASP.NET 2.0. You’ll find instructions on how to go from a blank ASP.NET page to one that lists database results filtered by the selected item in a dropdown list, with screen shots to walk you through the process.
The book contains over 50 labs spread out over eight chapters that cover Master Pages, Web Parts, data access, security, and performance, among other topics. My favorite chapters examine data access and security, respectively. In a combined 100 pages, Chapters 4 and 5 showcase ASP.NET 2.0 improvements in these two areas with labs that, in ASP.NET 1.x, would have required at least twice as many pages. While the whole book is a testament to ASP.NET 2.0 enhancements, these two chapters are likely to have ASP.NET 1.x developers most excited about the new possibilities.
A subtle, but very enjoyable touch found in the "A Developer’s Notebook" series is that the books really do look and feel like notebooks. The paper stock feels different than the standard computer trade book and has the same faded grid found in graph paper, and various notes appear in the margins in a font that looks like hand-written cursive. These nuances foster a sense of camaraderie with the author, as if he had let me borrow his personal notes. But, thankfully, these are notes I do not need to give back!
Price: $29.95.

Scott Mitchell, author of numerous books and founder of 4GuysFromRolla.com, is an MVP who has been working with Microsoft Web technologies since 1998. Scott is an independent consultant, trainer, and writer. Reach him at Mitchell@4guysfromrolla.com or via his blog at ScottOnWriting.NET.

Page view tracker