Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ON
.NET FRAMEWORK
Submitted by submitted to
Virender Bhati Preety Sisodiya
Certificate
Date:
2 Cont…
Acknowledgement
Virender bhati
3 Cont…
Tabel of Contents
4 Cont…
Why .NET required?
The creation of the .NET Framework reflects what has been learned over the years
about the typical challenges that programmers face and useful approaches to those
challenges.
Individual programming languages and tools led the way in proving the viability of
features such as strong data typing, garbage-collected memory management,
exception-based error handling, virtual machine architectures, and comprehensive
class libraries. Visual Basic, Powerbuilder, the C++ Standard Template Library (STL),
and other languages each implemented at least some of these features, but the Java
language and its frameworks J2SE and J2EE became the most notable competitive
threat to Microsoft. After failed attempts to include a modified form of Java with
Windows, Microsoft set out to create its own products that incorporated the best
features of that and other languages. The effort resulted in the Microsoft .NET
Framework and its accompanying programming languages and tools.
5 Cont…
• Interoperability - Because interaction between new and older applications is
commonly required, the .NET Framework provides means to access
functionality that is implemented in programs that execute outside the .NET
environment. Access to COM components is provided in the EnterpriseServices
namespace of the framework, and access to other functionality is provided using
the P/Invoke feature.
• Base Class Library - The Base Class Library (BCL), sometimes referred to as
the Framework Class Library (FCL), is a library of types available to all
languages using the .NET Framework. The BCL provides classes which
encapsulate a number of common functions, including file reading and writing,
graphic rendering, database interaction and XML document manipulation.
6 Cont…
• Simplified Deployment - Installation of computer software must be carefully
managed to ensure that it does not interfere with previously installed software,
and that it conforms to increasingly stringent security requirements. The .NET
framework includes design features and tools that help address these
requirements.
• Security - .NET allows for code to be run with different trust levels without the
use of a separate sandbox.
The design of the .NET Framework is such that it supports platform independence.
That is, a program written to use the framework should run without change on any
type of computer for which the framework is implemented. At present, Microsoft has
implemented the full framework only on the Windows operating system. Microsoft
and others have implemented portions of the framework on non-Windows systems, but
to date those implementations are neither complete nor widely used.
The Microsoft .NET Framework is a software component that can be added to the
Microsoft Windows operating system.The .NET framework defines an enviornments
that support the development and execution of highly distributed, component based
applications. It enables differing computer languages to work together and provides for
security, program protability, and a common programming model for the Windows
platform. It is important to state, however, that the .NET Framework is not inherently
limited to Windows, which means that programs written for it might be portable to non
Windows environments in the future.
7 Cont…
The .NET Framework defines two very important entities. The First is the
common language runtime (CLR). This is the system that manages the execution of
your program. Along with other benefits, the CLR is the part of the .NET Framework
that enables programs to be protable, supports mixed-language programming, and
provides for security.
The second entity is the .NET class library. This library gives your progarm
access to the runtime environment. For example, if you want to perform I/O, such as
displaying something on the screen, you will use the .NET Class library to do it.
Feature which is defines by .NET class library that it can run any where that the .NET
run time system is supported. Thus the programmes are automatically portable to all
.NET environment. It provides a large body of pre-coded solutions to common
program requirements, and 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 Microsoft .NET Framework is a platform for building, deploying, and running
Web Services and applications. It provides a highly productive, standards-based,
multi-language environment for integrating existing investments with next-generation
applications and services as well as the ability to solve the challenges of deployment
and operation of Internet-scale applications.
The pre-coded solutions form the framework's class library and cover a large
range of programming needs in areas including: user interface, data access, database
connectivity, cryptography, web application development, numeric algorithms, and
network communications. The functions of the class library are used by programmers
who combine them with their own code to produce applications.
8 Cont…
Programs written for the .NET Framework execute in a software environment
that manages the program's runtime requirements. This runtime environment, which is
also a part of the .NET Framework, is known as the Common Language Runtime
(CLR).
First released in 2002, it is included with Windows Server 2003 and Windows Vista,
and can be installed on most older versions of Windows.
Significance
For software developers, the .NET Framework is a significant change. It brings into
the operating system features and responsibilities that previously had been provided
individually by programming languages and tools from various sources. The
incorporation of the features into the operating system is meant to provide a number of
advantages, including:
9 Cont…
• Assuring the availability of framework features to all programs written in any of
the .NET languages.
10 Cont…
11 Cont…
Visual overview of the Common Language Infrastructure (CLI)
The most important component of the .NET Framework lies in the Common Language
Infrastructure, or CLI. The purpose of the CLI is to provide a language-agnostic
platform for application development and execution, including, but not limited to,
components for exception handling, garbage collection, security, and interoperability.
Microsoft's implementation of the CLI is called the Common Language Runtime, or
CLR. The CLR is composed of five primary parts:
For example, the .NET Framework collection classes implement a set of interfaces that
you can use to develop your own collection classes. Your collection classes will blend
seamlessly with the classes in the .NET Framework.
As you would expect from an object-oriented class library, the .NET Framework types
enable you to accomplish a range of common programming tasks, including string
management, data collection, database connectivity, and file access. In addition to
these common tasks, the class library includes types that support a variety of
specialized development scenarios. For example, you can use the .NET Framework to
develop the following types of applications and services:
• Console applications
• Windows GUI applications (Windows Forms)
12 Cont…
• ASP.NET applications
• XML Web services
• Windows services
For example, the Windows Forms classes are a comprehensive set of reusable types
that vastly simplify Windows GUI development. If you write an ASP.NET Web Form
application, you can use the Windows Forms classes.
Another kind of client application is the traditional ActiveX control (now replaced by
the managed Windows Forms control) deployed over the Internet as a Web page. This
application is much like other client applications: it is executed natively, has access to
local resources, and includes graphical elements.
In the past, developers created such applications using C or C++ in conjunction with
the Microsoft Foundation Classes (MFC) or with a rapid application development
(RAD) environment such as Microsoft® Visual Basic®. The .NET Framework
incorporates aspects of these existing products into a single, consistent development
environment that drastically simplifies the development of client applications.
The Windows Forms classes contained in the .NET Framework are designed to be
used for GUI development. You can easily create command windows, buttons, menus,
toolbars, and other screen elements with the flexibility necessary to accommodate
shifting business needs.
13 Cont…
For example, the .NET Framework provides simple properties to adjust visual
attributes associated with forms. In some cases, the underlying operating system does
not support changing these attributes directly, and in these cases the .NET Framework
automatically re-creates the forms. This is one of many ways in which the .NET
Framework integrates the developer interface, making coding simpler and more
consistent.
Unlike ActiveX controls, Windows Forms controls have semitrusted access to a user's
computer. This means that binary or natively executing code can access some of the
resources on the user's system, such as GUI elements and limited file access, without
being able to access or compromise other resources. Because of code access security,
many applications that once needed to be installed on a user's system can now be
safely deployed through the Web. Your applications can implement the features of a
local application while being deployed like a Web page.
The following illustration shows a basic network schema with managed code running
in different server environments. Servers, such as IIS and SQL Server, can perform
standard operations while your application logic executes the managed code.
14 Cont…
ASP.NET is the hosting environment that enables developers to use the .NET
Framework to target Web-based applications. However, ASP.NET is more than just a
runtime host; it is a complete architecture for developing Web sites and Internet-
distributed objects using managed code. Both Web Forms and XML Web services use
IIS and ASP.NET as the publishing mechanism for applications, and both have a
collection of supporting classes in the .NET Framework.
If you have used earlier versions of ASP technology, you will immediately notice the
improvements that ASP.NET and Web Forms offer. For example, you can develop Web
Forms pages in any language that supports the .NET Framework. In addition, your
code no longer needs to share the same file with your HTTP text (although it can
continue to do so if you prefer). Web Forms pages execute in native machine language
because, like any other managed application, they take full advantage of the runtime.
15 Cont…
In contrast, unmanaged ASP pages are always scripted and interpreted. ASP.NET
pages are faster, more functional, and easier to develop than unmanaged ASP pages
because they interact with the runtime like any managed application.
The .NET Framework also provides a collection of classes and tools to aid in
development and consumption of XML Web services applications. XML Web services
are built on standards, such as SOAP, a remote procedure-call protocol; XML, an
extensible data format; and WSDL, the Web Services Description Language. The
.NET Framework is built on these standards to promote interoperability with non-
Microsoft solutions.
For example, the Web Services Description Language tool included with the .NET
Framework SDK can query an XML Web service published on the Web, parse its
WSDL description, and produce C# or Visual Basic source code that your application
can use to become a client of the XML Web service. The source code can create
classes derived from classes in the class library that handle all the underlying
communication using SOAP and XML parsing. Although you can use the class library
to consume XML Web services directly, the Web Services Description Language tool
and the other tools contained in the SDK facilitate your development efforts with the
.NET Framework.
If you develop and publish your own XML Web service, the .NET Framework
provides a set of classes that conform to all the underlying communication standards,
such as SOAP, WSDL, and XML. Using those classes enables you to focus on the
logic of your service, without concerning yourself with the communications
infrastructure required by distributed software development.
Finally, like Web Forms pages in the managed environment, your XML Web service
will run with the speed of native machine language using the scalable communication
of Internet Information Services IIS.
16 Cont…
• Common Type System (CTS)
• Common Language Specification (CLS)
• Common Intermediate Language (CIL)
• Just-in-Time Compiler (JIT)
• Virtual Execution System (VES)
The Common Type System (CTS) is used by every language built on the .NET
Framework. A fundamental part of the .NET Framework is Common Language
Runtime (CLR), the CTS specifies no particular syntax or keywords, but instead
defines a common set of types that can be used with many different language syntaxes.
Each language is free to define any syntax it wishes, but if that language is built on the
CLR, it will use at least some of the types defined by the CTS. While the creator of a
CLR-based language is free to implement only a subset of the types defined by the
CTS. Visual Basic.NET, C#, and pretty much every other language used with the .NET
Framework rely heavily on the CTS.
The CTS provides every language running on the .NET platform with a base set of
data types. While the CTS is responsible for defining the types that can be used across
the .NET languages, most languages choose to implement aliases to those types. For
example, a four-byte integer value is represented by the CTS type System.Int32. C#
defines an alias for this called type called int.
Everything in the CTS is an object. Not only is everything an object but even more
importantly, all objects implicitly derive from a single base class defined as a part of
the CTS. This base class is called System.Object. The designers of CTS were faced
with the task of creating a type system in which every thing is an object, but the type
system works in an efficient manner, when applicable
17 Cont…
The Common Language Infrastructure (CLI) is an open specification developed by
Microsoft that describes the executable code and runtime environment that form the
core of the Microsoft .NET Framework. The specification defines an environment that
allows multiple high-level languages to be used on different computer platforms
without being rewritten for specific architectures.
CIL was originally known as Microsoft Intermediate Language (MSIL) during the beta
releases of the .NET languages. Due to standardization of C# and the Common
Language Infrastructure, the bytecode is now officially known as CIL. Because of this
legacy, CIL is still frequently referred to as MSIL, especially by long-standing users of
the .NET languages.
18 Cont…
In computing, just-in-time compilation (JIT), also known as dynamic translation, is
a technique for improving the runtime performance of a computer program. It
converts, at runtime, code from one format into another, for example bytecode into
native machine code. The performance improvement originates from caching the
results of translating blocks of code, and not simply evaluating each line or operand
separately (see Interpreted language), or compiling the code at development time. JIT
builds upon two earlier ideas in run-time environments: bytecode compilation and
dynamic compilation
A dynamic compilation environment is one in which the compiler can be used during
execution. For instance, most Common Lisp systems have a compile function which
can compile new functions created during the run. While advantageous in interactive
debugging, dynamic compilation is less useful in a hands-off deployed system.
In a JIT environment, bytecode compilation is the first step, reducing source code to a
portable and optimizable intermediate representation. The bytecode is deployed onto
the target system. When code is executed, the runtime environment's compiler
translates it into native machine code. This can be done on a per-file, per-function or
even on any arbitrary code fragment; code can be compiled when it is about to be
executed (hence the name "just-in-time").
The goal is to combine many of the advantages of native and bytecode compilation:
Much of the "heavy lifting" of parsing the original source code and performing basic
optimization is handled at compile time, prior to deployment: compilation from
bytecode to machine code is much faster than from source. The deployed bytecode is
portable, unlike machine code for any given architecture. Compilers from bytecode to
machine code are easier to write, because the portable bytecode compiler has already
done much of the work.
19 Cont…
This also generally offers far better performance than interpreters as the compiled code
is stored in memory cache at runtime, such that subsequent recompilation or
reinterpretation of compiled code can be skipped, while also giving flexibility to
automatically recompile and optimise code that is found at runtime to be frequently
executed.
However, JIT may have a drawback by causing a slight delay in initial execution of an
application, due to the time taken to compile the bytecode. Sometimes this delay is
called "startup time delay". In general, the more optimization JIT performs, the better
code it will generate. However, the longer delay users will experience. Therefore a
well written JIT has to make the trade-offs between the compilation time and the
quality of the code it hopes to generate.
Assemblies
The intermediate MSIL code is housed in .NET assemblies, which for the Windows
implementation means a Portable Executable (PE) file (EXE or DLL). Assemblies are
20 Cont…
the .NET unit of deployment, versioning and security. The assembly consists of one or
more files, but one of these must contain the manifest, which has the metadata for the
assembly. The complete name of an assembly contains its simple text name, version
number, culture and public key token; it must contain the name, but the others are
optional. The public key token is generated when the assembly is created, and is a
value that uniquely represents the name and contents of all the assembly files, and a
private key known only to the creator of the assembly. Two assemblies with the same
public key token are guaranteed to be identical. If an assembly is tampered with (for
example, by hackers), the public key can be used to detect the tampering.
Metadata
All CIL is self-describing through .NET metadata. The CLR checks on metadata to
ensure that the correct method is called. Metadata is usually generated by language
compilers but developers can create their own metadata through custom attributes
The Base Class Library (BCL), sometimes incorrectly referred to as the Framework
Class Library (FCL) (which is a superset including the Microsoft.* namespaces), is a
library of classes available to all languages using the .NET Framework. The BCL
provides classes which encapsulate a number of common functions such as file
reading and writing, graphic rendering, database interaction, XML document
manipulation, and so forth. The BCL is much larger than other libraries, but has much
more functionality in one package.
21 Cont…
Security
.NET has its own security mechanism, with two general features: Code Access
Security (CAS), and validation and verification. Code Access Security is based on
evidence that is associated with a specific assembly. Typically the evidence is the
source of the assembly (whether it is installed on the local machine, or has been
downloaded from the intranet or Internet). Code Access Security uses evidence to
determine the permissions granted to the code. Other code can demand that calling
code is granted a specified permission. The demand causes the CLR to perform a call
stack walk: every assembly of each method in the call stack is checked for the required
permission and if any assembly is not granted the permission then a security exception
is thrown.
When an assembly is loaded the CLR performs various tests. Two such tests are
validation and verification. During validation the CLR checks that the assembly
contains valid metadata and CIL, and it checks that the internal tables are correct.
Verification is not so exact. The verification mechanism checks to see if the code does
anything that is 'unsafe'. The algorithm used is quite conservative and hence
sometimes code that is 'safe' is not verified. Unsafe code will only be executed if the
assembly has the 'skip verification' permission, which generally means code that is
installed on the local machine.
22 Cont…
In August, 2000, Microsoft, Hewlett-Packard, and Intel worked to standardize CLI and
the C# programming language. By December, 2001, both were ratified ECMA
standards (ECMA 335 and ECMA 334). ISO followed in April, 2003 (ISO/IEC 23271
and ISO/IEC 23270).
While Microsoft and their partners hold patents for CLI and C#, ECMA and ISO
requires that all patents essential to implementation be made available under
"reasonable and non-discriminatory (RAND) terms." In addition to meeting these
terms, the companies have agreed to make the patents available royalty-free.
However, this does not apply for the part of the .NET Framework which is not covered
by the ECMA/ISO standard, which includes Windows Forms, ADO.NET, and
ASP.NET. Patents that Microsoft holds in these areas may deter non-Microsoft
implementations of the full framework.
Versions
Microsoft started development on the .NET Framework in the late 90s originally under
the name of Next Generation Windows Services (NGWS). By late 2000 the first beta
versions of .NET 1.0 were being released.
23 Cont…
This is the first release of the .NET Framework that was released on February 13,
2002. It is available on its own as a redistributable package or in a software
development kit. It is also part of the first release of Microsoft Visual Studio .NET
(also known as Visual Studio .NET 2002).
This is the first major .NET Framework upgrade. It is available on its own as a
redistributable package or in a software development kit. It is also part of the second
release of Microsoft Visual Studio .NET (released as Visual Studio .NET 2003). This
is the first version of the .NET Framework to be included as part of the Windows
operating system - it is part of Windows Server 2003. Windows Server 2003 originally
shipped with the 1.1 RTM version.
24 Cont…
Released with Visual Studio .NET 2005, Microsoft SQL Server 2005 and BizTalk
2006.
• The 2.0 Redistributable Package can be downloaded for free from Microsoft.
• The 2.0 Software Development Kit (SDK) can be downloaded for free from
Microsoft.
• It is included as part of Visual Studio 2005 and Microsoft SQL Server 2005.
• Version 2.0 is the last version with support for Windows 2000
.NET Framework 2.0 shipped with Windows Server 2003 R2 (not installed by default).
25 Cont…
Architecture of the .NET Framework 3.0
.NET Framework 3.0, formerly called WinFX,[3] includes a new set of managed code
APIs that are an integral part of Windows Vista and Windows Server "Longhorn"
operating systems. It is also available for Windows XP SP2 and Windows Server 2003
as a download. There are no major architectural changes included with this release;
.NET Framework 3.0 includes version 2.0 of the Common Language Runtime. The
.NET 3.0 installer available from Microsoft checks to see if .NET 2.0 is already
installed. If not, it installs it and then installs .NET 3.0 components. Otherwise it just
installs .NET 3.0 components. This means that if you do not have .NET 2.0 installed,
you do not need to install it; you can install .NET 3.0 straight away. .NET 1.1 and its
service-pack, however, must be installed separately, preferably before installing .NET
3.0.
26 Cont…
which will make use of 3D computer graphics hardware and Direct3D
technologies. See WPF SDK for developer articles and documentation on WPF.
• Windows Communication Foundation (WCF), formerly code-named Indigo;
a service-oriented messaging system which allows programs to interoperate
locally or remotely similar to web services.
• Windows Workflow Foundation (WF) allows for building of task automation
and integrated transactions using workflows.
• Windows CardSpace (WCS), formerly code-named InfoCard; a software
component which securely stores a person's digital identities and provides a
unified interface for choosing the identity for a particular transaction, such as
logging in to a website
The CLI and C# have many similarities to Sun's JVM and Java. They are strong
competitors. Both are based on a virtual machine model that hides the details of the
computer hardware on which their programs run. Both use their own intermediate
byte-code, Microsoft calling theirs Microsoft Intermediate Language (MSIL) and Sun
Java bytecode. On .NET, the byte-code is always JIT-compiled: with Java, the byte-
code can be either interpreted or JIT-compiled. Both provide extensive class libraries
that address many common programming requirements, and both address many
security issues that are present in other approaches. The namespaces provided in the
.NET Framework closely resemble the platform packages in Java EE API
Specification both in style and invocation.
27 Cont…
only the Java language on many operating system platforms under the slogan, "Write
once, run anywhere."
Criticism
• With the introduction of the .NET framework, the old Visual Basic language
was replaced by the Visual Basic .NET language, which caused controversy
among transitioning developers.
• Several backward and forward incompatibilities exist between .NET 1.0, .NET
1.1, and .NET. These are well-documented however, and mostly include security
fixes, changes in the underlying implementation (such as the GetHashCode()
implementation), as well as marking many methods as Obsolete. Additionally,
the framework allows running different versions side-by-side, to alleviate
problems of version incompatibility.
28 Cont…
• Although it is more a business decision than a real criticism on the
framework, some people have expressed concern that the framework
is too much tied to the Microsoft Windows operating system. However, the
existence of alternative implementations for other platforms (though not yet
complete) begin to alleviate this criticism.
• There is also concern in the development community about the fact that a .NET
assembly, as produced by the .NET programming environments, can be reverse-
engineered to reveal some of the programming techniques and algorithms used
by an application. While this kind of reverse-engineering is possible with all
programs, those that compile to byte-code, as .NET and Java do, are somewhat
more vulnerable. Reverse engineering can lead to the loss of trade secrets and
the bypassing of license control mechanisms. Some developers are using
obfuscation and other techniques in an attempt to protect their intellectual
property and license revenues. Indeed Microsoft includes a tool called the
"dotfuscator community edition" - a product of PreEmptive Solutions, in the full
version of Visual Studio 2005.
Alternative implementations
29 Cont…
The Microsoft .NET Framework is the predominant implementation of .NET
technologies. Other implementations for parts of the framework exist. Since the
runtime engine is described by a ECMA/ISO specification, other implementations of it
are unencumbered by copyright issues. It is more difficult to develop alternatives to
the base class library (BCL), which is not described by an open standard, and may be
subject to copyright restrictions. Additionally, parts of the BCL have Windows-specific
functionality and behavior, so implementation on non-Windows platforms can be
problematic.
30 Cont…
such as file reading and writing, graphic rendering, database interaction, and XML
document manipulation. It is much larger in scope than standard libraries for most
other languages, including C++, and would be comparable in scope to the standard
libraries of Java. The BCL is sometimes incorrectly referred to as the Framework
Class Library (FCL), which is a superset including the Microsoft.* namespaces.
Namespaces
Some of these namespaces may or may not be officially considered part of the BCL by
Microsoft, but all are included as part of the standard libraries that are provided with
the .NET Framework.
System
This namespace includes the core needs for programming. It includes base types
like String, DateTime, Boolean, and so forth, support for environments such as
the console, math functions, and base classes for attributes, exceptions, and
arrays.
System.CodeDom
This library provides the ability to create code and run it, at runtime.
System.Collections
Defines many common containers or collections used in programming, such as
lists, queues, stacks, hashtables, and dictionaries. It includes support for
generics.
31 Cont…
System.ComponentModel
Provides the ability to implement the run-time and design-time behavior of
components and controls. It contains the infrastructure "for implementing
attributes and type converters, binding to data sources, and licensing
components."
System.Configuration
Provides the infrastructure for handling configuration data.
System.Data
This namespace represents the ADO.NET architecture, which is set of computer
software components that can be used by programmers to access data and data
services.
System.Deployment
Allows you to customize the way your application upgrades when using
ClickOnce.
System.Diagnostics
Gives you the ability to diagnose your application. It includes event logging,
performance counters, tracing, and interaction with system processes.
System.DirectoryServices
Provides easy access to Active Directory from managed code.
System.Drawing
Provides access to GDI+ graphics functionality, including support for 2D and
vector graphics, imaging, printing, and text services.
System.EnterpriseServices
"Provides .NET objects with access to COM+ services making the .NET
Framework objects more practical for enterprise applications."
32 Cont…
System.Globalization
Provides help for writing internationalized applications. "Culture-related
information, including the language, the country/region, the calendars in use,
[and] the format patterns for dates, currency, and numbers" can be defined.
System.IO
Allows you to read from and write to different streams, such as files or other
data streams. Also provides a connection to the file system.
System.Management
Allows you to query for information, "such as how much free space is left on
the disk, what is the current CPU utilization, which database a certain
application is connected to, and much more."
System.Media
Provides you the ability to play system sounds and .wav files.
System.Messaging
Allows "you to connect to, monitor, and administer message queues on the
network and send, receive, or peek messages." .NET Remoting is another name
for some of the functionality provided. This namespace is being superseded by
Windows Communication Foundation.
System.Net
Provides an interface "for many of the protocols used on networks today," such
as HTTP, FTP, and SMTP. Secure communication is supported by protocols
such as SSL.
System.Reflection
Provides an object view of types, methods, and fields. You have "the ability to
dynamically create and invoke types."
33 Cont…
System.Resources
Allows you to manage many different resources in the application in order to
internationalize an application for different cultures and languages.
System.Runtime
Allows you to manage the runtime behavior of an application or the CLR. Some
of the included abilities are interoping with COM or other native code, writing
distributed applications, and serializing objects into binary or SOAP.
System.Security
"Provides the underlying structure of the common language runtime security
system." This namespace allows you to build security into your application
based on policy and permissions. It provides services such as cryptography.
System.ServiceProcess
Allows you to create applications that run as a service within Windows.
System.Text
Supports various encodings, regular expressions, and a more efficient
mechanism for manipulating strings (StringBuilder).
System.Threading
Helps facilitate multithreaded programming. It allows the synchronizing of
"thread activities and access to data" and provides "a pool of system-supplied
threads."
System.Timers
"Allows you to raise an event on a specified interval."
System.Transactions
Provides support for local or distributed transactions.
34 Cont…
System.Web
Provides various web related functionality. It enables browser-server
communication and the creating XML Web Services. Most or all of these
libraries are referred to as the ASP.NET architecture.
System.Windows.Forms
This namespace contains the Windows Forms architecture which provides
access to the older Windows API for writing graphical applications for Windows
from within managed code. This system is being superseded by the Windows
Presentation Foundation.
System.Xml
"Provides standards-based support for processing XML," including reading,
writing, schemas, serialization, searching, and transforming
.NET Languages
35 Cont…
.NET Languages are computer programming languages that are used to produce
programs that execute within the Microsoft .NET Framework. Microsoft provides
several such languages, including C#, Visual Basic .NET, and C++/CLI.
Regardless of which .NET language is used, the output of the language compiler is a
representation of the same logic in an intermediate language named Common
Intermediate Language. Before the program is executed, CIL is compiled to object
code appropriate for the machine on which the program is executing. This last
compilation step is usually performed by the Common Language Runtime component
of the framework at the moment the program is invoked, though it can be manually
performed at an earlier stage.
While there are currently over 40 languages with compilers for the .NET Framework,
only a small number of them are widely used and supported by Microsoft. The
remainder is composed of languages developed by third party vendors.
36 Cont…
ADO.NET
ASP.NET
37 Cont…
ASPX is a text file format used to create Webform pages; in programming jargon, the
ASPX file typically contains static HTML or XHTML markup, as well as markup
defining Web Controls and Web User Controls where the developer places all the
required static and dynamic content for the web page. Additionally, dynamic code
which runs on the server can be placed in a page within a block <% -- dynamic code
-- %> which is similar to other web development technologies such as PHP, JSP, and
ASP, but this practice is generally discouraged except for Databinding.
The recommended method for dealing with dynamic program code is to use the code-
behind model, which places this code in a separate file or in a specially designated
script tag. Code-behind files are typically named something to the effect of
MyPage.aspx.cs or MyPage.aspx.vb based on the ASPX file name (this practice is
automatic in Microsoft Visual Studio and other IDEs). When using this style of
programming, the developer writes code to respond to different events, like the page
being loaded, or a control being clicked, rather than a procedural walk through the
document.
Other files
Other file extensions associated with different versions of ASP.NET include:
38 Cont…
• config - web.config is the only file in a specific Web application to use this
extension by default (machine.config similarly affects the entire Web server and
all applications on it), however ASP.NET provides facilities to create and
consume other config files. These are stored in XML format, so as to allow
configuration changes to be made with simplicity.
• cs/vb - In ASP.NET 2 any cs/vb files placed inside the App_Code folder are
dynamically compiled and available to the whole application.
• master - Master Pages; introduced in version 2.0
• sitemap - sitemap configuration files
• skin - theme skin files
Performance
The ASPX and other resource files are placed in a virtual host on an Internet
Information Services ( or other compatible ASP.NET servers; see Other
Implementations, below ). The first time a client requests a page, the .NET
framework parses and compiles the file(s) into a .NET assembly and sends the
response; subsequent requests are served from the dll files.
Developers can also choose to pre-compile their code before deployment, eliminating
the need for just-in-time compilation in a production environment.
39 Cont…
Biliography:
Search engine:
Yahoo
Google
Altavista
40 Cont…