Omer van Kloeten's .NET Zen

Programming is life, the rest is mere details

News

Note: This blog has moved to omervk.wordpress.com.

Omer van Kloeten's Facebook profile

Omer has been professionally developing applications over the past 8 years, both at the IDF’s IT corps and later at the Sela Technology Center, but has had the programming bug ever since he can remember himself.
As a senior developer at NuConomy, a leading web analytics and advertising startup, he leads a wide range of technologies for its flagship products.

Get Firefox


powered by Dapper 

.NET Resources

Articles :: CodeDom

Articles :: nGineer

Culture

Projects

Part II: Other Benefits Gained from the Code Document Object Model

The Code Document Object Model presents us with other benefits, except for the ones describe in part I of this article:

  1. Working with .NET is not limited to a single language and one could code in languages such as C#, VB.NET, Managed C++, JScript.NET, J#, NetCOBOL, Eiffel# and other languages that implement the CLI. Using the Code DOM gives a single representation for all of these languages. For instance, using the Code DOM, I could save my object graph to both a C# document and a VB.NET document, by altering only a few lines of code.
  2. The logical structure of a code document is not a flat one, even though its physical structure is flat. A code document contains namespaces, classes, methods, loops, etc.
    All of these code structures are contained inside one another, creating a hierarchical structure. This is the way Code DOM represents the document.
    For instance, should we take a document describing one class with one method, the object representing the method would be contained in the object representing the type, which in turn would be contained in the object representing the namespace, and so on.

Please note: The Code DOM is not a compiler. It simply represents code in an object graph. In order to check for the code's correctness, it must be sent to a compiler.

Comments

No Comments