0% found this document useful (0 votes)
9 views

Chapter-1

Uploaded by

Suseela Devi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter-1

Uploaded by

Suseela Devi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

.

NET TECHNOLOGIES (CS 406 (B))


UNIT-I

1. INTRODUCING C#

What is the .NET Framework?


 The .NET framework is a platform created by Microsoft for developing applications.it
provides tools and technologies to develop different applications.( Framework is a
collection of class libraries.)
 It is one of the most widely used S/W development environments.
 With .NET framework, Microsoft has provided a single platform for developing
application to programmers using different programming languages, such as VB, Visual
C++, VisualC#,…
 The .NET framework simplified the process of developing S/W and also reduces the
difficulty involved in building large and reliable applications.
 For utilizing the features and services offered by .NET framework, Microsoft Introduced
a development and execution S/W called Visual Studio. It is a set of tools designed to
help application developers to build complex applications and create innovative
solutions.
 It provides the necessary environment in which developers can create and execute
various types of applications, like Console, WindowsForms, Web applications and
webservices.
 .NET framework has been designed so that it can be used from any language, including
C#, C++,VB,J#, F#...
 The .NET framework consist of a library of code, we can use them using OOP techniques.
 Along with library, the .NET framework also includes the .NET Common Language
Runtime (CLR), which is responsible for maintaining the execution of all applications
developed using the .NET Library.

Versions of .NET Framework:-


First version released in 2002.
.NET Framework 1.0: It was released on 2002. It is a part of Visual Studio-2002
.NET Framework 1.1: It was released on 2003. It is a part of VS-2003. It support for Mobile
ASP.NET controls, ODBC and Oracle Data Base.
.NET Framework 2.0 :It was released on 2006. It is a part of VS-2005 and MS SQL server 2005.
It has many changes and enhancements as compared to the .NET1.1. It contains new ASP.NET
web controls and data controls.
.NET Framework 3.0 : It is the third major upgrade of the .NET framework released on 2006. It
includes 4 new technologies.
WPF - Windows Presentation Foundation
WCF - Windows Communication Foundation
WF -Workflow Foundation
WCS -Window Card space
.NET Framework 3.5 :Released on 2007. It is the fourth major upgrade of .NET framework.
Architecture of .NET Framework:

Layer 1 C#.NET VB.NET C++

Layer2 Console Window Web app


form app (ASP.Net)

frame
Layer 3 ADO.NET XML

Layer 4 BCL/FCL

CLR

O.S

 The layer1 specifies the supporting languages of .NET. .NET framework provides set of
languages. It supports 30+ languages. Here programmer has a choice of choosing
programming language based on his choice.
 The Layer 2 specifies types of applications. It allows the developers to create and
execute various types of applications such as console, windows forms, WPF applications,
Web applications and web services.
 ADO.NET acts as mediator between front end and back end of an application. By using
this store data permanently on data base.
 BCL/ FCL: (Base Class Library/ Framework Class Library)
BCL

Predefined Class Library User Defined Class Library

Predefined Class libraries also called as namespace.


Namespace is a collection of predefined classes and methods. i.e. it contains group of related
classes, interfaces, structures and enumerations that can be used by .NET application.
Ex: System namespace is the root namespace for commonly used Types (Data Types) in
the .NET framework. Namespace is further broken down into other namespaces.
System. Datacontains the functionality for accessing data base.
System.Data.Sqlclient: which provides functionality required to work with SQL server Data
base.
Some important classes of System namespace are Console, Math, Object, String, Array, and
Enumeration.
User defined Class Library also called an assembly.
Assembly: A small unit of development. The programmer is going to create the assembly,
contains classes and methods. It contains either DLL or exe extension.
CLR (Common Language Runtime):
CLR is also known as Runtime. It is the runtime execution engine of the .NET. It acts as interface
between .NET application and Operating System. It provides many features.
CLR is heart and soul of .NET application. Without CLR we cannot execute .NET applications.
COMPONENTS OF .NET FRAMEWORK:
 CLR ( Common Language Runtime)
 CTS ( Common Type System )
 CLS( Common Language Specification)
 Garbage Collection
 JIT Compiler(Just In Time)
 .NET Framework Class Library.
 Assemblies
 Managed Code
 CLR: One of the most common components is CLR known as runtime. It provides
functionalities such as memory management, exception handling, debugging, security,
thread execution, code execution, verification, and compilation.
 It converts intermediate code into native code.
 It manages the execution of the .NET code.
 The CLR facilitates interoperability between different .NET languages, such as VC#, VB,
VC++... by providing a common environment for the execution of the code written in any
of the language.
 CLR has 4 main components. 1) CLS 2)CTS 3)JIT 4)Garbage Collection
 CLS: It provides responsible for converting the different .NET programming language
syntactical rules into CLR understandable format. It provides language interoperability.
 Interoperability is achieved in 2 ways i) Managed Code ii) Un Managed code
 Managed Code The MSIL(Micro soft Intermediate Code) which is managed by the CLR is
known as the Managed Code. For managed code CLR provides different services. i.e.
security, exception handling, automatic memory management.
 Un Managed Code: Before, NET development, the programming languages like C, C++, VB
not generate the MSIL code, so these are not managed by the CLR rather managed by O.S.
 CTS: Every programming language has its own data type system. So, CTS is responsible for
understanding all the data type systems of .NET programming languages and converting
them into CLR understandable format, which will be common format.
 CTS is a integrated part of CLR, through which the .NET framework provides support for
multiple languages because it contains a type system that is common for all programming
languages.
 JIT Compiler (Just In Time)When we run a .NET Application, the language compiler first
compiles the source code into an intermediate code called Micro Soft Intermediate
Code(MSIL) also called as CIL( Common Intermediate Language).
 The MSIL code is then used by the JIT compiler to convert the MSIL code into native
machine code, which is the final executable code.

 Garbage Collection:is one of the most important features of managed code is the concept
of garbage collection. It is used to provide the automatic memory management feature.
 Garbage collection is a method of making sure that the memory used by an application is
freed up completely when the application is no longer in use.
 Prior to .NET this was the responsibility of Programmers. .NET garbage Collector works
periodically by inspecting the memory of your computer and removing anything from it
that is no longer needed.
 Assemblies: When we compile an application, the MSIL code is stored in an assembly. it
includes both executable application files that we can run directly from windows without
the need for any other programs. These have extension .exe file. And libraries which have
.dll extension for used by other application.
 In .NET, every application is compiled into an assembly which refers to a portable
executable (PE) file.
 The PE file can be either dynamic link library (DLL) or an executable (.exe) that contains
the MSIL code of the compiled application.
 In addition to the MSIL, assembly also includes files and resources that are necessary for
application also known as metadata.
 Meta information enables assemblies to be full self-descriptive.
 At runtime, the CLR load the metadata into memory and finds information about the
Code's Classes, members and so on.

What are the steps required to create .NET Application:


1. App Code is written using a .NET compatible language such as C# .

2. That code is compiled into CIL /MSIL , which is stored in an assembly.

3. When this code is executed , it must first be compiled in to native code using a JIT Compiler
4. The native code is executed in the context of the managed CLR , along with other running
applications.

Linking: The C# code that compiles into CIL need not be contained in a single file. It's possible
to split application code across multiple source code files, which are then compiled together
into a single assembly. This process is known as linking.

What is C#?
1. It is one of the language can use to create the application that will run into .NET CLR
2. It is created by Micro Soft specially to work with .NET platform.
3. Developing application using C# is simpler than using C++, because the syntax is simpler.
Applications can be written With C#
1. Console Applications
2. Window Applications
3. Web Applications and
4. Web Services

You might also like