Sie sind auf Seite 1von 33

.

NET Framework-Application Development Simplified

Rationale

With the change in technology, the approach to application


development has changed completely. Earlier, the
developers had to learn different programming languages to
develop different types of applications. This was a
complicated task.
The .NET Framework has simplified this task by providing a
common platform that enables the developers to develop
different types of applications easily and quickly.

© NIIT 1
.NET Framework-Application Development Simplified

Objective

In this session, you will learn


about the .NET Framework
and how it helps in rapid
application development.

© NIIT 2
.NET Framework-Application Development Simplified

Introducing the .NET Framework

What is the .NET


Framework?

© NIIT 3
.NET Framework-Application Development Simplified

Introducing the .NET Framework (Contd.)

The .NET Framework is a:


Language-independent software development environment.
Platform designed for developing interoperable applications.
The objective of the .NET Framework is to bring various
programming languages and services together.

© NIIT 4
.NET Framework-Application Development Simplified

Introducing the .NET Framework (Contd.)

The following figure illustrates the .NET Enterprise vision.

© NIIT 5
.NET Framework-Application Development Simplified

Introducing the .NET Framework (Contd.)

Using the .NET Framework, you can create applications


that are:
Robust: Applications that remain stable in extreme situations,
such as erroneous inputs
Scalable: Applications that can be extended
Distributed: Applications whose components run on different
computers over a network
The .NET Framework has various components.

© NIIT 6
.NET Framework-Application Development Simplified

Components of the .NET Framework

What are the components


of the .NET Framework?

© NIIT 7
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

The following figure shows the architecture of the .NET


Framework.

C++ C# VB.NET J# …

Visual Studio .NET


Common Language Specification (CLS)

Base Class Library

Common Language Runtime

© NIIT 8
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

Let us discuss the components


of the .NET Framework.

© NIIT 9
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

The CLR:
Manages code execution at run time.
Performs functions such as code compilation and garbage
collection.

Common Language Runtime

© NIIT 10
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

The Base Class Library:


Is a standard library available to all languages using the .NET
Framework.
Includes a large number of common functions, such as file
reading and writing, graphic rendering, and database
interaction.

Base Class Library

Common Language Runtime

© NIIT 11
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

Programming languages:
Any .NET supported programming language can be used.

C++ C# VB.NET J# …

Base Class Library

Common Language Runtime

© NIIT 12
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

CLS:
Is a set of rules that enables an object or application to interact
with the objects or applications of other languages.

C++ C# VB.NET J# …

Visual Studio .NET


Common Language Specification (CLS)

Base Class Library

Common Language Runtime

© NIIT 13
.NET Framework-Application Development Simplified

Components of the .NET Framework (Contd.)

Let us discuss the main


components in detail.

© NIIT 14
.NET Framework-Application Development Simplified

Common Language Runtime

Common Language Runtime (CLR):


Is the environment where all programs using .NET
technologies are executed.
Provides services such as code compilation, memory
allocation, and garbage collection for managed code, which is
represented in the form of Intermediate Language (IL).
IL:
Is a low level language that the CLR understands.
Has to be converted into machine language for execution.

© NIIT 15
.NET Framework-Application Development Simplified

Common Language Runtime (Contd.)

IL is converted
into machine
Just-In-Time language
Compiler by the
Just-In-Time
compiler

© NIIT 16
.NET Framework-Application Development Simplified

Common Language Runtime (Contd.)

CLR consists of a set of common rules known as CLS that


are followed by all the .NET Framework supported
languages.

© NIIT 17
.NET Framework-Application Development Simplified

Common Language Runtime (Contd.)

Common Language Runtime

Just-In-Time
Compiler

CLS
enables an
object or an
application
to interact
Common Language
with the
Specification
objects or
applications
of other
languages.

© NIIT 18
.NET Framework-Application Development Simplified

Common Language Runtime (Contd.)

The following figure shows the code compilation and


execution process.
Compilation Process
Known as
Source Language Code Assembly
Code Compiler IL (.EXE or
Metadata .DLL file)

Execution Process

Native
Code JIT
Compiler

© NIIT 19
.NET Framework-Application Development Simplified

Common Language Runtime (Contd.)

During execution, CLR performs the following tasks:


Assembly Loading and namespaces identification
JIT compilation
Garbage collection

© NIIT 20
.NET Framework-Application Development Simplified

Base Class Library

Let us understand the .NET


Framework Base Class Library.

© NIIT 21
.NET Framework-Application Development Simplified

Base Class Library (Contd.)

The .NET Framework Base Class Library:


Works with any .NET language, such as VB.NET, VC++ .NET,
and VC# .NET.
Provides classes that can be used in the code to accomplish a
range of common programming tasks, such as file access and
database connectivity.
Comprises namespaces, which are contained within
assemblies.

© NIIT 22
.NET Framework-Application Development Simplified

Base Class Library (Contd.)

.NET Framework Base Class Library

Namespaces are
stored in
Assembly assemblies and
help you to create
Namespace logical groups of
related classes
s
and interfaces,
which can be used
by any language
targeting the .NET
Framework.

© NIIT 23
.NET Framework-Application Development Simplified

Base Class Library (Contd.)

.NET Framework Base Class Library

An assembly is a
single deployable
unit that contains
all the information
about the
Assembly implementation of
classes,
structures, and
interfaces.

© NIIT 24
.NET Framework-Application Development Simplified

Types of Applications

The .NET Framework enables you to create the following


types of applications:
Console-based
Windows-based
Web-based

© NIIT 25
.NET Framework-Application Development Simplified

Types of Applications (Contd.)

Types of .NET Applications


Console-based
Console-
applications are
Based generally used
Application in situations
s where minimal
user interaction
Windows- is required.
Based
Application
s

Web-Based
Application
s

© NIIT 26
.NET Framework-Application Development Simplified

Types of Applications (Contd.)

Types of .NET Applications


Console-
Based
Application
s

Windows- Windows-based
Based applications are
Application created when
s user interaction
is required.

Web-Based
Application
s

© NIIT 27
.NET Framework-Application Development Simplified

Types of Applications (Contd.)

Types of .NET Applications


Console-
Based
Application
s

Windows-
Based
Application
s Web-based
applications are
created when the
Web-Based
application needs to
Application be accessed
s anywhere, anytime,
and across
platforms.

© NIIT 28
.NET Framework-Application Development Simplified

Advantages of the .NET Framework

Some advantages offered by the .NET Framework are:


Consistent programming model
Multi-platform applications
Multi-language integration
Automatic resource management
Attribute-based programming
Ease of deployment

© NIIT 29
.NET Framework-Application Development Simplified

Using Visual Studio .NET

Visual Studio .NET:


Is a development tool.
Contains the following productivity and debugging features:
Supports managed and unmanaged applications
Supports languages such as C#, C++, VB.NET, and J#
Contains many useful tools and wizards
Provides Windows Forms Designer
Provides ASP.NET Web Forms Designer
Provides Web Services support
Provides SQL Server integration with ADO.NET and XML
Provides the same tool for all languages and platforms.

© NIIT 30
.NET Framework-Application Development Simplified

Using Visual Studio .NET (Contd.)

You can use Visual Studio .NET to:


Write code.
Design user interface.
Study documentation.
Debug, test, and deploy applications.

© NIIT 31
.NET Framework-Application Development Simplified

Using Visual Studio .NET (Contd.)

The following figure shows the main elements of the Visual


Studio .NET IDE.
Menu Bar Windows Form Designer

Toolbox
Window
Solution
Explorer
Window

Properties
Window

Output
Window

© NIIT 32
.NET Framework-Application Development Simplified

Using Visual Studio .NET (Contd.)

The main elements of the Visual Studio .NET IDE are:


Windows Forms Designer window
Solution Explorer window
Properties window
Toolbox window
Output window
Code and Text Editor window

© NIIT 33

Das könnte Ihnen auch gefallen