Showing posts with label Common Language Specification (CLS). Show all posts
Showing posts with label Common Language Specification (CLS). Show all posts

Monday, April 18, 2016

Common Language Runtime Architecture

  • Class Loader: In this component the compiler of the .Net Framework compiles the source code into intermediate code and it consists of MSIL code and Metadata and they are contained in a portable executable (PE) file.
  • Code Manager: This component manages the code during execution time. It is the responsibility of the code manager to allocate memory to the objects.
  • Garbage collector: This component provides the automatic garbage collection of the object when the object is no longer in use. 
  • Security Checker: It is the most important component of CLR. The responsibility is to restrict the access to system resources such as hard disk.
  • Type Checker: This component provides the facility of data type checking of the variable. It also checks the valid operations on the corresponding data type.
Framework Class Library
The .Net Framework class library is the collection of reusable types which can be integrated with the Common Language Runtime. The class library is the object oriented. The other main component of the .Net Framework is Framework Class Library which is a standard library. It is the collection of thousands of reusable classes, interfaces and value types.

Sunday, April 17, 2016

Common Language Runtime (CLR)

The Common Language Runtime is the first main component of .Net Framework. The Common Language Runtime main features are to manage memory, thread execution, code execution, code safety verification and other services. CLR is an execution environment for the program code which is defined by CLI. Basically, CLR lies between operating systems and applications which are written in .Net languages. Some of the features of CLR are:
  • Automatic Memory Management – The CLR provides the garbage collection where the lifetime of the objects is managed by garbage collection only and it is known as managed data.
  • Platform Independence – We can build program in any language which targets the CLR, while compiling the program the compiler translates the code into an intermediate language which is CPU independent. It can be executed from any platform which supports the .Net CLR.
  • Security management – It can be achieved through code access Security model. In this, model CLR implements restrictions on managed code with the use of objects called permissions. It specifies what the code can access instead of specifying who can access the resources.
  • Language interoperability – The ability of an application to communicate with another application written in a different programming language. It helps in the reusability of code.

Thursday, April 14, 2016

Common Language Specification (CLS)

The Common Language Specification (CLS) is the set of some basic language features where .Net languages can develop the applications and services, which are compatible with the .Net Framework. If the situation arises of communicating objects which are written in different .Net Complaint languages, then those objects must expose the features that are common to all the languages.
Common Language Specification (CLS) provides the feature of complete interoperability among applications, which is regardless of the language used to create the application.
Common Language Specification (CLS) defines the subset of Common Type System (CTS) and the Common Type System (CTS) describes the set of types that can use different .Net languages are common, it ensure that objects written in different languages can communicate with each other.