.NET Matters: Stream Decorator, Single-Instance Apps 10 Aug 2005 20:11 GMTStephen Toub explains how to use the Decorator design pattern to implement your own Stream-derived decorator class that lets you intercept and monitor every call to the stream, and how you can make your application a single-instance application.
Source: MSDN Design Patterns: Dependency Injection 10 Aug 2005 20:05 GMTAs application size and complexity increase, so do dependencies. One way to mitigate the proliferation of dependencies is by using the Dependency Injection pattern, which Griffin Caprio outlines this month
Source: MSDN Advanced Basics: Revisiting Operator Overloading 10 Aug 2005 19:58 GMTThis month Ken Getz rewrites a color picker application he wrote some columns ago to illustrate a really good use of operator overloading. He warns that overloading should not be used cavalierly, but there are times when it makes a big difference
Source: MSDN Important Notice for ONDotNet Readers About O'Reilly RSS and Atom Feeds 10 Aug 2005 04:00 GMTO'Reilly Media, Inc. is rolling out a new syndication mechanism that provides greater control over the content we publish online. You'll notice some improvements immediately, such as better standards compliance, graphical tiles accompanying article descriptions, and enclosure support for podcatching applications. We've tested the new feeds using a variety of popular newsreaders and aggregators, but we realize that there may be a few bumps along the way. If you experience problems, please don't hesitate to send mail to webmaster@oreilly.com. Please include detail about your operating system and reader applications. We also welcome your suggestions. Thank you for your continued support of ONDotNet. The following URLs represent ONDotNet's article and weblog content in a variety of popular formats: Atom 1.0 http://www.oreillynet.com/pub/feed/6 RSS 1.0 http://www.oreillynet.com/pub/feed/6?format=rss1 RSS 2.0 http://www.oreillynet.com/pub/feed/6?format=rss2 We will begin automatically redirecting the existing feeds to the new feeds above, but we recommend that you update your feedreader's subscription settings to ensure continuous and uninterrupted service. Thanks, O'Reilly Media, Inc.'s Online Publishing Group...
Source: O'Reilly Streamlining Your Data Access Layer with Helper Methods 10 Aug 2005 00:00 GMT
A well-architected ASP.NET application provides definitive boundaries between the application's presentation logic, business
logic, and data access code. That is, your ASP.NET web pages should consist solely of markup and logic for displaying
data - the specific business rules and code for accessing and modifying the application's underlying data should both be
implemented in a separate class libraries.
While there are different models for defining how these different tiers interact
and collaborate with one another, the simple fact remains that, at minimum, presentation, business logic, and data access
should be considered three separate tasks that are delegated each to their own components in the system. More tersely,
your ASP.NET web pages shouldn't have data access code in them - no code to connect to a database, no SQL connections, nothing.
Instead, this data access-specific code should be placed in the Data Access Layer (DAL), a separate class library
that is designed to do nothing more than act as the relay between the application and the backend data store. (For more
information and background on data access layers be sure to read Wayne Plourde's article Creating
a Data Access Layer in .NET.)
Since the data access layer does, fundamentally, one thing - communicating with the database - the code written in this layer
can quickly become repetitive. Anytime you find yourself repeating very similar blocks of code in a project you should think
encapsulation, and search for a way to group the related functionality into a general 'black box' that can then be used.
By encapsulating common functionality you'll reduce the number of lines of code in your DAL, thereby making it more readable,
maintainable, and updateable. Additionally, code reuse also leads to fewer bugs since there is less chance for typos (which can
be common when cutting and pasting large code blocks time and again) and reuse allows for a single block of code to be used
more often in more situations, thereby increasing our certainty that said code works correctly.
This article focuses on how to streamline the data access layer through encapsulating common functionality with the aid of
simple helper methods. The helper methods we'll
examine in this article are ones that I have created and used in many of my consulting projects over the past several years,
and have helped me to greatly trim down my data access layers. Read on to learn more!
Read More >
Source: 4GuysFromRolla Create and Use a Custom .config File 10 Aug 2005 00:00 GMTThis article documents how to easily create a separate custom .config file for your web application, and how to retrieve the custom configuration information using an existing framework ConfigurationSectionHandler.
Source: AspAlliance My. Internals: Examining the Visual Basic My feature 09 Aug 2005 16:54 GMTA look at the technical details behind how the My feature exposes access to .NET Framework functionality and items within a project. This article is not a primer on how to use the My feature but rather delves into how it works.
Source: MSDN A Simple Passphrase Generator 09 Aug 2005 00:00 GMTPassphrases have been receiving more and more attention as part of a strong security policy. When building secure web based applications, assigning random passphrases to new user accounts can be a bit of a challenge. In this article, we'll build a simple passphrase generator that can be used as part of a web application to set or reset user passphrases.
Source: AspAlliance