Embed
Email

The .NET Framework

Document Sample

Shared by: niusheng11
Categories
Tags
Stats
views:
4
posted:
12/4/2011
language:
English
pages:
14
INT422









INT422 – Internet III –

Web Programming on Windows





Additional detail –

The .NET Framework

INT422









What is .NET?

INT422





What is .NET?



• .NET is not one single thing, but a term attached

to a number of related technologies

– A Common Language Specification (Visual Basic.NET,

C#, C++.NET, Cobol, Scheme, plus 20 others)

– A Common Language Runtime (CLR) for managed code

– A Common Type System and Class Framework

– A Platform for Deploying and Running Applications, be

they Windows Apps, Web Applications, etc.

– An architecture for building Web Services

– The adoption of a collection of industry standards

including: HTTP, XML, SOAP, UDDI, WSDL, etc.







Week 1 INT422 3

INT422





What’s in the Base Class Library?



• One of the most important aspects of .NET is the

.NET Framework, or Base Class Library

• All the of the types available to a .NET language

are defined in the base classes, including types

like Integer, String, etc.

– It doesn’t matter whether you program in VB.NET, C#

or C++.NET, they can all do the same things because

they all have access to the same types/classes

• The base classes provide an OOP interface to the

underlying OS services and functions.







Week 1 INT422 4

INT422





Base Class Library…con’t



• Because there are so many, the base classes are

divided into Namespaces, for example:

System System.Web

System.Net.Mail System.Data

System.XML System.Net.Sockets

• The most important class in .NET is

System.Object. Every other type in .NET is

derived from System.Object. Even an Integer is

derived from System.Object. As a result, .NET is

completely Object Oriented.







Week 1 INT422 5

INT422





.NET Framework – configuration



• Does it need active configuration?

– Simple answer – “no”





• Where is it on your system?

– Part of it is in Program Files

– Part of it is in %WINDIR%





• Does it need any maintenance?

– Run Windows Update periodically (as administrator)

– If there are updates, they will be found there







Week 1 INT422 6

INT422





.NET Framework – configuration



• Is the .NET Framework safe to install?

– It installs “side-by-side” with existing Windows

technologies

– Its installation will not break any legacy software and

systems





• Does the .NET Framework run as a Windows

Service?

– No - .NET Framework components are benign until a

.NET application accesses its functionality – only then

are components loaded and executed







Week 1 INT422 7

INT422





How does a .NET Program Differ?



• First, .NET programs are not compiled to native

machine code. Instead, your programs get

compiled to MSIL (Microsoft Intermediate

Language) or just IL for short

• IL must be run inside a kind of virtual machine

called the Common Language Runtime (CLR).

The CLR manages memory, threads, etc. and

sits between your program and the OS.

• Unlike Java programs, .NET applications are

never interpreted. Instead, the CLR compiles

the IL to native machine code.



Week 1 INT422 8

INT422





.NET Programs…con’t



• The CLR also provides security for the computer

executing a .NET program, both in terms of code

isolation and in limiting what programs can do

through security contexts



• Therefore, in order for a user to run a .NET

program, they must have the .NET Framework

installed

– Exception – You can create an ASP.NET Web

Application that can be used by any user in the world

running a browser (IE, Netscape, Mozilla, etc.)





Week 1 INT422 9

INT422





Anatomy of a .NET Application





Web Web Windows

App Service App



.NET Framework Class Library



Common Language Runtime (CLR)







Windows





Week 1 INT422 10

INT422





.NET Programs…continued



• Finally, a .NET program is different from a

standard Windows program in that it doesn’t

need to be registered to be run.

• To install a .NET program, copy it to your

computer. To uninstall, delete the files. That’s it.

• .NET programs are distributed in Assemblies,

which can be DLLs or EXEs, and contain one or

many files. The Assembly contains both the

compiled IL code and Metadata, which describes

every class in your code and how they are used.

Nothing goes in the Registry as a result.



Week 1 INT422 11

INT422





What is a .NET Language?



• First, it is a purely Object Oriented language

• All the types available to a .NET language are

defined in the .NET Base Class Library

• As a result what can be done in one .NET

language can be done in another.

• Also a compiled class/library written in one

language can be used by another language with

no changes. Since programs are compiled to

Assemblies which are self-describing, they can

be plugged into another language with ease.





Week 1 INT422 12

INT422





Development Flow



C# Visual Basic.NET C++.NET

Code Code Code





.NET Language .NET Language .NET Language

Compiler Compiler Compiler





MSIL and

Development Assembly Metadata





Installation JIT Compiler

Install, Run-time





Native Code









Week 1 INT422 13

INT422





Putting it all together









Week 1 INT422 14



Related docs
Other docs by niusheng11
CIOFF-Groups-Report-2010
Views: 419  |  Downloads: 0
stockmkt
Views: 0  |  Downloads: 0
DIFFERENTIAL FLOAT CONTROL VALVE DIFL
Views: 3  |  Downloads: 0
travelrite_nzd
Views: 0  |  Downloads: 0
Office location checklist
Views: 2  |  Downloads: 0
You can help NNAAMI with
Views: 0  |  Downloads: 0
Carey Road CRD Lands
Views: 11  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!