0% found this document useful (0 votes)
17 views8 pages

Unit 1 - Introduction To

The document provides an introduction to the Microsoft .NET technology, outlining its objectives, framework, class library, and the differences between ASP and ASP.NET. It emphasizes the benefits of .NET, including cross-language compatibility and a robust class library that supports various programming languages. The document also details the features of the .NET Framework, including its runtime environment and advantages for developers and users.

Uploaded by

JINESH VARIA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

Unit 1 - Introduction To

The document provides an introduction to the Microsoft .NET technology, outlining its objectives, framework, class library, and the differences between ASP and ASP.NET. It emphasizes the benefits of .NET, including cross-language compatibility and a robust class library that supports various programming languages. The document also details the features of the .NET Framework, including its runtime environment and advantages for developers and users.

Uploaded by

JINESH VARIA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Introduction to .

NET

1.0 Objectives
1.1 Introduction
1.2 .NET Framework
1.2.1 Net Framework and .Net Languages
1.2.2 Languages supported by .Net
Framework
1.3 .NET Class Library
1.4 ASP vs. ASP.NET
1.5 Summary
1.6 Check your Progress - Answers
1.7 Questions for Self – Study
1.8 Suggested Readings

1.0 OBJECTIVES
After studying this chapter you will be able to –
 explain .NET Framework.
 describe the .Net languages.
 explain the .Net class library.
 explain difference between ASP and ASP.NET.
1.1 INTRODUCTION
Microsoft .NET technology you will have access to a new generation of
advanced software joining the best of computing and communications in a
revolutionary new way. The effect will be to totally transform the Web and every other
aspect of the computing experience. .NET enables developers, businesses, and
consumers to harness technology on their terms. .NET will allow the creation of truly
distributed Web services that will integrate and collaborate with a range of
complementary services to help customers in ways that today’s dotcoms can only
dream of.
The fundamental idea behind .NET is that the focus is shifting from individual
Web sites or devices connected to the Internet to constellations of computers, devices,
and services that work together to deliver broader, richer solutions. People will have
control over how, when, and what information is delivered to them. Computers,
devices and services will be able to collaborate with each other to provide rich
services, instead of being isolated islands where the user provides the only integration.
Businesses will be able to offer their products and services in a way that lets
customers seamlessly embed them in their own electronic fabric.
Microsoft .NET will make computing and communicating simpler and easier
than ever. It will spawn a new generation of Internet services, and enable tens of
thousands of software developers to create revolutionary online services and
businesses. It will put you back in control, and enable greater control of your privacy,
digital identity, and data. And software is what makes it all possible. However,
Microsoft’s .NET technology will only succeed if others adopt this new standard.
Source: http://vig.prenhall.com/samplechapter/013093285X.pdf

1.2 .NET FRAMEWORK


The Microsoft .NET Framework is a software compatible work that is available
with several Microsoft Windows operating systems. It includes a large library of pre-
coded solutions to common programming problems and a virtual machine that
Introduction to .NET / 1
manages the execution of programs written specifically for the framework. The .NET
Framework is a key Microsoft offering and is intended to be used by most new
applications created for the Windows platform.
The pre-coded solutions that form the framework's Base Class Library cover a
large range of programming needs in a number of areas, including user interface, data
access, database connectivity, cryptography, web application development, numeric
algorithms, and network communications. The class library is used by programmers,
who combine it with their own code to produce applications.
Programs written for the .NET Framework execute in a software environment
that manages the program's runtime requirements. Also part of the .NET Framework,
this runtime environment is known as the Common Language Runtime (CLR). The
CLR provides the appearance of an application virtual machine so that programmers
need not consider the capabilities of the specific CPU that will execute the program.
The CLR also provides other important services such as security, memory
management, and exception handling.
Source: https://sites.google.com/site/entirefacts/dotnet
Version 3.0 of the .NET Framework is included with Windows Server 2008 and
Windows Vista. The current version of the framework can also be installed on
Windows XP and the Windows Server 2003 family of operating systems. A reduced
"Compact" version of the .NET Framework is also available on Windows Mobile
platforms, including smart phones.

NET Framework

Advantages of .NET
The .NET Framework provides the following advantages:

 A consistent, object-oriented programming environment.


 A code-execution environment that:
o Promotes safe execution of code.
ASP .NET / 2
o Eliminates the performance problems of scripted or interpreted
environments.
o Minimizes software deployment and versioning conflicts.
 A consistent experience for both developers and users across various types of
Windows-based and Web-based applications on multiple devices.
 Communication built on the industry standards to ensure that code based on
the .NET Framework can integrate with any other code.

.NET is based on open Internet standards, which include Hypertext Transfer


Protocol (HTTP), Extensible Markup Language (XML), and Simple Object Access
Protocol (SOAP).

1.2.1 .NET Framework and .NET Languages

As mentioned on the .NET Framework page, .NET Framework is designed for


cross-language compatibility. Cross-language compatibility means .NET components
can interact with each other irrespective of the languages they are written in. An
application written in VB .NET can reference a DLL file written in C# or a C#
application can refer to a resource written in VC++, etc. This language interoperability
extends to Object-Oriented inheritance.
This cross-language compatibility is possible due to common language
runtime. As you read on the .NET Framework page, when the .NET program is
compiled, the output of the compiler is not an executable file but a file that contains a
special type of code called the Microsoft Intermediate Language (MSIL). This MSIL is
a low-level language which is designed to be read and understood by the common
language runtime. Because all .NET executables exist as IL, they can freely operate.
The Common Language Specification defines the minimum standards that .NET
language compliers must confirm to. Thus, any code compiled by a .NET complier can
interoperate with the .NET Framework.
The Common Type System (CTS) defines the rules concerning data types and
ensures that code is executed in a safe environment. Since all .NET applications are
converted to IL before execution all primitive data types are represented as .NET
types. This means that, a VB Integer and a C# integer are both represented in IL code
as System.Int32. Because both the languages use a common type system, it is
possible to transfer data between components and avoid time-consuming conversions.
1.2.2 Languages supported by .NET Framework

The table below lists all the languages supported by the .NET Framework and
describes those languages.

Language Description/ Usage


APL (A Programming Language) is one of the most
APL powerful, consistent and concise computer
programming languages ever devised. It is a language
for describing procedures in the processing of
information. It can be used to describe mathematical
procedures having nothing to do with computers or to
describe the way a computer works.
C++ is a true OOP. It is one of the early Object-Oriented
C++ programming languages. C++ derives from the C
language.
Visual C++ is the name of a C++ compiler with an
integrated environment from Microsoft. This includes
special tools that simplify the development of great
applications, as well as specific libraries. Its use is
known as visual programming.
C# called as C Sharp is a fully fledged Object-Oriented
C# programming language from Microsoft built into the
.NET Framework. First created in the late 1990’s was
part of Microsoft’s whole .NET strategy.
COBOL (Common Business Oriented Language) was
Cobol the first widely-used high-level programming language
for business applications. It is considered as a

Introduction to .NET / 3
programming language to have more lines of code than
any other language.
Eiffel is an Object-Oriented (OO) programming
Eiffel language which emphasizes the production of robust
software. Eiffel is strongly statically typed mature
Object-Oriented language with automatic memory
management.

Formula Translator, Fortran is one of the oldest high-


Fortran level programming languages that are still widely used
in scientific computing because of its compact notation
for equations, ease in handling large arrays, and huge
selection of library routines for solving mathematical
problems efficiently.

Haskell is a computer programming language that is a


Haskell polymorphic typed, lazy, purely functional language,
quite different from most other programming languages.
It is a wide-spectrum language, suitable for a variety of
applications. It is particularly suitable for programs
which need to be highly modifiable and maintainable.

The Java language is one of the most powerful Object-


Java Oriented programming languages developed till date. Its
Language platform independence (not depending on a particular
OS) feature makes it a very popular programming
language.

Microsoft JScript is the Microsoft implementation of the


Microsoft ECMA 262 language specification. JScript is an
JScript interpreter, object-based scripting language. It has
fewer capabilities than full-fledged Object-Oriented
languages like C++ but is more than sufficiently
powerful for its intended purposes.
Mercury is a new logic/functional programming
Mercury language, which combines the clarity and
expressiveness of declarative programming with
advanced static analysis and error detection features.
Its highly optimized execution algorithm delivers
efficiency far in excess of existing logic programming
systems, and close to conventional programming
systems. Mercury addresses the problems of large-
scale program development, allowing modularity,
separate compilation, and numerous optimization/time
trades-offs.
Mondrian is a simple functional scripting language for
Mondrian Internet applications. It is a functional language
specifically designed to inter-operate with other
languages in an OO environment. Current versions of
Mondrian run on .NET. Mondrian also supports
ASP.NET, allowing you to embed functional language
code in web pages along with C# code.

Oberon is a programming language very much like


Oberon Modula-2 in syntax but with several interesting features.
It's based on OOP concepts and provides a Windows-
based graphical user interface.

Oz is a high-level programming language that combines


Oz constraint inference with concurrency. Oz is dynamically
typed and has first-class procedures, classes, objects,
exceptions and sequential threads synchronizing over a
constraint store. It supports finite domain and feature
constraints and has powerful primitives for programming
constraint inference engines at a high level.

ASP .NET / 4
Practical Extraction and Report Language, Perl, is a
Perl language optimized for scanning arbitrary text files,
extracting information from those text files, and printing
reports based on that information. It's also a good
language for many system management tasks.
Python is an interpreter, interactive, Object-Oriented
Python programming language. Python combines remarkable
power with very clear syntax. It has modules, classes,
exceptions, very high level dynamic data types, and
dynamic typing.
Report Program Generator, RPG, is used for generation
RPG of reports from data files, including matching record and
sub-total reports. RPG is one of the few languages
created for punch card machines that are still in
common use today. RPG or RPG IV is a native
programming language for IBM's iSeries minicomputer
system.
Scheme is a statically scoped programming language. It
Scheme was designed to have an exceptionally clear and simple
semantics and few different ways to form expressions.
A wide variety of programming paradigms, including
imperative, functional, and message passing styles, find
convenient expression in Scheme.
Small Talk is an expressive language that uses a simple
Small Talk sub set of human languages, nouns and verbs.
Smalltalk was the first, and remains one of the few; pure
object a system, which simply means that everything in
a Smalltalk program is an object. Smalltalk is generally
recognized as the second Object Programming
Language (OPL).
Standard ML is a safe, modular, strict, functional,
Standard ML polymorphic programming language with compile-time
type checking and type inference, garbage collection,
exception handling, immutable data types and
updatable references, abstract data types, and
parametric modules. It has efficient implementations
and a formal definition with a proof of soundness.
Visual Basic is a "visual programming" environment for
Microsoft developing Windows applications. Visual Basic makes it
Visual Basic possible to develop complicated applications very
quickly. This site is all about Visual Basic.

1.3 .NET CLASS LIBRARY


The .NET Framework class library is a library of classes, interfaces, and value
types that are included in the Windows Software Development Kit (SDK). This library
provides access to system functionality and is designed to be the foundation on which
.NET Framework applications, components, and controls are built.
Namespaces:

Namespace Description

System The System namespace contains fundamental classes


and base classes that define commonly-used value and
reference data types, events and event handlers,
interfaces, attributes, and processing exceptions.

System.Data The System.Data namespaces contain classes for


accessing and managing data from diverse sources. The
top-level namespace and a number of the child
namespaces together form the ADO.NET architecture
and ADO.NET data providers. For example, providers are
available for SQL Server, Oracle, ODBC, and OleDB.

Introduction to .NET / 5
Other child namespaces contain classes used by the
ADO.NET Entity Data Model (EDM) and by WCF Data
Services.

System.IO The System.IO namespaces contain types that support


input and output, including the ability to read and write
data to streams either synchronously or asynchronously,
to compress data in streams, to create and use isolated
stores, to map files to an application's logical address
space, to store multiple data objects in a single container,
to communicate using anonymous or named pipes, to
implement custom logging, and to handle the flow of data
to and from serial ports.

System.Net The System.Net namespaces contain classes that


provide a simple programming interface for a number of
network protocols, programmatically access and update
configuration settings for the System.Net namespaces,
define cache policies for web resources, compose and
send e-mail, represent Multipurpose Internet Mail
Exchange (MIME) headers, access network traffic data
and network address information, and access peer-to-
peer networking functionality. Additional child
namespaces provide a managed implementation of the
Windows Sockets (Winsock) interface and provide
access to network streams for secure communications
between hosts.

System.Web The System.Web namespaces contain types that enable


browser/server communication. Child namespaces
include types that support ASP.NET forms authentication,
application services, data caching on the server,
ASP.NET application configuration, dynamic data, HTTP
handlers, JSON serialization, incorporating AJAX
functionality into ASP.NET, ASP.NET security, and web
services.

System.Windows The System.Windows namespaces contain types used in


Windows Presentation Foundation (WPF) applications,
including animation clients, user interface controls, data
binding, and type conversion. System.Windows.Forms
and its child namespaces are used for developing
Windows Forms applications.

Source : from Microsoft MSDN

1.4 ASP VS. ASP.NET


ASP:
1) ASP is run under the inetinfo.exe (IIS) process space and hence susceptible to
application crashes as a result the IIS needs to be stopped or restarted. ASP is
related to the process isolation setting in IIS.
2) Classical ASP had no mechanism of running itself on non- Microsoft technology
platforms like the 'The Apache Web Server'
3) In ASP only two languages were available for scripting VBScript and
Jscript/JavaScript.
4) In ASP, ASP engine executes server-side code, which is always through an
interpreter (JScript or VBScript). When a traditional ASP page is requested, the
text of that page is parsed linearly. All content that is not server-side script is
rendered as is back to the response. All server-side script in the page is first run
through the appropriate interpreter (JScript or VBScript), the output of which is

ASP .NET / 6
then rendered back to the response. This architecture affects the efficiency of
page rendering in several ways. Thus, to improve efficiency of rendering, many
ASP developers resort to large blocks of server-side script, replacing static
HTML elements with Response.Write() invocations instead. Finally, this ASP
model actually allows different blocks of script within a page to be written in
different script languages.
5) In classic ASP it was very difficult for us to debug the application. ASP
developers had time to debug application due to limited support due to the
interpreted model.
6) Class=docText>especially if you are using ASP pages it is possible to include
executable code outside the scope of a function within a script block marked as
runat=server, and, it is possible to define a function within a pair of server-side
script tags.
7) New Page Directives: In ASP you must place all directives on the first line of a
page within the same delimiting block. For example:
<%LANGUAGE="VBSCRIPT" CODEPAGE="932"%>

ASP.NET
1) The ASP.NET worker process is a distinct worker process, aspnet_wp.exe,
separate from inetinfo.exe (IIS process), and the process model in ASP.NET is
unrelated to process isolation settings in IIS.
2) ASP.NET could be run on non-Microsoft Platforms also.
3) We are no longer constrained to the two scripting languages available in
traditional ASP: Any fully compliant .NET language can now be used with
ASP.NET, including C# and VB.NET.
4) In contrast, ASP.NET pages are always compiled into .NET classes housed
within assemblies. This class includes all of the server-side code and the static
HTML, so once a page is accessed for the first time (or any page within a
particular directory is accessed), subsequent rendering of that page is serviced
by executing compiled code. This eliminates all the inefficiencies of the scripting
model of traditional ASP. There is no longer any performance difference
between compiled components and server-side code embedded within a page
they are now both compiled components. There is also no performance
difference between interspersing server-side code blocks among static HTML
elements, and writing large blocks of server-side code and using Response
.Write() for static HTML content. Also, because the .aspx file is parsed into a
single code file and compiled, it is not possible to use multiple server-side
languages within a single .aspx file.
5) But in ASP.NET In addition to improved performance over the interpreted model,
pages that are compiled into classes can be debugged using the same
debugging tools available to desktop applications or component developers.
Errors with pages are generated as compiler errors, and there is a good chance
that most errors will be found at compilation time instead of runtime, because
VB.NET and C# are both strongly typed languages. Plus, all the tools available
to the .NET developer are applicable to the .aspx developer.
6) In ASP.NET it is no longer possible to include executable code outside the
scope of a function within a script block marked as runat=server, and conversely,
it is no longer possible to define a function within a pair of server-side script tags.
7) But in ASP.NET, you are now required to place the Language directive with a
Page directive, as follows:
<%@Page Language="VB" Code Page="932"%> <%@Output Cache
Duration="60" Vary By Param="none" %>
You can have as many lines of directives as you need. Directives may be
located anywhere in your .apsx file but standard practice is to place them at the
beginning of the file. Several new directives have been added in ASP.NET.

Introduction to .NET / 7
1.5 SUMMARY
 The fundamental idea behind .NET is that the focus is shifting from individual
Web sites or devices connected to the Internet to constellations of computers,
devices, and services that work together to deliver broader, richer solutions.
 The .NET Framework is a key Microsoft offering and is intended to be used by
most new applications created for the Windows platform.
 .NET Framework is designed for cross-language compatibility. Cross-language
compatibility means .NET components can interact with each other irrespective
of the languages they are written in.
 All the languages supported by the .NET Framework is C++, C#, COBOL, Eiffel,
Java, Perl etc.

Check your Progress – 1.2-1.4


True or False
a. .Net Frame work is a software compatible work that is available with several
Microsoft windows operating system.
b. CLS defines rules concerning data types.
c. C++ language is supported by .NET framework.
d. MSIL is a low-level language.
e. ASP.NET could not run on non-Microsoft Platforms.

1.6 CHECK YOUR PROGRESS – ANSWERS


a. True b. False c. True d. True e. False

1.7 QUESTIONS FOR SELF - STUDY


a) Explain brief introduction to .NET.
b) Explain languages supported by .Net Frame work.
c) Explain .NET framework with diagram.
d) What is the difference between ASP and ASP.NET?

1.8 SUGGESTED READINGS

1. Microsoft MSDN
2. http://vig.prenhall.com/samplechapter/013093285X.pdf
3. Source: http://devreminder.wordpress.com/net/net-framework-fundamentals/
4. https://sites.google.com/site/entirefacts/dotnet
5. http://en.wikipedia.org/wiki/.NET_Framework_version_history



ASP .NET / 8

You might also like