Printer Friendly Version      Send     
Click to Rate and Give Feedback
Related Articles
Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

By Kent Tegels (September 2008)
We introduce you to the benefits of building composite applications with the Composite Application Guidance for WPF from Microsoft patterns & practices.

By Glenn Block (September 2008)
ADO.NET Data Services provide Web-accessible endpoints that allow you to filter, sort, shape, and page data without having to build that functionality yourself.

By Shawn Wildermuth (September 2008)
See how routed events and routed commands in Windows Presentation Foundation form the basis for communication between the parts of your UI.

By Brian Noyes (September 2008)
More ...
Articles by this Author
This month Toolbox provides help with error logging, finds an app that helps you write LINQ queries, and explores the non-technical side of development.

By Scott Mitchell (September 2008)
Serialize and Deserialize Fixed Length and Delimited Files, Scott Allen's blog, inspecting Web Pages, and more.

By Scott Mitchell (August 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)
More ...
Popular Articles
Here we present a rundown of the various language paradigms of CLR-based languages via short language introductions and code samples.

By Joel Pobar (May 2008)
We introduce you to the EDI functionality within BizTalk Server 2006 R2, illustrating schema creation, document mapping, EDI delivery and transmission, and exception handling.

By Mark Beckner (August 2008)
If you're unfamiliar with Windows Presentation Foundation (WPF), building that first Silverlight custom control can be a daunting experience. This article walks through the process.

By Jeff Prosise (August 2008)
In this excerpt from his upcoming book, Laurence Moroney explains the basics of Silverlight animation and the animation tools available in Expression Blend.

By Lawrence Moroney (August 2008)
More ...
Read the Blog
SQL Server 2008 supports a new data type, HierarchyID, that helps solve some of the problems in modeling and querying hier­archical information. In the September 2008 issue of MSDN Magazine, Kent Tegels introduces you to the ...
Read more!
Many people using SharePoint technologies don't realize that there is auditing support built directly into the Windows SharePoint Services (WSS) 3.0 platform. In the September 2008 issue of MSDN Magazine, Ted Pattison walks you through a ...
Read more!
The September 2008 issue of MSDN Magazine is now available online. Here's what's in the issue: Hierarchy ID: Model ...
Read more!
Silverlight 2 features a rich and robust control model that is the basis for the controls included in the platform and for third-party control packages. You can also use this control model to build controls of your own. In the August 2008 issue of MSDN Magazine, Jeff Prosise describes how to ...
Read more!
In the August 2008 issue of MSDN Magazine, Matt Milner covers several topics regarding development with Windows Workflow Foundation, some that are intended to address specific reader questions, such as how to safely share a persistence database ...
Read more!
LINQ is a powerful tool enabling quick filtering data based on a standard query language. It can tear through a structured set of data using a simple and straightforward syntax. In the August 2008 issue of MSDN Magazine, Jared Parsons demonstrates a ...
Read more!
More ...
Toolbox
Easy Wiki Hosting, Scott Hanselman's blog, and Snagging Screens
Scott Mitchell


Hosting a Wiki
A wiki is a Web application whose content is collaboratively added, updated, and organized by its users. As is the case with blogs and other content management systems, a wiki's content is editable through a Web page interface. What separates wikis from blogs and traditional content management systems is that wikis are inherently amorphous. The site's users create the content, define the relationships, and establish the links between the site's Web pages. Perhaps the most well-known wiki is Wikipedia.org.
Wikis are especially useful for creating knowledge management portals. Within a company, a team of developers may maintain a wiki that includes information about ongoing development projects and their status, coding conventions, and tutorials for new hires on how to set up a baseline development environment.
A customer-facing support site could include a wiki allowing trusted support staff to proactively create and manage answers to commonly asked questions. And many community-oriented sites include wikis to allow members to update the site or contribute to the knowledge base. For instance, the open-source code projects hosted at CodePlex.com are managed as a wiki.
There are a variety of commercial and open-source wiki platforms available. One open-source wiki created with ASP.NET and C# is ScrewTurn Wiki version 2.0. By default, ScrewTurn Wiki's pages, modification history, and user accounts are saved on the Web server's file system, meaning the wiki does not require a database. Consequently, deploying ScrewTurn Wiki to a Web server is as simple as copy and paste.
But the wiki's storage system is built atop the provider model, so you can plug in an alternative provider to persist system information elsewhere. You'll find SQL Server® and MySQL storage providers at the ScrewTurn Wiki Web site.
When it is first installed, ScrewTurn Wiki allows anyone to create an account and any authenticated user to create, edit, or delete content. These access levels can be restricted through the wiki's administration pages.
Visitors may be barred from registering, or may require the approval of an administrator before being able to log in. And administrators can limit what user actions are allowable; for instance, the site can be configured to allow users to create and edit pages but not delete them. Of course, like other wikis, ScrewTurn Wiki maintains a complete history of every page modification with tools to compare different versions. And administrators can roll back a page to a previous version.
ScrewTurn Wiki enables content to be created and displayed in multiple languages, with support for English, French, Spanish, and German, among others.
Price: Free, open source.
Open-Source ScrewTurn Wiki (Click the image for a larger view)

Blogs of Note
Reading other developers' source code is a great way to hone your own programming skills, as it introduces you to different techniques for accomplishing common tasks. This sentiment is shared by Microsoft Senior Program Manager and prolific blogger Scott Hanselman, who reads source code like ordinary people read the newspaper. He shares some of the most interesting code he's read—along with commentary—in a series of blog entries titled "The Weekly Source Code."
In addition to "The Weekly Source Code," every developer should take the time to peruse Scott's Ultimate Developer and Power Users Tool List (hanselman.com/tools)—an expansive list of tools and utilities Scott uses on a day-to-day basis. There are hundreds of recommendations categorized by topic—from working with XML to Visual Studio® productivity enhancers to managing your e-mail inbox and getting the most out of your Web browser. The Ultimate Developer and Power Users Tool List was inaugurated in 2003 and has been updated annually since.
In addition to his frequent blog posts, Scott hosts "Hanselminutes," a weekly audio podcast. There Scott reviews developer tools, dispenses programming advice, and shares war stories. Sometimes he interviews prominent Microsoft staff and members of the Microsoft® .NET Framework dev community. The podcasts are great for your commute to and from work, as each episode is approximately 30 minutes long.

Capture, Edit, and Share Screenshots
During a typical work day, I take upwards of a dozen screenshots. While most of them are for a blog entry, article, or book I'm working on, I also send screenshots to coworkers or customers.
Often it's easier to send a screenshot of a flawed UI than try to explain the problem in an e-mail. With Windows®, the Print Screen key copies the current screen, while Alt+Print Screen copies the current window. You can then paste the screenshot into an e-mail message, an image editing program, or a Microsoft Office Word document.
I recently decided I needed to upgrade from the Print Screen key to a more robust screen capture technique and decided to check out TechSmith's SnagIt version 8.2, which was first reviewed here in July 2003. A lot has changed since 2003. SnagIt has an updated user interface, many more image editing tools, and the ability to save to a number of new file formats.
SnagIt can take screenshots of a user-defined region, of a specified window, or of the entire screen. And when capturing a scrolling window, SnagIt can be configured to automatically scroll through the document, thereby capturing its entire contents in one image. This is especially helpful when capturing lengthy Web pages.
After capturing the window or selected region, SnagIt loads the screenshot into a powerful editing and sharing tool. With a few clicks of the mouse you can add text, draw shapes, cut and move regions, highlight areas, define border colors and widths, and add callouts. The dimensions of the screen capture can be further tweaked by trimming, resizing, or rotating the captured image.
More advanced tasks, such as adding watermarks, spotlighting or magnifying important regions, and adding hotlinks, are possible as well. Best of all, SnagIt is straightforward and easy to use—you don't need to be a digital imaging expert.
Once the screenshot has been edited, sharing it is as easy as clicking a button. There are one-click options for saving the capture as an image, copying it to the clipboard, printing it, sending it via e-mail, sending it via FTP, sending it via Instant Messenger, and loading it into a Microsoft Office Excel®, Word, or PowerPoint® file.
In addition, they can all be saved to a variety of file formats. Along with standard image formats such as BMP, JPG, and PNG, SnagIt can alternatively save your screen captures as PDF documents, Web archive files (.MHT), or Adobe Flash files, which are also new capabilities in this version.
Price: $39.95 per single-user license.
SnagIt Has an Updated User Interface(Click the image for a larger view)

The Bookshelf
Querying data is one of the most common tasks a programmer faces. Yet interfacing with different data types requires learning unique syntax and semantics; and querying external data sources, such as XML files and databases, typically involves serializing query constructs to a string.
Because the compiler cannot parse a string literal like it can parse code, features like IntelliSense® and compile-time type checking are unavailable. To remedy this, Microsoft created LINQ, which offers developers a unified data querying syntax. LINQ extends the C# and Visual Basic® programming languages to include a rich, SQL-like syntax that can be used to query collections of objects, XML documents, databases, and more.
LINQ is made possible thanks to a number of new language enhancements and several new namespaces and classes in the .NET Framework. Because of the breadth and depth of the topic, to really learn LINQ you'll need more than a few online articles. One LINQ book, which explains the various facets through rich examples that build on previous chapters, is LINQ in Action by Fabrice Marguerie, Steve Eichert, and Jim Wooley.
LINQ in Action presents one of the best introductions to LINQ I've read, walking readers through its purpose and design goals and the language enhancements added to C# and Visual Basic that make LINQ possible. The book then looks at LINQ to Objects, LINQ to SQL, and LINQ to XML, which are libraries that enable LINQ queries against objects, relational data, and XML data. The book's last two chapters examine how to extend LINQ to query alternate data sources (such as Web services) and how to best utilize LINQ at different layers in your application's architecture.
What I liked best about LINQ in Action is how the authors start each new section with straightforward, easy-to-follow examples that highlight the most important features. Next, they pull back the curtains and show how the LINQ queries and features are actually implemented.
With the groundwork in place, the authors move on to more advanced features and scenarios. For example, the chapters covering LINQ to SQL start with setting up the object mapping and using the DataContext class to read and update data. Then they look at how LINQ's query syntax is translated into T-SQL. It concludes with advanced LINQ to SQL features, such as concurrency control, using stored procedures and user-defined functions, and so on.
Price: $44.99.

Send your questions and comments for Scott to toolsmm@microsoft.com.

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.

© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.
Page view tracker