Archives for Software Dev - Page 62
Abstract Factory in C# – Equally useful for manufacturing operations (services) and products
This article assumes some familiarity with the Factory pattern. The factory concept is equally useful for creating products (ProductFactory) or for creating services (ServiceFactory). A good way to start is…
Abstract Methods versus Virtual Methods
Both (abstract methods and virtual methods) offer similar functionality – when should you use virtual methods and when should you use abstract methods? Base Functionality Driven If you want a…
Large Method Signatures (too many arguments)
The Problem A recent project of mine had me looking at C# code which had been brought over from old C/C++ code. One of the first things that struck me…
Concealing email on your website from web crawlers and spammers
Say you want to display a contact email on your website – but are worried about crawlers, spammers etc. picking it up and making your life miserable. There’s a few…
Static qualifier at a class level versus member level (in C#)
The static qualifier is available at both the class level as well as the individual member level (both fields and methods) in C#. This article discusses when to use it…
Delegates in C# – pre-lambda and post-lambda expressions
Delegates are amongst the most powerful constructs in the C# language (Full Solution Download at the end of this article). Some uses of delegates in c# include : Delaying invocation(calling)…
Why it may be getting tough(er) to be an I.T. consultant
Being an consultant in today’s world is getting harder and harder. The two biggest threats to the well being of a consultant are, for lack of a better term, ‘shady’…
The Under-Appreciated Hash Function–Illustrated using a Birthday Lookup
Overview Arrays are superfast. Simply becasue the exact location (index) of the element is provided. What if we could tie that index to the actual value of the data being…
WCF and Publish Subscribe–A Full Example: Running the Client (Subscriber)
Now that all the pieces are in place, we are ready to run our client ; The first error I encountered was: AddressAccessDeniedException: HTTP could not register URL http://+:8080/ Step…
WCF and Publish Subscribe–A Full Example: Client Code
The subscriber needs to know about the service. We will use to generate the proxy class for the subscribers to use. Step 1 : Ensure Service Loads Ok Use CRL…