Techmentor

Techmentor
Techmentor

Wednesday, January 18, 2006

.NET Internals ...

.NET Framework:
The .NET framework allows objects, classes, and functions created in multiple programming languages the ability to communicate effectively amongst themselves. During code compilation within the .NET framework, source code is converted into MSIL (Microsoft Intermediate Language). MSIL, or IL, is the common language created that the CLR (Common Language Runtime) can read and understand. Once .NET code is compiled into the intermediate language (MSIL, IL), objects written in Visual Basic .NET may reference or inherit functionality from objects written in Visual C# .NET, managed Visual C++, or any other .NET language.

For each source code compiler (VB.NET, C#.NET, etc.), there is a minimum set of coding standards that must be met. The mininum set of coding standards that must be met to compile .NET code into MSIL code is known as CLS - Common Language Specification. The role of the Common Language Specification is to ensure that all generated code (MSIL) that meets the minimum set of coding standards can operate successfully within the .NET framework. THE CTS (Common Type System) handles conversion of programming-language data types into .NET compatible (MSIL) data types. The implicit benefit of the CTS is the reduction of development time when attempting to coordinate data types between two sets of different programming-language code.

Assembly and Assembly Manifest
The assembly is made up of code, metadata, and resources. The assembly manifest is a provider of information about the assembly. The information provided by the assembly manifest includes: assembly name, version number, identity information, types exposed by the assembly, list of other required assemblies, and a list of access security instructions and permissions regarding the assembly. The assembly manifest can be contained in its own file or within one of the assembly's modules. Each module can contain any number of combinations of two types: reference types (classes) and value types (structures). Type information is stored in the assembly manifest. Types can contain fields, properties and methods. A field represents storage of a particular type of data. A phone number can be stored to a field. Properties are very similiar to fields, but usually provide validation when data is set or retrieved. When an attempt to add or update a telephone number is made, validation to verify the telephone number has the proper number of characters may occur. Methods represent behavior. Continuing with the telephone example, you might have a Call method that communicates with a telephone and passes the telephone number as a parameter.

Compilation and Execution
A .NET application is not compiled to binary. As previously discussed, the .NET application code is compiled to MSIL. At least one of the MSIL assemblies will contain an executable that is designated as the application entry point. When execution begins, the first assembly is loaded and the CLR examines the assembly manifest and determines the program requirements. After a successful security permission check, the CLR will execute the code. During this period, a process for the application is created and application execution begins. When execution starts, the first bit of code that needs to be executed is loaded into memory and compiled into native binary code from IL by the CLR's Just-in-Time (JIT) compiler. Once compiled, the code is executed and stored in memory as native code. When program execution begins executing code that has not run, the JIT compiler compiles it ahead of execution and stores it in memory as binary code. Application performance is maximized because parts of a program that are executed are compiled.

Friday, January 13, 2006

Dynamic Frames using javascript....

For the past two days i was having a problem for a component to dynamically load the page in the specified frame and if the frame is not specified it has to be loaded in the default frame.

One of my friend and colleague Ramesh said, he will try for me as i was not an expert in javascript.

Today morning also i was a bit disappointed as it could be merely a single line answer but it breaked my head like anything.

At last i roled out my sleeves and thought of exploring myself very patiently and i got a real self confidence after reading an article in the internet about achievement. Atlast i found the answer today and it was really simple.

Solution
---------
The document object has frames collection which cane be used to point out the required frame


document.frames[].location.href = URL

here the frameName can be passed as both Name and index.
Name refers to the name of the target frame
index referes to the index in the specified order of the frameset.

so i just passed the required frame which i have stored in the database which is another BIG story!

Thats all folks!

Thank you ramesh for you try!


shiva

Sunday, January 01, 2006

Happy Dazzling New Year 2006!


Dear Bloggers,


WISH YOU ALL A VERY HAPPY AND PROSPEROUS NEW YEAR 2006!


love,
shiva