by Sarthak Gupta 1109031149 EC 4-c

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

Introduction to .

NET

- By
Sarthak Gupta
1109031149
EC 4-c

What is .NET?
Microsofts vision of the future of
applications in the Internet age
Increased robustness over classic Windows
apps
New programming platform
Built for the web

.NET is a platform that runs on the


operating system

.NET
Sits on top on the OS (currently all the Windows;
Linux/Unix subset also available Mono Project)
About 20MB download

Provides language interoperability across


platforms
Strong emphasis on Web connectivity, using XML
web services to connect and share data between
smart client devices, servers, and developers/users
Platform/language independent

History

Development began in 1998


Beta 1 released Oct, 2000
Beta 2 released July, 2001
Finalized in Dec, shipping in Feb 2002
Vista ships with .NET Framework 3.0
(Runtime)

.NET Overview
Three main elements:
The Framework (CLR, FCL, ASP, WinForms)
The Products (Windows, Visual Studio, Office)
The Services (My Services)

Framework Goals
Improved reliability and integrated security.
Simplified development and deployment.
Unified API, multi-language support.

XML is the .NET Meta-Language.


All MS server products now .NET-enabled.

.NET Framework
C#

VB.NET

C++.NET

Other

Common Language Specification


Framework Class Library
ASP.NET
Web Services

Windows Forms

Web Forms

ASP.NET Application Services

Controls

Drawing

Windows Application Services

ADO.NET

XML

Threading

IO

Network

Security

Diagnostics

Etc.

Common Language Runtime


Memory Management

Common Type System

Operating System

Lifecycle Monitoring

Visual
Studio
.NET

Common Language Runtime


A runtime provides services to executing
programs
Standard C library, MFC, VB Runtime, JVM

CLR provided by .NET manages the execution of


code and provides useful services
Memory management, type system, etc.
Services exposed through programming languages
C# exposes more features of the CLR than other languages
(e.g. VB.NET

.NET Framework Class Library


Framework you can call it and it can call
you
Large class library
Over 2500 classes
Major components

Base Class: Networking, security, I/O, files, etc.


Data and XML Classes
Web Services/UI
Windows UI

Framework Libraries
Web Services
Expose application functionalities across the Internet, in the same
way as a class expose services to other classes.
Each Web service can function as an independent entity, and can
cooperate with one another.
Data described by XML.

ASP.NET
Replacement for the Active Server Technology.
Web Forms provide an easy way to write interactive Web
applications, much in the same way as normal Windows
applications.

Framework Libraries
Provides facilities to generate Windows
GUI-based client applications easily
Form-oriented
Standard GUI components
buttons, textboxes, menus, scrollbars, etc.

Event-handling

Common Language Specification


CLS is a set of rules that specifies features that all
languages should support
Goal: have the .NET framework support multiple
languages
CLS is an agreement among language designers and
class library designers about the features and usage
conventions that can be relied upon
Example: public names should not rely on case for uniqueness
since some languages are not case sensitive
This does not mean all languages are not case sensitive above
the CLR!

Some .NET Languages

C#
COBOL
Eiffel
Fortran
Mercury
Pascal
Python
SML

Perl
Smalltalk
VB.NET
VC++.NET
J#.NET
Scheme
.

More are planned or under


development

.NET vs. J2EE


Both are similar in many ways:
Server- and client-side model for building enterprise applications.
Virtual machine designed to inspect, load, and execute programs in
a controlled environment.
APIs for creating both fat- and thin-client models.
APIs for foundation services (data access, directory, remote object
calls, sockets, forms).
Development environment for dynamic web pages.

J2 Enterprise Edition
Language-Dependent & Platform-Independent

.NET
Language-Independent & Platform Dependent (for now)

J2EE: Language-Specific,
Platform- Independent
Linux

Person.java

Java VM

Person
bytecodes

Java VM
Deploy

Address
bytecodes

Windows
Java VM

Company
bytecodes

Solaris
Address.java
Company.java

Java VM

.NET: Language-Independent,
(Mostly) Platform- Specific
Person.vb

Windows

(Visual Basic)

CLR

Person
MSIL

CLR
Deploy

Address
MSIL

Windows
CLR

Company
MSIL

Others?
Address.cs

(C#)
Company.cbl

(Cobol)

CLR

.NET
.NET built into Windows; running an executable
invokes the CLR automatically instead of
explicitly invoking the JVM
Being newer, .NET added improvements such as
native XML support, new features to CLR
About 3 million C++ developers, 3-8 million VB
developers, around 1 million C# developers
Today, most development and deployment is
Windows

Do you have to use Windows?


Open source implementations of .NET
Today there exists Ximian/Novells Mono, Corel's Rotor
and the Free Software Foundation's Portable .NET projects
Rotor: the Shared Source Common Language
Infrastructure (SSCLI)
Started as Project 7 with Academic Microsoft Research
With universities and programming language researchers,
developed several languages for the CLR

Mono
Implementation of ECMA C# and CLI for Linux
http://www.mono-project.com

Common Language Runtime


The CLR is at the core of the .NET platform - the
execution engine
The CLR provides a Managed Execution Environment.
Manages the execution of code and provides services that
make development easier (like the JVM)
Code that relies on COM and the Win32 API is UnManaged Code (e.g. built with Visual Studio 6.0, VB6)
Code developed for a compiler that targets this platform is
referred to as Managed Code (e.g. code developed in
VB.NET C# allows Managed and Unmanaged)

Simple Application Deployment


Unlike COM, no plumbing code needed to
connect separate components
Components can be developed in different
programming languages

2500 classes to reuse


Automatic garbage collection
Memory is managed
Common bugs like memory leaks, buffer overruns are
not possible (if using 100% managed code)

MSIL and JIT Compilation


Source code is compiled into MSIL (Microsoft Intermediate
Language). Similar to Java bytecodes - CPU-independent instructions
MSIL allows for runtime type-safety and security, as well as portable
execution platforms.
The MSIL architecture results in apps that run in one address space thus much less OS overhead.
Compilers also produce metadata or glue that binds the code with
debuggers, browsers, etc.

Definitions of each type in your code.


Signatures of each types members.
Members that your code references.
Other runtime data for the CLR.

Summary
Next we will study C#
C# does not exist in isolation but has a close
connection with the .NET framework
.NET
CLR a relatively new, Java-like platform, but
multi-language
SrcMSILJITNative Code
.NET framework includes many class libraries

You might also like