You are on page 1of 28

.

Net Framework
 A programming infrastructure created by Microsoft
for building, deploying, and running applications and
services that use .NET technologies, such as desktop
applications and Web services.
 .NET framework is a foundation class on which you can
build robust applications .This framework comprises of
web forms, window forms and console applications. .NET
framework is basically a collection of services and
classes.
 This exists as a layer between .NET applications and
underlying operating systems.
The Core of .NET Framework:
FCL & CLR
 Common Language Runtime
 Garbage collection
 Language integration
 Multiple versioning support (no
more DLL hell!)
 Integrated security
 Framework Class Library
 Provides the core functionality:
ASP.NET, Web Services, ADO.NET,
Windows Forms, IO, XML, etc.
.NET Framework
Common Language Runtime
 CLR manages code execution at
runtime
 Memory management, thread
management, etc.

Common Language Runtime

Operating System
.NET Framework
Base Class Library
 Object-oriented collection of reusable
types
 Collections, I/O, Strings, …

.NET Framework (Base Class Library)

Common Language Runtime

Operating System
.NET Framework
Data Access Layer
 Access relational databases
 Disconnected data model
 Work with XML

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System
.NET Framework
ASP.NET & Windows Forms
Create application’s front-end –
Web-based user interface, Windows
GUI, Web services, …

ASP .NET Windows


Web Forms Web Services
Forms
Mobile Internet Toolkit

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System
.NET Framework
Programming Languages
 Use your favorite language

C++ C# VB.NET Perl J# …


ASP .NET Windows
Web Forms Web Services
Forms
Mobile Internet Toolkit

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System
.NET Framework
Common Language Specification

C++ Common
C# VBLanguage
Perl Specification
J# …
ASP .NET Windows
Web Forms Web Services
Forms
Mobile Internet Toolkit

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System
.NET Framework
Visual Studio .NET
C++ C# VB Perl J# …

Common Language Specification

Visual Studio .NET


ASP .NET Windows
Web Forms Web Services
Forms
Mobile Internet Toolkit

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System
.Net Runtime
 Source File C++ C# Visual Basic VJ#

 Compilers
Compiler Compiler Compiler Compiler

 Binaries
Common Language Specification (CLS)

 Runtime
Common Language Runtime (CLR)
Common Type System:
 All .NET languages have the same
primitive data types. An int in C# is the
same as an int in VB.NET
 When communicating between modules
written in any .NET language, the types
are guaranteed to be compatible on the
binary level
 Types can be:
 Value types – passed by value, stored in the
stack
 Reference types – passed by reference,
stored in the heap
 Strings are a primitive data type now
Common Language
Specification (CLS)
 Any language that conforms to the CLS is a
.NET language
 A language that conforms to the CLS has the
ability to take full advantage of the
Framework Class Library (FCL)
 CLS is standardized by ECMA
Introduction to C#
The first component oriented language in the
C/C++ family
Everything really is an object
Next generation robust and durable software
Visual Studio .NET
Development tool that contains a rich set of
productivity and debugging features
Supports managed and unmanaged applications
Supports C#, C++, VB.NET, …
Many useful tools and wizards
Windows Forms Designer
ASP.NET Web Forms Designer
Web Services support
SQL Server integration with ADO.NET and XML
VS.NET is not part of the .NET Framework
Not necessary to build or run managed code
The .NET Framework SDK includes command line
compilers
VS.NET – Single
Development Environment &
Skill Set
From Visual Studio.NET you can:
Write code
Design user interface
Study documentation
Debug
Test
Deploy
Same tools for all languages
Same tools for all platforms
Component Oriented
Language:
C# is the first “component oriented” language in
the C/C++ family
Component concepts are first class:
Properties, methods, events
Design-time and run-time attributes
Integrated documentation using XML
Enables one-stop programming
No header files, IDL, etc.
Can be embedded in web pages
Compilation And Execution
Compilation

Source Language Code (IL)


Compiler
Assembly
Code Metadata

Native Code JIT Compiler

Execution
Assemblies
 DLL or EXE file
 Smallest deployable unit in the CLR
 Have unique version number
 No version conflicts (known as DLL hell)
 Contains IL code to be executed
 Security boundary – permissions are
granted at the assembly level
 Type boundary – all types include the
assembly name they are a part of
 Self-describing manifest – metadata that
describes the types in the assembly
Metadata in
Assembly
Type Descriptions
Classes
Base classes
classes
Implemented
Implemented interfaces
interfaces
Data members
members
Methods
Methods
Assembly Description
Name
Version
Version
Culture
Other
Other assemblies
assemblies
Security
Security Permissions
Permissions
Exported
Exported Types
Types
How to Start

How to Start:
 Creation of a New Project
 Compilation

 Run the Application

 Output
Creation of New Project:
Creation of a new
project:
Creation of a new project:
Creation of a new project:
Building/Compiling a project:
Executing/Running a project:
Output of a project: