Click here to monitor SSC
Michael Williamson

Moving from Practice to Production with Test-Driven Development

Michael Williamson answers three common questions that come up in test-driven development (TDD), including the most likely causes of each potential problem, and practical tips on how to avoid them. Read more...

Matt Wrock

Automate the Complete Windows Environment Setup and Configuration

Boxstarter is an open-source application that enables you to do the unattended install of everything required to turn bare metal, Azure VM or Hyper-V VM into a working Windows Server. It is built on top of Chocolatey, Nuget, and PowerShell to make the repeated installation of windows-based machines into an automated error-free process. Matt Wrock, Boxstarter's creator, explains how to use it. Read more...

Dino Esposito

OWIN: Customizing the Web Server

OWIN and Katana are designed to provide a different way of meeting those objectives that currently require the use of NodeJS. With them, you can run extremely thin and super-optimized web server applications by cutting out what you don’t need and swapping out those parts that you wish to behave differently. Dino Esposito explains how to get started. Read more...

Edward Charbeneau

Giving Clarity to LINQ Queries by Extending Expressions

LINQ expressions can be made much easier to comprehend and modify by using extension methods to create pipes and filters. Ed takes a working LINQ expression and makes stepwise improvements to it to make it clearer. Read more...

Chris Morter

Large Object Heap Compaction: Should You Use it?

Despite the many benefits of automatic memory management in .NET, there are still a few perils which we must avoid. One of the most common, and frustrating to deal with, is fragmentation of the large object heap. In this article Chris Morter explains what LOH fragmentation is, why it’s a problem, and what you can do to avoid it. Read more...

Michael McLaughlin

Windows Runtime: Fielding the Obvious Questions

WinRT, the Windows Runtime, was launched by Microsoft to some puzzlement. How does it relate to COM? Is it a replacement for .NET or SilverLight? is it the same as Windows RT? Why is it important? Michael answers these questions and more. Read more...

Tom Fischer

Fluent Code in C#

In LINQ, the 'fluent' method syntax flows logically and intuitively, and allows them to be combined simply, because each method returns the appropriate type of object for the next. Can this fluent technique be extended as an API style to make it easier to develop C# team-based applications for enterprises? Read more...

Chris Hurley

The overhead of async/await in NET 4.5

The support for asynchronous operations in .NET 4.5 has made it much easier to create easily-intelligible asynchronous methods that avoid blocking. However, async/wait isn't cost-free in terms of CPU overhead. How best to judge when to use it? Chris Hurley explains. Read more...

Ambily Kavumkal Kamalasanan

Different Approaches of Entity Framework

Entity Framework provides three different approaches to deal with the model, and each one has its own pros and cons. Ambily Kavumkal Kamalasanan discusses the advantages of the Model, Database, and Code First approaches to modeling in Entity Framework 5.0. Entity Framework still has its share of issues and is not widely accepted yet - but through contributing to its ongoing development the community can make it more stable and increase its adoption. Read more...

Alex Papadimoulis

Taking NuGet to the Enterprise

The NuGet package manager is a great way for developers to install and update third-party tools. It solves a lot of the problems of dependency management and integration. Is it ready for the exacting requirements of development in the enterprise? Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 11: Subversion and Oracle

It is only recently that the tools have existed to make source-control easy for database developers. Although entire build-scripts for databases could be stored in Subversion, tools like Source Control for Oracle (SoCO) now allow for a more effective source-control at object-level. Read more...

Tom Fischer

Beginning Distributed Version Control with Mercurial

The move from client-server version ontrol systems (VCS) to distributed version control systems can be bewildering. Tom uses his experience of moving to Mercurial to explain those aspects of the move that are liable to cause confusion to anyone steeped in the culture of the traditional VCS. Rebase, Push, Pull and Merge explained! Read more...

Dino Esposito

Building a Public HTTP API for Data

The creation of a public API for data presents something of a dilemma for the developer. Web API, with its content negotiation, seems somehow cleverer than classic ASP.NET MVC, but there are complications, such as the XML schema, that suggest that there are merits in using MVC controllers for all public HTTP APIs Read more...

Nick Harrison

Dynamic LINQ Queries with Expression Trees

It's possible to build up dynamic LINQ queries or queries with several conditional criteria. In fact there are several options for doing this, including the use of expression trees. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 10: Extending the reach of Subversion

Subversion provides a good way of source-controlling a database, but many operations are best done from within your database-development environmant. Fortunately, several products provide this integration Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 9: Server, Repository, and Statistics

In the ninth installment of his popular series on using Subversion, Michael describes how to set up a simple Subversion server for a multi-user project and describes some of the reports, charts and tables you can get about the activity in your project Read more...

Ambily Kavumkal Kamalasanan

Windows Store App Contracts

Windows Store Apps use contracts to declare the interactions that they support with other apps and with the 'Charm Bar'. They bind your app to other 'Metro' style apps and to the system user-interface: They provide a great deal of functionality for little programming effort. Read more...

Dino Esposito

Route Validation and Controller Validation in ASP.NET MVC

The ASP.NET MVC controller is a good friend of web developers. There are a host of features in it that can be used to reduce the amount of coding you have to do, and to make the logic simpler. Read more...

Nick Harrison

Client-Side Markup with JQuery Cloning and Templates

Almost certainly, any HTML-based application is going to need to create markup on the client-side, using JavaScript. The language isn't particularly geared for the task, but with JQuery and now JSrender, it is no longer something that the web programmer needs to dread Read more...

Mike Wood

Windows Azure Websites – A New Hosting Model for Windows Azure

Whereas Azure works fine for established websites with a healthy visitor-count, it hasn't suited developers who wanted to just try the platform out, or to rapidly develop a number of hosted websites. The deployment process seemed too slow. Microsoft have now found a way of accomodating the latter type of usage with Windows Azure Websites (WAWS). Read more...

Tom Fischer

View-Models with Flags in WPF

Enums in .NET are strongly-typed constants that allow you to share a multi-valued property across applications. When used in a XAML application with view-models it can provide a design choice that greatly simplifies the handling of related boolean attributes. Read more...

Andrew Hunter

Are Unit Tests Overused?

Unit Testing has come to dominate the many types of test that are used in developing applications. This has inevitably been at the expense of other types, such as integration test. Does a successful unit test regime ensure quality, or should we see unit testing as just one of a range of tests that can together give us confidence in an application? Read more...

Dino Esposito

Syntactic Sugar and the Async Pill

Asynchrony is essential for scalability and performance on the server side. Although it has always been possible to write asynchronous code, there has, up to now, been a downside: it is difficult to understand and maintain. Now, with the async/await. keywords, the whole approach is radically simplified for the programmer. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook: Part 8: Log Messages

There should always be a reason for a commit to source control, so why not make a log message mandatory when you commit, and make it easy add a link to a record in a bug-tracking system, or to another Log message? Michael Sorens explains how. Read more...

Bud Aaron

Deploying a simple database application to AWS and other cloud services

So how easy are you going to find putting websites in the Cloud? We decided to ask Bud, who has loads of IT experience, but is a stranger to the cloud, to create a minimal 'Hello world', LightSwitch application and attempt to deploy it; first to Amazon Web Services, then Elastichost and finally to Windows Azure. He documented the struggle. Read more...

Bud Aaron

Getting Started with Amazon AWS and Elastic Beanstalk

We wondered how easy it would be for the average developer to use one of the cloud services to put up one of the very simplest of ASP.NET MVC applicastions, NerdDinner, complete with database. We asked Bud, who turned into an intrepid explorer of the Amazon to show us the way. Read more...

Chris Farrell

.NET Memory Management Basics

.NET memory management is designed so that the programmer is freed from the chore of consciously having to allocate and dispose of memory resources. It is optimized to work best with the most common patters of usage. However, the more conscious you become of scalability and performance, the more useful an understanding of NET memory management becomes. Read more...

Jean-Philippe Gouigoux

.NET Memory Management and Finalization

In this excerpt from his new book, Practical Performance Profiling: Improving the Efficiency of .NET Code, Jean-Phillipe Gouigoux discusses the Dispose mechanism and the finalization process in the context of .NET Garbage Collection Read more...

Dino Esposito

ASP.NET MVC: Resolve or Inject? That’s the Issue…

Classes should have dependencies only on abstract, rather then concrete, classes. To get around this, you can choose between Service Locator and Dependency Injection techniques. ASP.NET MVC uses 'Dependency Resolvers' which are Service Locators. When designing ASP.NET MVC applications it is open to you to decide whether to resolve or inject, so what are the pros and cons? Dino explains. Read more...

Michael Sorens

Practical PowerShell: Pruning File Trees and Extending Cmdlets

One of the most radical features of PowerShell is amongst the least known. It is possible to extend the buit-in Cmdlets to provide extra functionality. One can add or remove parameters to make subsequent scripting simpler. Michael shows how this is done to meet a practical requirement:, excluding entire subtrees from a recursive directory trawl for automating source control. Read more...

Jeremy Jarrell

MongoDB Basics for .NET by Example

MongoDB is one of the more intriguing 'NoSQL' databases to emerge from 'Cloud' computing. Sometimes, the best way of understanding a rather different technology is to get stuck-in and try it out, so Jeremy Jarrell shows how to get started with a simple ASP.NET MVC project that uses MongoDB. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 6: Snapshots

Moving backwards in time in Subversion is like time travel in science fiction. It's fine to look around, but If you change anything it can have unforseen consequences, and you always have to return to the present. Snapshots enable you to navigate in source control to examine or compile the code as it existed at a point in time; to access a particular build. Read more...

Dino Esposito

A Generic ASP.NET MVC Template

When you start an ASP.NET MVC project, you choose one of a number of project templates or starter kits. The ones that Visual Studio provide are very useful, but you can create your own if you want, and Dino finds that the generic one that he presents in this article works well to rapidly create MVC applications. Read more...

Patrick Smacchia

On Writing Unit Tests for C#

Is it realistic to keep to principles of 'Test-First' and 100% coverage for unit tests when in the heat of developing commercial C# applications? Does rigorous unit-testing lead naturally to good design by enforcing testability, low coupling and high cohesion? Patrick Smacchia gives his opinion based on hard-won experience. Read more...

Andy Brown

10 Reasons Why Visual Basic is Better Than C#

After having converted a whole lot of training materials based on VB.NET into C#, Andy ‘Wise Owl’ Brown decided to write a tongue-in-cheek rant whilst he could still remember the pain-points. 'Convert to VB.NET! You have nothing to lose but your semi-colons! ' Read more...

Dave McMahon

PowerShell for SharePoint Developers

For some reason, Sharepoint developers haven't taken to PowerShell with the same enthusiasm as the DBAs and SysAdmins. Dave McMohan is a man on a mission to explain that PowerShell can provide plenty of power for repetitive tasks and, once learned, can mean very quick scripting. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 5: Instrumenting Files with Version Information

Subversion lets you embed, and automatically update, information within source-controlled files to make it easy to see who did what, and when they did so. It is not entirely straightforward to get it working, though; unless of course you read, and follow, Michael's easy guide. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 4: Sharing Common Code

Michael Sorens continues his series on source control with Subversion and TortoiseSVN by describing several ways one can use to share code among several projects. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 3: In, Out, and Around

Subversion doesn't have to be difficult, especially if you have Michael Sorens's guide at hand. After dealing in previous articles with checkouts and commits in Subversion, and covering the various file-manipulation operations that are required for Subversion, Michael now deals in this article with file macro-management, the operations such as putting things in, and taking things out, that deal with repositories and projects. Read more...

Tom Fischer

Unit Testing Myths and Practices

We all understand the value of Unit Testing, but how come so few organisations maintain unit tests for their in-house applications? We can no longer pretend that unit testing is a universal panacea for ensuring less-buggy applications. Instead, we should be prepared to actively justify the use of unit tests, and be more savvy about where in the development cycle the unit test resources should be most effectively used. Read more...

Simone Chiaretta

ASP.NET MVC Routing Extensibility

You develop an ASP.NET MVC application by extending it; customising any default logic that you wish to change with your own implementation. Simone starts a tour of the extensibility points of ASP.NET MVC, by looking at the beginning of the pipeline, the Routing Module, and gives a practical example of writing an extension, with source code: a way of 'watermaking' images 'on the fly'. Read more...

Michael Sorens

TortoiseSVN and Subversion Cookbook Part 2: File Operations and Subversion Filtering

The second part of Michael's series of articles gives more recipes for Subversion Source Control. This time he explains how to add files, highlights tools and techniques for determining what to include in source control and shows how to quickly and efficiently filter out the "noise". Read more...

Michael McLaughlin

5 Tips for Understanding Managed-Unmanaged Interoperability in .NET

Interop doesn't have to be taxing. Interoperability between managed and unmanaged code happens under the hood in .NET. When you are doing Interop in your .NET applications, there are a few things to beware of, and Michael McLaughlin gives a brief introduction of how interop is used in .NET before explaining the five points to watch out for. Read more...

Michael Sorens

Subversion and TortoiseSVN Cookbook Part 1- The Basics

If you have more than zero developers in your team, then you need Source Control. In this article Michael starts a series that aims to provide clear and complete recipes for using Subversion, mainly through its simple, elegant, graphical interface: TortoiseSVN. Read more...

Michael McLaughlin

5 Tips and Techniques for Avoiding Automatic GC Collections

Automatic memory management isn't new, but it’s a wonderful thing for programmers. We bring you some tips and techniques to .help you understand a bit more about how .NET’s memory management works, can help you to ensure that you write high-performance .NET code. Read more...

Jonathan Medd

Adding a Graphical Front End to your PowerShell Scripts

Even if you know PowerShell inside and out, there will be those times where you won’t be the end user for your script, even within your organisation. You need a straightforward GUI. Thankfully, Jonathan Medd has provided workthoughs for three tools - PowerGUI, PrimalForms, and SQL Scripts Manager – to help apply some GUI goodness to your scripts. Read more...

Matteo Slaviero

TLS/SSL and .NET Framework 4.0

The Secure Socket Layer is now essential for the secure exchange of digital data, and is most generally used within the HTTPS protocol. .NET now provides the Windows Communication Foundation (WCF) to implement secure communications directly. Matteo explains the TLS/SSL protocol, and takes a hands-on approach to investigate the SslStream class to show how to implement a secure communication channel Read more...

Simone Chiaretta

An Introduction to ASP.NET MVC Extensibility

Because ASP.NET MVC has been designed with extensibility as its design principle; almost every logical step of the processing pipeline can be replaced with your own implementation. In fact, the best way to develop applications with ASP.NET MVC is to extend the system, Simone starts a series that explains how to implement extensions to ASP.NET MVC, starting with the ones at the beginning of the pipeline (routing extensions) and finishing with the view extensions points. Read more...

Clay Burch

Stock Market Technical Analysis

Although the technical approach to stock market analysis has been around since the 1800s, some improvements have obviously been made over time. With the introduction of computers, and specifically .NET libraries geared towards statistical analysis, huge, complex operations have been made easy. Read more...

Michael Williamson

Writing Maintainable Code

Writing maintainable code is hard. It must be understandable, testable and readable. Any one of these can be tricky, and together they seem pretty daunting. Thankfully, Michael Williamson makes it look easy to become a code craftsman. Read more...

David Berry

Designing C# Software With Interfaces

The best way to understand how interfaces improve software design is to see a familiar problem solved using interfaces. First, take a tightly-coupled system design without interfaces, spot its deficiencies and then walk-through a solution of the problem with a design using interfaces. Read more...

Phil Factor

Making HTML tables easier on the eye- CSS Structural Pseudo-classes

We asked Phil why his PowerShell tabular reports looked so nice. 'CSS structural pseudo-classes' he muttered mystically. Later on, without any further warning, he popped up with this article that explains for anyone who has missed them, how to go about doing intricate formatting of an HTML file, the contents of which you cannot alter. Read more...

Hima Bindu Vejella

Entity Framework 4.0 - Learn to Create Databases from the Model

For application developers focusing on the needs of their code, rather than worrying about the complexities of data representation, the Entity Framework’s abstractions are essential. But eventually a database needs to be created, and Hima is here to show us how it’s done. Read more...

Richard Costall

Elevated Trust in Silverlight 4

Richard Costall brought us up to speed on getting Silverlight to run beyond the browser, and now he's giving us a crash course in how to use the new Elevated Trust mode available in Silverlight 4 to give your application even more customisations and permissions on your users' machines. Read more...

Michael Sorens

XPath, CSS, DOM and Selenium: The Rosetta Stone

Some programming conventions are best represented in a chart. Nobody will claim that XPath or CSS are entirely intuitive, as they are terse, economical ways of identifying elements in a hierarchy. However, a chart with recipes and examples is a different matter. Suddenly, apps like Selenium IDE are made easier. Read more...

Patrick Smacchia

Defining .NET Components with Namespaces

A .NET software component is a compiled set of classes that provide a programmable interface that is used by consumer applications for a service. As a component is no more than a logical grouping of classes, what then is the best way to define the boundaries of a component within the .NET framework? How should the classes inter-operate? Patrick Smacchia, the lead developer of NDepend, discusses the issues and comes up with a solution. Read more...

Joydip Kanjilal

EntityDataSource Control Basics

The Entity Framework can be easily used to create websites based on ASP.NET. The EntityDataSource control, which is one of a set of Web Server Datasource controls, can be used to to bind an Entity Data Model (EDM) to data-bound controls on the page. Thse controls can be editable grids, forms, drop-down list controls and master-detail pages which can then be used to create, read, update, and delete data. Joydip tells you what you need to get started. Read more...

Jonathan Evans

Capturing Screenshots for Automated Error-Reporting

So often, a screendump will explain a great deal about a bug, and prevent much frustration in the process of error-reporting. For EAP testing or user-acceptance testing, it can speed up the whole process dramatically. Including a screendump with an automated error-report isn't hard either, as Jonathan Evans explains ... Read more...

Richard Costall

Silverlight Beyond the Browser: The Basics

Silverlight can now be used to write a complete business application that can be run outside the browser. Such an application will probably need to automatically check, and react to, changes to the network status, as well as automatically download and install updates from the server. It will need to be easily installed from the browser. Richard Costall explains how, with a complete example. Read more...

Patrick Smacchia

Partitioning Your Code Base Through .NET Assemblies and Visual Studio Projects

Should every Visual Studio project really be in its own assembly? And what does 'Copy Local=True' really mean? Patrick Smacchia is no stranger to large .NET projects, and is well placed to lay a few myths to rest, and gives some advice that promises up to a tenfold increase in speed of compilation. Read more...

Jeremy Jarrell

Hitting the Ground Running with Parallel Extensions in .NET 4.0

With the arrival of Parallel Extensions in .NET 4.0, the concurrent programming powers traditional reserved for the most elite of developers are now available to all of us. With multi-core processors increasingly becoming the norm, this is good news, and Jeremy Jarrell gives us the essential knowledge we'll need to get started. Read more...

Michael Sorens

LINQ Lycanthropy: Transformations into LINQ

LINQ is one of the few technologies that you can start to use without a lot of preliminary learning. Also, it lends itself to learning by trying out examples. With Michael's help, you can watch as your conventional C# code changes to ravenous LINQ before your very eyes. Read more...

Zenon Ochal

Dynamic Language Integration in a C# World

.NET 4.0 introduced the Dynamic keyword in C#4.0, making it simple to have your .NET code smoothly interact with dynamic languages. To find out just how easy it was, Zenon Ochal used C# and IronPython to build a very efficient mathematical expression plotter in double-quick time. Read more...

Michael Sorens

LINQ Secrets Revealed: Chaining and Debugging

LINQ has the capabilities of providing a great productivity boost. LINQ Chaining is particularly powerful magic, giving your code greater clarity and brevity. Using it, and debugging it, can be tricky without the right tools and techniques, but Michael is on hand to explain and make suggestions. Read more...

Nick Harrison

Some NHibernate Best-Practices

NHibernate can help to build a project more quickly if the database it connects to is sound. Otherwise, there are bound to be problems, but they are not problems of NHibernate's making. Nick Harrison gives some advice, and suggests some 'best-practices' for using it, fresh from the reality of developing an application based on NHibernate. Read more...

Michael Sorens

Creating Tray Applications in .NET: A Practical Guide

It isn’t widely known that you can use both WPF and Winforms with VS2010 to create a system tray application in .NET. Michael gives you a practical guide, illustrated by an example that is so effective it can be put to immediate practical use. HostSwitcher comes complete with source code and can be downloaded. Read more...

Leidago !Noabeb

Using Table Valued Parameters with VB.NET

SQL Server's Table-Valued Parameters are useful, and easy to use, but you should be aware that something that looks loke a table, and seems to behave like a table, can't necessarily be used just like any other table. Leidago gives a developer's guide on how, and why, you should use TVPs in your application. Read more...

Khawar Yunus

One application in both WPF and Silverlight

Because Silverlight is a development of Windows Presentation Foundation, and the technologies are so interlinked, it would seem obvious that there would besuch a high degree of code compatibility that one could then develop an application for both platforms from a common code-base. Khawar describes how it can be done, and shows the results. Read more...

Matteo Slaviero

Code Access Security in ASP.NET 4.0

In the third, and final article that introduces Code Access Security in .NET Framework 4.0, Matteo explains, with examples, how the Level2 Security Transparent Model works within a hosted ASP.NET environment. Read more...

Dave McMahon

SharePoint 2010 Visio Services

Even if you’ve heard of SharePoint, you may not know about Visio Services, which is making Data-Driven visualizations easier to create than ever before. Dave McMahon has generously provided an excellent introduction to get us up to speed, complete with a step-by-step guide to getting started. Read more...

Vladimir Bodurov

Using Microsoft Robotics Developer Studio with Lego Mindstorms NXT Robot

A good way to learn about Robotics is to build a Lego Mindstorms NXT robot and to control it using Visual Studio and Microsoft Robotics Developer Studio. Although the results will hardly do the washing up for you, you'll gain valuable insights into thread synchronisation and coordination in a multiprocess, multi-code event-driven environment. Yes, and it is great fun too! Read more...

Michael Sorens

Mixing WPF and WinForms

You can embed WPF controls in a WinForms application or WinForms controls in a WPF application, using a simple adapter. Because of this inherent symmetry, you can build hybrid applications, mixing controls from the other platform. Michael Sorens gives a practical guide to WPF / WinForms interoperability Read more...

Djonatas Tenfen

Building an Airport Status Mashup with Silverlight and Bing Maps

Djonatas Tenfen demonstrates in fine detail how to quickly and easily build a mashup Silverlight application to consume and manipulate multiple data sources, and plot airports' realtime status onto a map. Read more...

Eli Arbel

Reflectoron in Prism: a WPF MVVM tutorial

When Eli was writing a WPF MVVM tutorial, he decided to use .NET Reflector as his sample, and created a WPF UI for .NET Reflector using its public interface, mimicking the original. A WPF/Prism version of Reflector? Eli explains what he did, and supplies the complete project and source to Reflectoron Read more...

Matteo Slaviero

What's New in Code Access Security in .NET Framework 4.0 - Part 2

Having introduced us to the basics of the new Code Access Security Model available in .NET Framework 4.0, Matteo Slaviero explains how to use this powerful new system to implement fine-grained code security in ways where have never before been possible. Read more...

Nick Harrison

Back to Basics: Wiring up a Web Application

In the third of a series on Web Application design, Nick turns his attention to the Model part of the Model View Presenter (MVP) pattern, and discusses what a well-behaved model might look like Read more...

Matteo Slaviero

What's New in Code Access Security in .NET Framework 4.0 - Part I

The Code Access Security model has been completely redesigned in the .NET Framework 4.0, to the point where CAS policies have been completely removed, and everything now works through Level2 Security Transparency. Confused? Not for long. Matteo Slaviero, a .NET security expert, brings us up to speed. Read more...

Phil Factor

The Cobra Programming Language

There are suddenly a number of strong alternatives to C# or VB. F#, IronPython and Iron Ruby are now joined by an open-source alternative called Cobra. Phil is taken by surprise at a language that is so intuitive to use that it is almost like pseudocode. Read more...

Nick Harrison

Back to Basics: Converting a Web Page to a Web Form View

ASP.NET developers can learn a lot from MVC practices. This article shows you how to structure a WebPage in an ASP.Net web application so that it is behaves like an MVC View, and suggests a number of ways to increase the quality, and portability, of ASP.NET applications by encapsulation, and separating the logic between the Presenter and View. Read more...

Charles Lee

How to Create Features for Windows SharePoint Services 3.0

To customise a SharePoint (WSS 3.0) site, you'll need to understand 'Features'. The 'Feature' framework has become the recommended method of customising a SharePoint site, because it allows the ultimate flexibility, extensibility and scalability for you customisations. Charles Lee explains. Read more...

Edward Elliott

Investigating .NET Memory Management and Garbage Collection

Investigating a subtle memory leak can be tricky business, but things are made easier by using The .NET framework's tool SOS (Son of Strike) which is a debugger extension for debugging managed code, used in collaboration with the Windows debugger. Read more...

Michael Sorens

From WinForm to WPF: A Quick Reference Guide

Michael Sorens provides a handy wallchart to help migration between WinForm / WPF, VS 2008 / 2010, and .NET 3.5 / 4.0. this can be downloaded for free from the speech-bubble at the head of the article. He also describes the current weaknesses in WPF, and the most obvious differences between the two. Read more...

Amirthalingam Prasanna

Developing your Data Access Layer with ADO.NET Entity Framework 4

Entity Framework has evolved in the light of feedback. ADO.NET Entity Framework 4 is now better able to accommodate different development methodologies. A welcome improvement is the way that, the application designer now has a range of options in the way that Entity Framework creates the Data Access layer. Prasanna returns to Simple-Talk to explain the significance of the changes. Read more...

James Johnson

Hands-on Entity Framework

People keep saying that Entity Framework is simple to learn. Simple? Well, finally, we're going to be forced to agree, thanks to James Johnson's new series on learning EF the hands-on way. Read more...

Charles Lee

How to Create Event Receivers for Windows SharePoint Services 3.0

You'll be surprised how often that you'll use event receivers instead of Workflow in order to implement functionality in Sharepoint; And who better to get you started with a simple guide to using them than Charles Lee? Read more...

Michael Sorens

Using LINQ Lambda Expressions to Design Customizable Generic Components

LINQ makes code easier to write and maintain by abstracting the data source. It provides a uniform way to handle widely diverse data structures within an application. LINQ’s Lambda syntax is clever enough even to allow you to create generic building blocks with hooks into which you can inject arbitrary functions. Michael Sorens explains, and demonstrates with examples. Read more...

Matteo Slaviero

Symmetric Encryption

Cryptography is an increasing requirement for applications, so it is great that it is part of the .NET framework. Matteo builds on his first article that explained Asymmetric Cryptography and Digital Signatures, and tackles Symmetric Encryption and how to implement it in the .NET Framework. Read more...

Damon Armstrong

.NET Developer Basics - Recursive Algorithms

Recursion can be a powerful programming technique when used wisely. Some data structures such as tree structures lend themselves far more easily to manipulation by recursive techniques. As it is also a classic Computer Science problem, it is often used in technical interviews to probe a candidate's grounding in basic programming techniques. Whatever the reason, it is well worth brushing up one's understanding with Damon's introduction to Recursion. Read more...

Edward Elliott

A Look at Exceptions in .NET Applications

Memory dumps are a wonderful way of finding out what caused an exception in a managed .NET application, particularly if it is happening in a production application. It is when tracking exceptions in applications where you can't use Visual Studio that the techniques of using cdb and sos.dll come into their own. They may nor be skills that you need to use regularly, but at some point, they will be invaluable. Edward supplies sample memory dumps and gives you a simple introduction. Read more...

Michael Sorens

Using Three Flavors of LINQ To Populate a TreeView

LINQ is a valuable technology. LINQ to XML, LINQ to Objects and LINQ to XSD, in particular, can save valuable time for developers and produce more maintainable code. Michael describes how he used three different flavours of LINQ to map XML to a Treeview component that he used in the QueryPicker control that was the subject of a two-part article here on Simple-Talk. Read more...

Phil Factor

Connection Strings, an Overview

We asked Phil to come up with a simple explanation of connection strings. We somehow weren't expecting a 'quote of the day' for your database, or a C# application to gather data from the internet. However, sometimes the oblique approach is the best, especially when the knowledge comes from hard-won experience by a cynical man. Read more...

Edward Elliott

.Net Debugging? Don't give me none of your VS

Visual Studio is fine for most debugging purposes. Just occasionally, it isn't practicable, or there are other quicker ways of doing it with a user-mode debugger. Edward argues that debugging in MSIL or assembly language is a strangely liberating experience and can be a lightweight route to discovering the cause of elusive bugs. He starts off with a simple introduction to SOS debugging. Read more...

Matteo Slaviero

Beginning with Digital Signatures in .NET Framework

Digital Signatures aren't the most intuitive software devices to explain, but Matteo boldly gives a quick-start account of Asymmetric Cryptography and Digital Signatures before demonstrating how simple it can be to perform a signature using an X509 certificate and .NET Framework base classes Read more...

Nick Harrison

.NET Reflector meets the CodeDom

.NET Reflector was the first .NET tool to allow assemblies to be disassembled back into the high level language that produced them. Moreover, it has a plug-in architecture that allows you to disassemble to any language for which you have a plug-in, or are prepared to write one. Nick Harrison takes it one further step, and creates a plug-in that produces the CodeDom code needed to create the contents of the assembly. Nick explains, gently. Read more...

Jeremy Jarrell

We needed to find the source of the memory leak, and fast

At any time, memory leaks in a commercial application have to be fixed; but when your application is being deployed via virtualized desktops using platforms such as Microsoft Application Virtualization for Terminal Services or Citrix XenDesktop, then it becomes vital that memory is used as efficiently as possible. You can imagine what would happen if signs of a large memory leak showed up during the deployment to a key customer. Jeremy Jarrell tells the story. Read more...

William Brewer

Calling Stored Procedures from .NET Applications

Everybody knows how to call stored procedures from a .NET application. Right? But then, how often do you see stored procedures used to their full advantage in database applications? William Brewer goes through some of the basics, but uses PowerShell and IronPython as well as VB.NET as the example .NET applications just to freshen the subject up a bit, and avoids all mention of Northwind or AdventureWorks! Read more...

Andrew Hunter

Object Overhead: The Hidden .NET Memory Allocation Cost

When developing a .NET application, one of the least visible sources of memory consumption is the overhead required by an object simply to exist. In applications that create a lot of small objects, this overhead can be a major or even a dominant factor in the total memory requirements for the application. Read more...

Nick Harrison

A Defense of Reflection in .NET

The trouble with making general rules about programming practices is that one can miss out on many benefits of of a framework by following them too literally in every context. Everyone knows that one should watch for performance problems and security issues with reflection. It doesn't mean you shouldn't it, it just means you must test carefully, monitor performance, and assess risks. Nick Harrison illustrates the theme with a practical example. Read more...

Charles Lee

How to Create Custom Lists in Windows SharePoint Services 3.0

In the first of a series of  articles about Sharepoint, Charles Lee shows how easy it is to create custom lists that can then be used with Workflows, custom columns, lookup columns, and calculated fields. He then demonstrates how several lists can be used together to create a custom SharePoint application by linking these lists through lookup columns Read more...

Nick Harrison

Code Deodorants for Code Smells

Code Smells have become an established way of talking about indications that things may be wrong with your code. Nick Harrison extends the idea with the concept of 'code deodorants' and shows how the code smell of 'inappropriate intimacy' can be cured by means of the code deodorant called 'separation by interface'. Read more...

Andrew Hunter

Understanding Garbage Collection in .NET

Once you understand how .NET's garbage collector works, then the reasons for some of the more mysterious problems that can hit a .NET application become much clearer. NET may have promised the end to explicit memory management, but it is still necessary to profile the usage of memory when you're developing .NET applications if you wish to avoid memory-related errors and some performance issues. Read more...

Nick Harrison

A Gentle Introduction to .NET Code Generation

Code-generation has been used throughout the age of the digital computer. The use of code to generate code might, at first glance, seem an odd thing to want to do, but the technique is alive and well, and is widely used in .NET.  Nick Harrison explains, and introduces the CodeDom... Read more...

Nick Harrison

Exploring Smelly Code

Bad Code Smells are similar in concept to Development-level Antipatterns. They don't describe bad programming aesthetics and you can't sniff them out precisely with code metrics. They describe code in need of refactoring in rich language such as 'Speculative Generality', 'Inappropriate Intimacy' or 'shotgun surgery'. They're useful because they give us words to describe antipatterns that we all come across in code. Nick Harrison explains... Read more...

Ben Hall

Embedding IronRuby and the DLR into SQL Data Generator

You can embed DLR-based languages such as IronPython and IronRuby into applications. This gives you instant scripting, and with it, the potential for greatly simplifying the development process. You can even take advantage of existing applications that have a plug-in architecture, such as SQL Data Generator and NET Reflector. Be Hall takes SQL Data Generator and shows how this technique allows you to create simple generators specifically for your needs. Read more...

Andrew Hunter

When to Run and When to Block

When you are developing a multi-threaded application, you will need to understand how the operating system decides which threads are to be blocked, and which should run. Performance comes from running the optimum number of threads at all times, getting the maximum benefit from the computers processing resources. Read more...

Andrew Hunter

The Dangers of the Large Object Heap

You'd have thought that memory leaks were a thing of the past now that we use .NET. True, but we can still hit problems. We can, for example, prevent memory from being recycled if we inadvertently hold references to objects that we are no longer using. However, there is another serious memory problem in .NET that can happen out of the blue, especially if you are using large object arrays. Andrew Hunter explains... Read more...

John Papa

Using Silverlight to Build a Guitar Chord Calculator

Silverlight is so versatile that it is easy to move beyond conventional browser-based applications and even write games. John Papa celebrates the launch of his new book by bringing you a simple Silverlight guitar Chord Calculator to demonstrate features of Silverlight such as Data binding, Media elements, Resources, Transforms, Visual states and Dynamically generated controls. He has placed the complete source on Codeplex, so that you can enhance it if you feel the urge. Read more...

Gayani Devapriya

Designing A Data Access Layer in LINQ to SQL

Gayani provides the complete source code for a sample Data Access Layer for LINQ to SQL, using the Northwind Database, and explains how it all works and how to get good performance. She shows how easy it is to use stored procedure and views as well as queries to provide a robust run-time infrastructure for managing relational data as objects. Read more...

Vladimir Bodurov

Building a Simple 3D Engine with Silverlight

Even if you intend only to use existing 3D engines in your applications, it always helps to understand how they work. Vlad hopes that you 'take the red pill', and learn how to render three-dimensional objects with C# without the use of any pre-existing 3D engine. Read more...

Amirthalingam Prasanna

Some Data with your Application Take-away, Sir?

Prasanna is reminded of pizza in cardboard boxes when he explores the possibilities of Synchronization Services for ADO.NET. Data applications are becoming increasingly mobile, and often disconnected, and data is often wrapped up to be consumed later. Miccrosoft's Merge Replication was their first, and most heavyweight, solution, but now comes a different tack, based on SQL Server 2008 and ADO. Read more...

Gayani Devapriya

Dynamic Data Templates in ASP.NET 3.5

Gayani gives an introduction to Dynamic Data Templates in ASP.NET 3.5 and explains how one can save a great deal of time and effort when building data-driven web sites by using them Read more...

Chris Massey

Mysteries of the NET Framework: The Challenge

We're very aware that some of the brightest NET programmers want to use ANTS 4, but are on tight budgets. Have no fear, as we have ten copies to give away to those who can illuminate the dark mysteries of the NET Framework. Read more...

Robert Chipperfield

Exceptionally Mysterious

If you are adept in puzzling over the cryptic messages in your stack trace, when a .NET exception is thrown, you may be surprised when they start talking complete nonsense. Is it really possible that two threads could build the stack trace on the same exception object at the same time? Read more...

Amirthalingam Prasanna

Creating Service-Orientated Data-Access Layers

The ADO.Net Data Services framework enables you to provide data services to Web applications that are simple to integrate with them. The data services use URIs to point to pieces of data, and use standards such as JSON and XML to transfer that data. ADO.NET Data Services uses the Entity Framework,  which allows an easy translation from a Database layer based on Stored procedures, to an object-orientated Application layer. It all seems surprisingly sensible. Prasanna explains all, as usual. Read more...

Heather Fielding

Embedding Help so it will be used

It is not good enough to make assumptions about the way that users go about getting help when they use your application. Heather Fielding describes how she was able to test the effectiveness of various different ways of providing embedded help in an application. By changing the design, she discovered, you can greatly increase the users willingness to use such help to make the task easier. Read more...

Vladimir Bodurov

Dynamically generating typed objects in .NET

When you are binding Data to DataGrid in .NET, this has to be done at design-time. That's fine if you know what the form of the data is at design time: but what if you don't? Vlad Bodurov looks at some of the options and demonstrates an unusual dynamic technique that transforms IDictionary into a typed object Read more...

John Papa

Data and Silverlight 2: Data Binding

Silverlight 2 is far more versatile than Silverlight 1. It can handle data-sources with some subtlety. John Papa tackles the whole subject of data-binding with Silverlight. This article is a partial excerpt from John Papa's upcoming book Data Access with Silverlight 2 by O'Reilly, due to be released in December 2008. Read more...

Amirthalingam Prasanna

Entity Framework: The Cribsheet

Prasanna Amirthalingam provides an overview of Entity Framework and how it can be used. He shows that it can provide an excellent interface between the Object-oriented model and the relational. The Entity Framework allows developers to work with data in the form objects and properties without having to concern themselves directly with either the stored procedures or functions of the defined interface, or the the underlying database tables and columns where this data is stored. Read more...

Dan Archer

Sid: Vicious

Dan Archer documents his epic struggle with an apparently simple task of authenticating user credentials. For some reason, a task that should be performed by a simple API call leads to a great deal of head-scratching and googling. Read more...

Amirthalingam Prasanna

.NET Collection Management with C# 3.0

Generics in C#, enable you to define classes, interfaces, delegates or methods with placeholders for parameterized types used within. This allows you to define classes that use a generic type, and define the type at the time of instantiation or method calls. This makes your code strongly typed, but makes maintenance easier. Prasanna describes the improvements in .NET v3.5 Read more...

John Bower

Silverlight Skinnable User Interfaces

John Bower demonstrates more of the features of Silverlight, and Expression Blend, and shows how one might write an application that avoids UI pitfalls by placing your design responsibility squarely on your users’ shoulders. If it looks bad, it’s their fault! Read more...

Steven R. McCabe

Taking Exceptions

Steve looks at the requirements that are usually in force for the support of a team-based 'production System' and suggests a way that exception-handling in C# can be used to provide robust error reporting Read more...

John Bower

Silverlight-Speed Loop

John Bower steps up a gear, produces a Lamborghini, and examines the process of using a high-speed function loop to create a fast-paced Silverlight application. Read more...

John Bower

Let there be Silverlight

John Bower stays calm, and so will you, whilst guiding you to producing your first Silverlight application. It may just be 'Hello World' but soon... Read more...

James Moore

Integrating with WMI

James shows how to add a simple WMI provider to a service so that you can monitor it, and make changes to it, remotely across the network Read more...

John Papa

.NET 3.5 Language Enhancements

LINQ may be getting the most attention in the forthcoming .NET 3.5, but there are also several new language features that add functionality and make life easier for the programmer. John Papa explains more... Read more...

Francis Norton

Implementing Real-World Data Input Validation using Regular Expressions

Francis Norton shows how to use regular expressions to fulfil some real world data validation requirements, demonstrating techniques ranging from simple number format checks, to complex string validation that requires use of regex's powerful "lookahead" feature. Read more...

Jesse Liberty and Alex Horovitz

Getting Started with XAML

See for yourself the flexibility of XAML, as Jesse Liberty and Alex Horovitz show you how to create an interactive Windows application declaratively, in .NET 3.0. Read more...

Jeff Hewitt

Building Active Directory Wrappers in .NET

The ability to authenticate .NET application users against Active Directory is a common requirement. Here, Jeff Hewitt demonstrates how to build wrapper classes in Visual Basic that can convert AD data types into ones that can be used in a .NET application. Read more...

Damon Armstrong

.NET Application Architecture: Logging SQL Exceptions in the Data Access Layer

Damon Armstrong demonstrates an efficient way to capture and manage SQL exceptions in your .NET application, by adding a SQL logger to your data access layer. Read more...

Julian Skinner

Asynchronous Processing in .NET Part 2

Julian Skinner presents an in-depth tutorial on thread synchronization in .NET, covering the most important Synchronization objects and including a full worked example. Read more...

Damon Armstrong

.NET Application Architecture: the Data Access Layer

Find out how to design a robust data access layer for your .NET applications. Read more...

Phil Wilson

Simple COM server registration

Looking at COM activation context on Windows XP and Windows Server 2003. Working with manifest files and XML. Exposing .NET COM class libraries using interop. Read more...

Amirthalingam Prasanna

.NET Collection Management

This article focuses on managing a collection of objects using generics, an important addition to the .NET Framework 2.0, and examines the capabilities provided by the generic list. Read more...

Amirthalingam Prasanna

ADO.NET 2.0 Factory Classes

This article explains how to use .NET 2.0’s data provider factory classes to develop a pluggable data layer that is independent of database type and ADO.NET data provider. Read more...

Steve Joubert

Does your app need an independent data layer?

This article looks at the benefits and drawbacks of building an independent data layer into your application. Read more...

Steve Joubert

Data Synchronization

Making your smart client application work in a disconnected environment - considering data loading and return synchronization. Read more...

Amirthalingam Prasanna

Custom Events in VB.NET 2005

Visual Basic .NET is well known for its event-driven programming capabilities. VB.NET 2005 adds new functionality for custom events that provides flexibility in handling and controlling events. Read more...

Amirthalingam Prasanna

Schema and metadata retrieval using ADO.NET

How to obtain different types of information from your SQL Server 2000 database using ADO.NET 2.0, part of VS.NET 2005 and .NET 2.0. Read more...

Amirthalingam Prasanna

Using partial classes to make intelligent datasets

This article looks at how partial classes can be used to implement business logic into datasets so that they are more business aware and intelligent. Read more...

Amirthalingam Prasanna

.NET 2.0 transaction model

.NET 2.0 introduces a new System.Transactions namespace that brings in a lightweight, simplified transaction model. Read more...

Douglas Reilly

Should you use ADO.NET DataReader or DataSet?

In the beginning, there was the recordset, a central feature of classic ADO. In ADO.NET it was gone. Read more...

Amirthalingam Prasanna

Visual Basic.NET 2005

Discover some of the new features in Visual Basic.NET 2005 such as partial classes, generics, operator overloading and using block Read more...

Neil Davidson

Extending the save file dialog class in .NET

The jigsaw with the missing piece - using the GetSaveFileName function to extend the Save File dialog class. Read more...

Most Viewed

A Complete URL Rewriting Solution for ASP.NET 2.0
 Ever wondered whether it's possible to create neater URLS, free of bulky Query String parameters?... Read more...

Visual Studio Setup - projects and custom actions
 This article describes the kinds of custom actions that can be used in your Visual Studio setup project. Read more...

.NET Application Architecture: the Data Access Layer
 Find out how to design a robust data access layer for your .NET applications. Read more...

Calling Cross Domain Web Services in AJAX
 The latest craze for mashups involves making cross-domain calls to Web Services from APIs made publicly... Read more...

Web Parts in ASP.NET 2.0
 Most Web Parts implementations allow users to create a single portal page where they can personalize... Read more...

Why Join

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.