Browse by Tags
All Tags »
.NET (
RSS)
Sorry, but there are no more tags available to filter with.
MSMQ simply provides wonderful capabilities when it comes to building asynchronous messaging based applications. You typically run into situations where two applications exchange messages through a queue – one application sends messages to a known...
Chain of Responsibility basically involves “chaining” a set of objects between a sender and receiver, where each object in the chain does some processing on the message that is sent between the sender and the receiver. In the .NET Framework...
I have come across several business and data access layer components which have method overloads taking in SqlTransaction (or IDbTransaction) references. The need here is to facilitate ADO.NET manual transactions, where database operations scattered across...
[Problem]: Many a times, you end up using large string constants (usually placed in text files) in your application code. Typical examples are XSLT templates, SQL scripts and so on. It doesn’t really look nice to have a string constant defined in...
Strategy is a quite frequently used pattern. Strategy pattern involves "d efining a family of algorithms, encapsulating each one, and making them interchangeable. Strategy lets the algorithm vary independently from clients that use it." Essentially strategy...
Of late, I am getting more and more interested in Design Patterns. As Allan Shalloway, in his most excellent book, Design Patterns Explained explains, design patterns are a great way to understand Object Oriented Programming better. Though design patterns...
I was working with SoapExtension s and my project involved a lot of reading and writing to streams (Yes, in the ProcessMessage method of the SoapExtension). I came across this good article by Jon Skeet which explains the reading of binary data from the...
I have always been awed by the concept of Interception and Aspect Oriented Programming (AOP), especially after having seen and used COM+ Services. In very, very simple terms, AOP is about taking concerns or common aspects in the code (like Concurrency...
I think it is a fairly common requirement to develop applications such that only a single instance runs at a time. This is where Mutexes, an inter-process thread synchronization primitive comes into picture. This is one good example where no other WaitHandle...
I always remember doing painful string manipulations on a file path string, either to extract the drive, the file name or the extension bits from the string in VB6. Things are definitely better in .NET. The System.IO.Path class basically abstracts the...
I would like to admit that I have, many a times, taken XML handling for granted and have come with ghastly pieces of code like the one shown below, where all I need is to find out the number of nodes in an Xml document. What I am doing here, is loading...
Often, in exception handling, we would need to re-throw an exception caught in the catch block, after doing some operation (logging the exception, for instance). But, we generally make the mistake of providing the exception argument in the throw expression...
It is more than a common requirement to be able to start another process from executing code. For instance, you might want to execute a batch file, run a command line utility of sorts, and so on. This is facilitated in the BCL through System.Diagnostics...
Many a times in your application, you would want to have a security scheme which would ensure that your code is not referenced and misused by other assemblies. For instance, there might be public types representing custom Identities and Principals which...
We all know that types, including interfaces can have a default property. Default properties are used as a short-hand notation for accessing items in an array/collection of objects contained within the object. For e.g. Item is the default property of...
Often, it may be necessary to inspect whether a particular assembly was compiled with a Debug configuration (or Release configuration). For instance, you might want to run a tool of sorts on a build folder to ensure that all assemblies are compiled in...
More often than not, we end up concatenating strings in our application code, and a bit aggressively. Sometimes, these concatenations can get a ugly, resulting into a mire of single quotes, double quotes and escape sequences. A simple case of not-so lucid...
We generally don’t talk about .NET and J2EE together unless, it's a heated debate as to which is better and why. Recently, I came across two very interesting tools which, sort of glues the otherwise mutually exclusive worlds together. The first...
Many a times, it would be necessary to share some common information/data between methods that form a call chain. For example, consider a call chain like the one shown below: A(); --> B() --> C() --> D(); And lets say B,C and D need to access...
I came across this old, but excellent MSDN TV presentation, by Don Box, on ways of using XML API or passing XML data around within an Appdomain. The presentation starts off by discussing pros and cons of passing XML in the form of XmlNode and XmlReader...
More Posts
Next page »