1. The class library is object oriented, providing types from which your own
managed code can derive functionality. This not only makes the .NET
Framework types easy to use, but also reduces the time associated with learning
new features of the .NET Framework.
2. An object-oriented class library, the .NET Framework types enable you to
accomplish a range of common programming tasks, including tasks such as
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).
• ASP.NET applications.
• XML Web services.
• Windows services.
Interoperability:
An abstract class is a class in which one or more methods Are declared but not
defined.
There are situations in which you will Want to define a superclass that only
defines a generalized form shared by all subclasses,leaving it to each subclass to
fill in the details.
InterFace
An interface defines a contract for behaviour.It defines the members that will be
exposed through the interface,and the parameters and return types of those
members.Any object that implements an interface can interact with any object that
requires that interface.Both classes and structures can implement interfaces
including multiple interfaces.
An interface contains only the signatures of methods, delegates or events. The
implementation of the methods is done in the class that implements the interface
dynamically linked libraries (DLLs), and even end in the .dll extension.
The main difference between .NET and non-.NET DLLs is that .NET
DLLs are not compiled into machine language. Rather, they are
• The using directive means you do not need to specify the name of the
namespace for every class.
The main advantage of using namespaces is, to avoid conflicts when you have
multiple classes with the same name. For example, .NET comes with a class called
'Form'. Suppose you also write another class called 'Form' in your application and
if you refer to the class 'Form', how does the compiler know which Form you are
refering to ?
Namespaces allow you to avoid name conflicts!
All classes in .NET class library are grouped into namespaces. You can use all the
classes using the fully qualified name, including the namespace also along with the
class name.
• System.Windows.Forms.Form
• System.String
.NET Namespaces
Here is a list of some of the namespaces in .NET class library.
• System
• System.Xml
• System.Data
• System.Data.OleDb
• System.Data.SqlClient
Introduction To .NET
What is .NET?
1.The overall vision of Microsoft .NET is to create a common platform for building
applications that can be delivered as reusable, interoperable services over the
Internet and corporate intranets.
5. The programming language support of .NET allows easy and consistent access to
any other component, regardless of what programming language it was developed
in. A VB application can call a method in a component written in C++, and can
catch events from an application written in COBOL. And none of these participants
would know each other’s language.Microsoft .NET initiative basically revolves
around the .NET Framework that encompasses the actual language, and execution
platform. It also has extensive class libraries providing rich built-in functionality.
6.The .NET framework embraces XML andSOAP to provide integration of software
over the Internet. There is also a family of server-based products called .NET
Enterprise Servers. These are nothing but next generation of Microsoft BackOffice
and are a part of .NET strategy, however, they are not built on the .NET framework.
They have a major role to play in future software development projects. When
actual .NET framework projects are developed, most of these will depend on the
technologies in the .NET Enterprise Servers for functions like data storage and
messaging
4. Services provided by a web service are in terms of messages the web service
accepts and generates rather than how the service is implemented. Thus, by
focusing totally on messages, web services are language, platform and object
agnostic. A web service can be implemented using any programming language,
object model and platform. This service can be consumed by applications written in
any language for any platform.
5. The interfaces provided by the web services are called contracts. This contract
explains the capabilities of the service, message sequences and protocols it
expects. As long as these are honored, a web service can be implemented.
The minimum infrastructure required for implementing web services model is low to
ensure that these can be implemented and accessed from any platform, using any
technology and any programming language.
6. The web service and the web service consumer should rely on standard ways to
represent the data and commands, web service interfaces (contracts) and to figure
out what service does a web service offer.
Such thing is possible by using XML and SOAP. XML (eXtensible Markup Language)
represents a way to describe information so that it is easy to programmatically
extract the information needed. SOAP (Simple Object Access Protocol) is an
industry standard for using XML to represent data and commands in extensible
way.
Ex:-In our shopping cart example, if the credit card company provided a SOAP
interface , you would be able to post to it, a standard request for services, and it
would send back information that will tell which interfaces it provided and how to
structure a request to one of those interfaces. Such interfaces make it easier to
connect and utilize the services that other web sites provide.
This is where Microsoft .NET comes in that uses XML extensively to facilitate data
interchange between different computer systems.
The server that is providing the services or the client applications and web sites
that are utilizing these services do not have to be necessarily written using .NET. It
is just that .NET platform will make a lot easier to develop these applications.
The entire .NET plan of Microsoft is based on XML that helps create a common
format to send and transfer data over a network. Microsoft wants everyone from
software developers to software users to use XML technology for transferring data
over the web.
Program Interfaces
Web Services
Till now, applications are a piece of software that access basic operating system
services such as file system and graphics etc and database services. Web services
are the next step in this direction. In web services, software functionality is
exposed as a service that does not have any concern with the consumer of the
service. In .NET, web services are implemented as a part of ASP.NET that handles
all web interfaces. It allows programs to talk to each other directly over the web.
The goal of the Microsoft .NET Framework is to make it easy to build Web
applications and web services. It covers all the layers of software development from
operating system up. It provides the richest level of integration among presentation
technologies, component technologies and data technologies, particularly on a
Microsoft platform. .NET wraps the operating system, insulating software developed
with .NET from most operating system specifics such as file handling and memory
allocation. Thus, software developed for .NET is portable to a wide variety of
hardware and operating system foundations. Fig. 1.1 shows the Microsoft .NET
Framework architecture.
2.The framework also includes a set of class libraries that developers can use from
any Programming language.
3.Above that are various programming models that provide components and
services for Developing web sites and web services. It includes user and program
interfaces. Windows Forms and Web Forms provide a powerful user interface for the
web.
System Services includes COM+ services and Windows API:-
• Almost all the web services need to work with the data. The data can be in
simple files, relational Databases or any other type of data stores. Services
framework includes ActiveX Data Objects .NET (ADO.NET) class library to
provide data access. ADO.NET has evolved from ADO and is designed to
provide data access services for scalable web applications and services.
• Using ADO.NET, any data – regardless of how is it stored – can be
manipulated as XML or relational data; whichever is most appropriate for the
application at a given point of time. It provides APIs for connected cursor
style data access as well as disconnected data model.
• ADO.NET contains classes for connecting to, issuing commands against, and
retrieving data from data stores. These classes are implemented by managed
data providers. .NET framework has managed data providers for MS-SQL
Server and any data store that can be accessed via OLE DB. ADO.NET has
introduced Dataset. A Dataset is an in-memory data cache providing a
relational view of the data. The Dataset knows the source of data. It
can be created and populated programmatically or by loading data from a
data store. No matter where the data comes from, it is manipulated using the
same programming model and uses the same underlying cache.
• Managed data providers expose a Dataset Command object for interfacing
between data stores and Datasets. This object uses other objects inside it to
fill datasets from the data stores .A new class called XMLReaders exposes
efficient stream access to XML data. Since all data can be viewed as XML,
developers can take advantage of ADO.NET transformation and validation
services for any data.
4. What is the difference between Web Forms and Win Forms?
On top of the services framework, .NET provides three ways to render and manage
user interfaces (Windows Forms, Web Forms and Console Applications), and one
way to handle interfaces with remote components (Web Services).
User Interfaces
Win Forms
Win Forms are also called as windows Forms. These are descended from Windows
Foundation Classes (WFC) originally created for J++.Win Forms are actually the
part of the framework classes in the System.Winforms namespace, which them
available to all languages based on .NET framework. The drag and drop designer of
Win Forms can be used to design forms visually with any .NET language.
For writing, client applications for Windows, Win Forms can be used. By doing
this, the developers have an advantage of using al the rich user interfaces features
of Windows, including existing ActiveX controls, new features of Win 2000, such as
transparent,layered and floating windows. The framework security model can safely
execute applications and components on client machines provided they are written
using WinForms or used from a Win Forms application.
Moreover, a win forms based application can easily be installed and updated with a
simple XCOPY deployment and no registration issues like Visual Basic forms.
Web Forms
Web forms are a part of ASP.NET. They provide a web browser based user
interface.These consist of two parts:
• A template containing HTML based layout information for all user interface
elements and
• A component that contains all logic to be hooked to the user interface. They
have a lot of built-in intelligence. Controls on Web Forms run on the server
but make their presence known on the client. These can look and behave like
Win32 interfaces. They can deal with different browsers, optimizing their
output for each particular browser.
Like Win Forms, Web Forms are also available to all the languages of the
.NET framework.Like we have controls in Visual Basic, similarly, the controls in
Web Forms are called server-side controls. They create a proxy on the server
for a user interface element that is on a Web Form or ASP. It communicates with
local logic as necessary and renders its own user interface as HTML as necessary in
any pages that are sent out containing the control.
These controls need intelligence for rendering HTML for different types of
browsers and coordinating events with the client on which the page is
running. Also, these controls can manage their own state. Thus, when
every time the page is refreshed, there is no need to write the code to
reload state information into HTML controls.
Microsoft .NET initiative basically revolves around the .NET Framework that
encompasses the actual language, and execution platform. It also has
extensive class libraries providing rich built-in functionality. The .NET framework
embraces XML and SOAP to provide integration of software over the Internet. There
is also a family of server-based products called .NET Enterprise Servers. These are
nothing but next generation of Microsoft BackOffice and are a part of .NET strategy,
however, they are not built on the .NET framework. They have a major role to play
in future software development projects. When actual .NET framework projects are
developed, most of these will depend on the technologies in the .NET Enterprise
Servers for functions like data storage and messaging.
Microsoft is combining the Integrated Development Environment (IDE) for all their
languages into one code base. It has opened up the IDE for other languages. Any
third party vendor can license the technology to have the language work within
the .NET framework and place their language in Visual Studio IDE.
Developers
Lives of people responsible for installing and maintaining infrastructures have been
made simpler by .NET. By alleviating DLL hassles and many other deployment
problems, infrastructure workers are relieved from frustrating and tedious
aspects of Microsoft Platform deployment.
End Users
Benefits of .NET
• Faster development
• Lots of built-in functionality through rich object model
• Variety of ways to interface and integrate with the outside world
• More reuse
• Easy to integrate different languages into one system
• Easier deployment
• Scalability
• Easy to build sophisticated tools
• Interfaces well to existing software
• Fewer bugs due to use of CLR
.NET – Downsides