Difference between HTML 4 and HTML 5

HTML (Hypertext Markup Language) is actually used as a common language to instruct the browsers on how to logically structure a web page through its own syntax and semantics..

So What is HTML 5 or what is the difference between HTML 4 and HTML 5 ?

HTML 5 is nothing but a revised higher version of existing HTML 4 (HTML Version 4) with some addition of elements and semantics to it so that we can directly accomplish some of the tasks which we were doing through some work around in HTML 4.

For example, if you to display a video, you would be using DIV tags in the older HTML and specify a href target and browser never know that you are intending to display a video and thus for displaying a video preview, you may depend on add-ons or some JavaScript based hacks or flash. [More]

MEF... (Managed Extensibility Framework)

MEF is now a part of .Net 4.0,

MEF was around the corner for nearly some time now and it was available as one of the open source framework in Microsoft’s open source community. (http://codeplex.com/mef ). Now with lot of modifications and a finishing touch, it has been added as a new feature in Microsoft .Net 4.0. (Packed with Visual studio 2010)

So what is MEF or Managed Extensibility Framework? What is it actual use?

To answer, Managed Extensibility Framework (MEF) is a new library in .NET Framework 4 and Silverlight 4 that addresses the design problem of extensibility to some extend by allowing application to discover and use MEF extensions without using any configuration files. Here the application receiving extensions also should be MEF compatible and it will search for the MEF extensions on a particular path which is again declared inside the main application by any of the following ways [More]

String Interning in .net

We all know that the way .net handles a string is not optimal and uses up lot of memory, thought there are reason to do like this. But if we have more string objects or comparison inside our assembly then in this case surely it is going to be a performance hit. But here what really happens is framework itself take cares at least some part of it using the concept of Sting Interning

It seems that there is an internal hashtable maintained with the actual string value and it’s reference to managed heap. And two methods help us to handle this hash table

This is the “Intern” and “IsInterned” methods which is part of string manipulation class. [More]

A Generic and Dynamic way to invoke remote WCF/Webservice Web Method

I have written an article long back on Dynamic Web service Invoke and Code for dynamically generating web proxy. Any way that was not efficient to the core and hence I have re-written then code to satisfy both the conditions. The advantage of the below C# source code is that you don’t have to create proxy of any kind while using the below code (using SVCutil or WSDL). You can send a SOAP payload as it is, with whatever parameter contents it may have thus making it very easy to dynamically call a particular remote WCF/web method.

A SOAP payload is nothing but the XML serialized format of your data contract along with the standard SOAP header and footers added.

The Soapaction which you have passed determines the remote web method name which you want to invoke and SOAPAction should be exactly same as it appears in the WSDL of that particular webservice. and that should be enough to attache and invoke the remote web method. [More]

Get notified when garbage collections happens

This is a code snippet which i got from Jeffrey Richters blog. This code offers a way to raise notification event when a garbage collection occurs on Generation 0 or Generation 2 object

Here is the code for the class:

public static class GCNotification {
private static Action sgcDone = null; // The event’s field
public static event Action GCDone {
add {
// If there were no registered delegates before, start reporting notifications now
if (s
gcDone == null) { new GenObject(0); new GenObject(2); }
sgcDone += value;
remove { s
gcDone -= value; } [More]