My Profile

Showing posts with label .Net Framework. Show all posts
Showing posts with label .Net Framework. Show all posts

Wednesday, January 19, 2011

Concerns and Criticisms related to .Net





1. Applications running in a managed environment such as Microsoft's Frameworks CLR or JAVA's JVM tend to require more system resources than similar applications that access machine resources more directly (Unmanaged).


       Some applications however have been shown to perform better in .net than in their native version. this could be due to  runtime optimizations made possible in Just -In-Time compilation of managed code or other aspects of the CLR like  Garbage Collection.




2. As JIT languages can be more easily reverse-engineered than native code to algorithms used by an application so, there is concern over possible loss of trade secrets. 


      Many obfuscation techniques already developed however can help to prevent this; indeed from Microsoft's .Net 2.0 these tools were included.




3. In a managed environment such as the Microsoft's Framework's CLR or Java's JVM the regularly occurring garbage collection for reclaiming memory suspends execution of the application for an unpredictable lapse of time typically not more than few milliseconds.




4. Since the framework is not pre-installed on older versions of Windows, an application that requires it must verify that it is present and if it is not guide the user to install it.




5. Newer versions of the framework (3.0 and up) are not pre-installed on any version of the Windows operating system because some developers have expressed concerns about the large size.



----------------------------------------------------------

** If you like this post please like our page in facebook

Tuesday, January 18, 2011

Component Object Model

Component Object Model (COM) :


It was a specification form Microsoft, which advices never build a software as a monolithic unit, inspite it advices of building the software by dividing into smaller units and then integrate as a software which provides advantages like 



  •      Software maintainance becomes easier.
  •      Reusability. 


fig: COM





Note: The smaller units what we were using are known as COM components or Libraries.


The drawback of these COM components was they were pure Windows operating system specific or platform dependent.


----------------------------------------------------------

** If you like this post please like our page in facebook

Features of .Net

1. Language Independence :


The .Net framework introduces CTS & CLS, where CTS specification defines all possible data types and programming constructs supported by CLR and they interact with each other. Because of this feature the .Net framework supports exchange of instances of types between programs written in any of the .Net languages.




2. Base Class Library :


The BCL, part of FCL is a library of functionalities available to all languages using .net Framework. BCL provides classes which encapsulate a number of common functionalities.




3. Portability :


The design of .Net framework allows it to theoretically be platform independent and cross-platform compatible i.e., a program written to use the framework should run without change on any type of system for which the framework is implemented.


Microsoft's implementation of the framework covers only windows, in addition  it submits the specification for CLI which includes the core class libraries, CTS and CLS to both ECMA and ISO making them available as open standards, this makes it possible for third-parties to create compatible implementations of the framework to other platforms.




4. Simplified Deployment :


Installation of computer software must be carefully managed to ensure that it doesn't interfere with previously installed softwares and it confirms to stringent security requirements. The .Net framework includes design features and tools like setup & deployment that helps address these problems.




5. Common Runtime Engine :


Programming languages on the .net framework compiled into intermediate code known as CIL. In Microsoft's implementation this IL code is compiled in a manner known as Just-In-Time compilation into native code.


The JIT compiler is however responsible for converting IL code into native code and in this process it implements few optimization techniques like--



  •     Conversion gradually during the programs execution.
  •     Conversion of only necessary code.
  •     Storing of native code under volatile memory for next time use.

6. Memory Management :

It is the act of managing computer memory in its simple forms, this involves providing ways to allocate portions of memory to programs at their request and freeing it for reuse when no longer needed.

Management of main memory is critical to the computer system. In this process it uses garbage collection which is automated allocation and deallocation of computer memory resources for a program. This is generally implemented at programming language level and is in opposition to manual memory management. The explicit allocation and deallocation of computer memory resources.

In computer science, garbage collector (GC) is a form of automatic memory management. the garbage collector or "Just Collector" attempts to reclaim garbage or memory used by objects that will never be accessed again by the application. 

GC was invented by Jhon McCarthy around 1959 to solve the problems of manual memory management.


7. COM Interoperability :

Because interaction between new and older applications is commonly required, .Net framework provides means to access functionalities i.e., implemented in programs that execute outside the .Net environment. In this process it provides access to COM components in the "System.Runtime.InteropServices" and "System.EnterpriceServices" of the framework.

fig: Interoperability






Runtime Callable Wrapper (RCW) :

It exposes COM interfaces as a .Net interface to .Net applications.


COM Callable Wrapper (CCW) :

It exposes .Net interfaces as a COM interface to COM applications.




---------------------------------------------------------

** If you like this post please like our page in facebook

Framework Architecture

fig: Framework Architecture






1. Common Language Runtime (CLR) :

CLR is the core component in the framework which is responsible in conversion of IL code into Machine code according to the operating system.


2. Base Class Libraries (BCL) :

Base class libraries are the set of libraries that are given common for all the .Net languages.


3. ADO.Net :

ADO.Net is a technology which is used for communication with databases from .net applications.


4.ASP.Net :

ASP.Net is a technology which is used in the development of web-applications.


5. WIN Forms :

WIN Forms is the technology used in development of Graphical User Interfaces.


6. Windows Presentation Foundation (WPF) :

WPF is also same as WIN Forms i.e., used in the development of GUI Applications with support for graphics, animations, 2D, 3D images which are not available in WIN Forms.


7. Windows Communication Foundation (WCF) :

WCF is used in the development of distributed applications.


8. Windows Workflow Foundation (WF) :


9. Language Integrated Query (LINQ) :

LINQ is also used for communication with databases similar to ADO.Net where as LINQ provides Rapid Application Development (RAD).


10. ADO.Net Entity Framework :

ADO.Net Entity Framework is an extension for ADO.Net which can also be used for database communication.  


----------------------------------------------------------

** If you like this post please like our page in facebook

.Net Framework

.Net Framework

The development of .Net has been started by Microsoft with the development of framework only in the late 90's originally under the name NGWS (Next Generation Windows Services).

To develop the framework first a set of specifications were prepared known as CLI (Common Language Infrastructure) specifications.

CLI spec's are standardized under ISO (International Standards Organization) and ECMA (European Manufacturers Association) making them as open specifications giving a chance for every one to develop the framework.


The CLI Spec's focuses on four major things


  •    CLS (Common Language Specification).  
  •    CTS (Common Type System).
  •    BCL (Base Class Library).
  •    VES (Virtual Execution System).

-----------------------------------------------------------

1. CLS :

     A set of base rules which all the .Net languages has to adopt to interoperate with each other. i.e., after compilation all high level languages has to generate the same type of IL code.



fig: CLS




2.CTS:

    According to this, the types that are present in all the .Net languages adopts the same structure. i.e., uniform sizes in every language.

As every .Net language is derived from an existing language, the names of the types in each language were also taken from the language from which it was derived. because of this, names of the types in each .Net languages will be different but sizes are same.

But, a type used in a language after compilation gets converted into IL type.


As, language interoperability is possible in .net languages, a type used in a language after compilation gets converted to IL type and presented to the other languages in other language understandable format.





fig: CTS



Note: CLS and CTS are foundation for language interoperability which is possible in .Net languages.


3. BCL:
   A library is a set of predefined functionalities that can be used commonly in the language. All languages provide libraries but specific to that language only like C++ libraries specific for C++, Java libraries specific for Java etc.,

Microsoft has designed libraries for its .net languages also but not separate for each language, for all the languages it has provided a single set of libraries known as Base Class Libraries that can be consumed from any .Net language.




fig: BCL



FCL:  (Framework Class Library)

   FCL is a comprehensive set of library functionalities which are available for .Net applications to execute. In it a set of libraries were provided for consumption  known as BCL.



4. VES:

  All higher level .Net languages after compilation gets converted to CIL code which can be carried and executed on any machine provided an OS specific VES is available which takes the responsibility of converting IL code into machine code according to the OS and hardware.



fig: VES



  
Note: VES will provide platform independency in .Net

As the CIL spec's we discussed above are open, Microsoft has provided the implementation of the framework for windows OS only and a third party vendor "MONO" has implemented the frameworks for few other OS like Unix,Linux,Sun-Solaris,Mac OS etc.,


***  .Net was theoritically platform independent as the spec's tells CIL code can run on any machine to which the framework is available, but practically implementation is given only for few machines we discussed above.


Framework Versions

In the year 2000, the first version of .Net Framework was launched as 1.0 Beta1 (trail version) and again in 2002 1.0 Beta2 was launched and finally in 2002 it was officially launched as 1.0 RTM (Released for manufacturer).

Version                   Release date

1.0                         2002
1.1                         2003
2.0                         2005
3.0                         2006
3.5                         2007
4.0                         2009



----------------------------------------------------------

** If you like this post please like our page in facebook

Platform Independency

Platform Independency :

In this approach, whenever the source code is compiled, it generates intermediate code (semi finished) intermediate code is not prepared targeting any Operating System. It is prepared targeting a special software which will take the responsibility of converting the intermediate code or semi finished code into machine code(Finished Code) fro execution.

Platform independency was provided  under Java and .Net languages also.

Platform Independency in Java 

Source Code ----> Compiled ----> Byte Code

Byte Code ----> JVM ----> Machine Code

In case of Java, the semi finished/intermediate code is known  as "byte code" and the software responsible in converting byte code to machine code is "JVM"(Java Virtual Machine).




fig: Platform Independency in Java

Note: JVM is dependent on the operating system, where we require a separate JVM for each operating system.


Platform Independency in .Net

Source Code ----> Compiled ----> CIL Code (MSIL)

CIL Code ----> CLR ----> Machine Code


The intermediate code which is generated after compilation of .net languages source code is known as CIL code (Common Intermediate Language) traditionally known as MSIL (Microsoft Intermediate language).

Here CLR (Common language Runtime) is the software which converts CIL code into machine code.



fig: Platform Independency in .Net Languages

Note : CLR is also dependent on the operating system just like JVM.

**Except CIL & Byte Code everything is OS dependent.


Compilation & Execution in .Net Languages



fig: Compilation & Execution of .Net Languages


.Net was a collection of languages giving a flexibility for the programmer to choose a language according thier choice.

So, a .Net application can be developed in any of the languages available. But to compile the code we require a compiler separate for each language and after compilation all compilers will generate the same IL code. that is why it was known as Common IL code.

This IL code is taken by the CLR to convert into machine code.

----------------------------------------------------------

** If you like this post please like our page in facebook

Monday, January 17, 2011

Framework

As discussed earlier, in platform independent languages intermediate code depends on a software for execution (JVM,CLR) where these softwares are refferd as frameworks.


"It is a software which will mask the functionalities of an operating system and makes the code to execute unter its control."


Executing the code under framework gives the following advantages


     -- Platform Independency.


     -- Security.


     -- Automated Memory Management.


Note: The code which runs directly under frameworks control is known as Managed Code.
where as, the code which runs outside the framework control is known as Unmanaged Code.


fig: Framework




----------------------------------------------------------

** If you like this post please like our page in facebook

.Net Introduction

.Net Introduction


* It stands for Network Enabled Technologies.


* It was a system which can be used in the development of any kind of applications like


            -- Desktop Applications
                    -- CUI  (Character User Interface)
                    -- GUI  (Graphical User Interface)
            -- Web Applications
            -- Mobile Applications


* .Net provides various things under it like
            
            -- Languages (C#.Net, VB.Net, J#.Net, VCPP etc.,)
            -- Technologies (ASP.Net, ADO.Net etc.,)
            -- Servers (SQL SERVER, IIS, Share Point Portal Server, Biztalk Server etc.,)




* Microsoft introduced .Net for few reasons like
     
             -- To overcome the drawbacks of its own traditional technology "COM" (Component Object Model).


             -- To compete with Java.



----------------------------------------------------------

** If you like this post please like our page in facebook

Language Interoperability or Language Independency

As all .Net languages after compilation generates the same CIL code, the IL code generated from one language can be consumed in any .Net language i.e., reusability was available across all the . Net languages. 

C# .Net ----> CIL code ----> consume in any .Net language

VB .Net ----> CIL code ----> consume in any .Net language

J# .Net ----> CIL code ----> consume in any .Net language



----------------------------------------------------------

** If you like this post please like our page in facebook

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More