You are on page 1of 57

.

NET Components

.NET Components

Main Menu 1 of 57
.NET Components

Objective
 At the end of this chapter students will be able to
understand different .NET components of the .NET
Framework

Main Menu 2 of 57
.NET Components

Scope
 Introduction
 Visual Studio .NET
 Shared Integrated Development Environment
 Different windows of Visual Studio .NET
 Windows Management
 Languages
 Technology

Main Menu 3 of 57
.NET Components

Introduction
 The .NET Framework is language-neutral; virtually
any language can target the .NET Framework. .NET
Framework supports a number of languages,
including C++, Visual Basic .NET, JScript, and C#.
A large number of third-party languages will also be
available for building .NET Framework applications.
These languages include COBOL, Eiffel, Perl,
Python, Smalltalk, and others. This chapter will
discuss the tool, technology and some of the
languages supported by Microsoft’s .NET
Framework.
Main Menu 4 of 57
.NET Components

Tools
 The Microsoft .NET Framework Software
Development Kit (SDK) tools are designed to make
application development easier to create, deploy, and
manage applications and components that target the
.NET Framework. There are many tools that come
with the .NET Framework SDK. Visual Studio .NET
is one of the tool that ship with the .NET
Framework.

Main Menu 5 of 57
.NET Components

Visual Studio .NET


 Visual Studio .NET is an upgraded version of Visual
Studio which has several new features. It combines
the best of the various IDEs that were previously
used. The general look and feel is similar to VB 6
IDE with a difference

Main Menu 6 of 57
.NET Components

Visual Studio .NET


 Unlike previous Visual Studio, in Visual Studio.
NET, exactly the same IDE is used for all Visual
Studio .NET compliant languages. This IDE is
designed to manage projects that accommodate more
than one language at a time.

Main Menu 7 of 57
.NET Components

Visual Studio .NET


 Visual Studio .NET is a complete set of
development tools for building Web based
applications, XML Web services, desktop
applications, and mobile applications. Visual
Basic .NET, Visual C++ , and Visual C# all use the
same integrated development environment (IDE)

Main Menu 8 of 57
.NET Components

Shared Integrated Development


Environment
 .NET Framework supported languages are hosted
within the Visual Studio .NET integrated
development environment. Sharing a single IDE for
a range of language provides many advantages like
without exiting the open project which may be
written in Visual Basic one can start writing code
using another language like C#.

Main Menu 9 of 57
.NET Components

Start Page of Visual Studio .NET


 Start Page provides a quick way to set the user
preferences including keyboard scheme, windows
layout and help filter as shown below. It will also
allow setting the startup page when the Visual
Studio starts and many other features.

Main Menu 10 of 57
.NET Components

Start Page of Visual Studio .NET

Main Menu 11 of 57
.NET Components

Start Page of Visual Studio .NET


 With the help of “Start Page” one can also view the
latest articles, events, topics on .NET and many
other services like where to host web services etc..,
on the internet via the link provided on the left side
of the screen. “Start Page” also gives the links to the
latest project being developed in addition to the
option of creating of new project and opening an
existing project. Within IDE a web page can also be
displayed using View -> Show Browser -> Web
Browser menu. When the button with the label
“New Project” selected the following window will
appear: Main Menu 12 of 57
.NET Components

Start Page of Visual Studio .NET

Main Menu 13 of 57
.NET Components

Start Page of Visual Studio .NET


 The left side of this screen gives the option to
choose the type of the project to be created.
Depending on the options selected during
installation of Visual Studio environment, one can
choose from a Visual Basic .NET, C#, C++, and
possibly other programming languages.

Main Menu 14 of 57
.NET Components

Start Page of Visual Studio .NET


 The right side of this screen, gives the option to
choose a default template for the type of project that
will be created. There are many different templates
to choose from. The table given below provides a
list of some of these project template types.

Main Menu 15 of 57
.NET Components

Start Page of Visual Studio .NET


Project Type Description

Windows Application Template for creating a normal windows application

Class Library Template for Creating classes that will be used in other application

Control Library Template for creating controls that will be used on Windows Forms.

ASP.NET Web Application Template for creating a Web site with static or dynamic HTML pages as
the user interface.

ASP.NET Web Services Template for creating Web Services that can be called through XML
SOAP interfaces.

Web Control Library Template for creating user’s own controls that will be called from Web
applications.

Console Application Template creating command-line applications.

Windows Services Template for creating user’s own service that runs in the Windows
environment.

Empty Project/Empty Web project Creates an empty project that a developer can use to build a project. No
templates supplied.

Main Menu 16 of 57
.NET Components

Solution Explorer
 Solution Explorer displays an organized list of
projects as well as the files and directories that are
part of the current solution. The solution can consist
of projects in different languages.

Main Menu 17 of 57
.NET Components

Command Window
 The Command Window is a synergy of a command
line and Visual Basic’s immediate window.
Command Window can be activated by using View -
> Other Window -> Command Window. Command
Window has two modes – Command Mode and
Immediate Mode. The Command Mode is used to
execute command directly in the Visual Studio .NET
environment bypassing the other commands which
are executed through the menu option.

Main Menu 18 of 57
.NET Components

Command Window
 When the Command Window is in Command Mode
its title bar displays the text “Command Window”
and the greater than symbol (>) appears in the
window as a prompt for new lines whereas if the
Command window is in Immediate Mode its title bar
displays the text “Command Window – Immediate”.
 The Immediate Mode is used to execute code
statements, set or assign values to the variables,
evaluate expressions and many more.

Main Menu 19 of 57
.NET Components

Command Window
 To switch into the Immediate Mode from Command
mode enter “immed” into the Command Window
without the greater than sign (>), whereas to switch
into the Command Mode from Immediate Mode
enter “>cmd” into the command window.

Main Menu 20 of 57
.NET Components

Server Explorer
 As the development has become more server-centric,
developers have a greater need to discover and
manipulate services on the net. The Server Explorer,
a new feature of Visual Studio.NET makes it easier.
Through this a wide variety of server resources that
are available for use can be seen as shown below.
Even services can be restarted and stopped on the
server using Server Explorer. This window can be
selected from View | Server Explorer

Main Menu 21 of 57
.NET Components

Dynamic Help
 This option can be selected from Help | Dynamic
Help
 Dynamic Help provides appropriate help on a single
click. It provides pointers to relevant information
specific to the current development task.

Main Menu 22 of 57
.NET Components

Enhanced IntelliSense
 Web Developers can get immediate help on tags,
properties and even values within the code editor
using the IntelliSense technology. Developer can
gain benefits of automatic statement completion and
syntax notifications when they write their code.

Main Menu 23 of 57
.NET Components

Window Management
 Various information windows in Visual Studio.NET
are dockable. When developers edit multiple
documents in the editor or designer, all the
documents appear as tabs on the top. Back and
Forward button allows developers to navigate
through the open windows in the environment.
Visual Studio.NET provides support for multiple
screens so that more windows can be opened at the
same time without sacrificing screen space.

Main Menu 24 of 57
.NET Components

Designer
 Designers can be selected from Tools | Options.
HTML Designer
 HTML Designer is a graphical way to develop

HTML pages, ASPs and ASP.NET web forms


without delving into HTML or script code.
Windows Forms Designer
 Using the Windows Forms Designer, rich Windows-

based applications can be developed.

Main Menu 25 of 57
.NET Components

Designer
Component Designer
 Server side components can be built quickly and
graphically using the Component Designer of Visual
Studio.NET. It applies the concepts of Rapid
Application Development form-based programming
to build middle-tier objects - a visual way for
building non-visual objects.
 Instead of writing lots of server-based code,
developers can drag and drop server components to
the design surface that will run on the server.

Main Menu 26 of 57
.NET Components

Designer
XML Designer
 The XML Designer provides tools for working with

XML and XSD files. Developers can create and edit


XML files and XSD schemas.
 Visual Studio .NET does not only have designer for

visual modules, but components also have a


designer. With the Component Designer, elements
from the toolbox can be dragged and dropped onto
the design surface. They receive a default name and
have logic automatically generated to integrate them
into the component.
Main Menu 27 of 57
.NET Components

Other Features
 Web Hosting:
 Developers wanting to deploy web applications and
XML web services by using Visual Studio.NET will
be at ease by the inclusion of new Web Hosting tab
on the Start page in Visual Studio.NET. The Web
Hosting tab gives developers access to a list of
ASP.NET Web hosters to provide free Web space
and are integrated with Visual Studio.NET to
facilitate the deployment of completed applications
through a wizard.
Main Menu 28 of 57
.NET Components

Other Features
 Third-party downloads:
 Hundreds of software component vendors, training
companies and other partners have already adopted
and created .NET based software that is available for
developers to extend their solutions with Visual
Studio.NET. These third party resources can easily
be found on the What’s New tab on the Start page in
Visual Studio.NET.

Main Menu 29 of 57
.NET Components

Other Features
 It provides a place for developers to learn about the
new features in Visual Studio.NET as well as a place
to learn about the third party vendors providing
developer tools, languages, controls that work with
and integrate with Visual Studio.NET.

Main Menu 30 of 57
.NET Components

Other Features
 Efficient Message Delivery:
 Microsoft Message Queuing (MSMQ) makes it easy
for developers to communicate with the application
programs quickly, reliably by sending and receiving
messages.

Main Menu 31 of 57
.NET Components

Dynamic Property Change


 Tools such as Notepad, the built-in XML editor in
VS.NET can be used to edit the properties and
change the values.

Main Menu 32 of 57
.NET Components

Languages
 This section discusses the Visual Studio .NET
compliant language. These language include Visual
C#, Visual Studio .NE and many more.

Main Menu 33 of 57
.NET Components

Visual C#
 Visual C# is a new language which runs inside the
.NET Framework. It is a simple, modern, object
oriented and type safe programming language
derived from C and C++. It is firmly planted in the C
and C++ family tree of languages and has a heritage
of Visual C++ that is expected to enable many of C
and C++ developers to use their existing skills to
rapidly develop sophisticated XML based
application. The key features are:
 Enhanced productivity, Complete access to the
underlying platform and Low-level code control
Main Menu 34 of 57
.NET Components

Visual Basic .NET


 VB .NET provides much new functionality: new
object capabilities and new web capabilities head the
list.
 Complete object-oriented capabilities
 Language capabilities like structured error handling
and free threading
 Adjustment of Visual Basic to CLS (Common
Language Specification) and CTS (Common Type
System)
 Better web interface capabilities
Main Menu 35 of 57
.NET Components

Web Interfaces in VB.NET


 Visual Basic is the most used tool for component
development. DHTML pages and WebClasses in VB
6 never caught on. Developers stuck to ASP for
actual user interface manipulation. Today, by
introducing the .NET Framework, Microsoft has
opened a new option for web development.

Main Menu 36 of 57
.NET Components

Web Interfaces in VB.NET


 With VB.NET, web development is as easy as drag-
and-drop. The .NET Framework includes Web
Forms that provides such capability. Web forms
work in Visual Basic the same way as with any
.NET language. A design surface will have web
controls that resemble the normal form controls.
There is an HTML page containing positioning and
formatting information for the page and a code
module containing routines that can be attached to
the page. Some of these routines could be the event
routines that get fired by the web controls. Thus,
Web Forms and Server Controls make them work.
Main Menu 37 of 57
.NET Components

Technology
 Visual Studio also supports some technology which
are given below. With the help of Visual Studio
.NET a developer can create a robust application,
windows services or web services.

Main Menu 38 of 57
.NET Components

Win Forms
 Because of .NET Framework, it becomes easy to
develop web-based applications, however not all
applications will run on the web. So this is where
Windows Forms comes in. Windows Form or
WinForms is a forms package that .NET uses to
build Windows based applications. WinForms are
set of classes and incorporate .NET platform’s
technologies, such as object-oriented design,
security, managed execution and support for
building data-aware applications based on
ADO.NET.
Main Menu 39 of 57
.NET Components

Win Forms
 All the controls in the WinForms will have certain
properties and events attached to them that a
developer can work upon. There are certain
enhancements made in the properties and events
from previous Forms.

Main Menu 40 of 57
.NET Components

Web Forms
 Now days, applications that deal with the World
Wide Web are more widely created. Therefore
programmers have moved to Active Server Pages
(ASP) technology as a means to develop web
applications. Web forms are a part of the ASP.NET
technology. They allow the programmer to develop
web pages that combine visual HTML forms with
server side code.

Main Menu 41 of 57
.NET Components

Web Forms
 Visual Studio .NET takes full advantage of Web
Forms, one of the key new technologies in the .NET
Framework. With Web Forms, Visual Studio .NET
addresses the difference between the techniques
used to build desktop applications and those used to
create Web applications. With Visual Studio .NET
and Web Forms, developers can rapidly develop
cross-platform, cross-browser programmable Web
applications using the very same techniques
previously utilized to build form-based desktop
applications.
Main Menu 42 of 57
.NET Components

Web Forms
 A standard Web Forms page consists of a Web Form
"markup" file containing the visual, XML-based
representation of the page (HTML, WML, XML,
etc.), and a source file with event handling code. The
source is compiled into executable code providing
fast runtime performance. Both files reside and
execute on the server where they generate a Web
page that is sent to the client.

Main Menu 43 of 57
.NET Components

Web Forms
 The page can be generated as pure HTML, which
means it can be viewed on any platform, with any
browser. Or it can target the special capabilities of a
specific browser. It can even be targeted to mobile
devices that support WML and WAP, using the
Adaptive UI Controls, all while using the same
business logic on the server.

Main Menu 44 of 57
.NET Components

ADO.NET
 ADO.NET is designed with the goal of better
serving the data access needs of web applications.
ADO.NET is designed to be data-centric, non-
database-centric, focused on handling disconnected
data sets, and tightly integrated with XML. It
enables better data sharing capabilities between
components and tiers in an application.

Main Menu 45 of 57
.NET Components

ADO.NET
 The .NET Data Provider object group contains
objects for accessing SQL Server and OLEDB data
sources and includes Connection and Command
objects that are similar to their ADO counterparts. A
.NET data provider is used for connecting to a
database, executing commands, and retrieving
results. Those results are either processed directly, or
placed in an ADO.NET DataSet in order to be
exposed to the user.

Main Menu 46 of 57
.NET Components

Web Services
 Web Services are the component that runs on the
server and typically include business logic.

Main Menu 47 of 57
.NET Components

Advent of Web Services


 Before discussing .NET further in detail, shall learn
what Web Services are and then will see how .NET
relates to web services.
 Historically, developers built applications by
integrating local system services. This model gave
developers access to a rich set of development
resources and precise control over how the
application would behave.

Main Menu 48 of 57
.NET Components

Advent of Web Services


 A Web Service represents a black box functionality
that can be reused without worrying about how the
service is implemented. They provide well-defined
interfaces that describe the services provided.
Developers can assemble applications using a
combination of remote services, local services and
custom code.

Main Menu 49 of 57
.NET Components

Advent of Web Services


 For example, a company might assemble an online
store using Microsoft’s Passport service to
authenticate users, a third party personalization
service to adapt web pages to each user’s
preferences, a credit card processing service,
package tracking services from each shipping
company, an in-house catalog service that connects
to the company’s internal inventory management
applications, and a bit of custom code to make sure
that their store stands out from the crowd.

Main Menu 50 of 57
.NET Components

.NET and Web Services


 .NET is founded on this principle of web services.
Through .NET, Microsoft is providing the
infrastructure to enable the evolution of web services
through each of the pieces of .NET platform.
 It allows applications to use straightforward code to
access and utilize web-based services. The web
servers can thus easily expose their services to
external applications.

Main Menu 51 of 57
.NET Components

.NET and Web Services


 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.

Main Menu 52 of 57
.NET Components

Summary
Key points covered in this chapter are:
 Visual Studio.NET (VS.NET) is a powerful

development tool and provides an IDE for various


different languages.
 Visual Studio.NET does not only have designer for

visual modules, but components also have a designer


 VS.NET the development process substantially

easier and more productive by providing a drag-and-


drop rapid application development solution for
developers
Main Menu 53 of 57
.NET Components

Summary
 C# is a simple, modern, object oriented and type safe
programming language derived from C and C++.
 ASP.NET's brings a language-independent way of
creating components and dynamic web applications
that can produce output on any platform or device.
 ADO.NET works with data in a disconnected way
under .NET Framework’s stateless distributed web
model.
 ADO.NET is specifically designed to operate in 3-
tier environment.
Main Menu 54 of 57
.NET Components

Self Assessment
Fill in the blanks:

Solution Explorer displays an organized list of projects
__________________
 Command and
Command Window has two modes – _____________
Immediate mode
__________________
 The TaskList
_____________ can show all current syntax errors in the
current code
 The XMLDesigner
_____________ provides tools for working with XML
and XSD files.
 EventLogs supply the user interface for viewing the logs
____________
and a programming interface for examining the logs.

Main Menu 55 of 57
.NET Components

Self Assessment
State True or False:
 The standard VB form has been replaced by Web

Form. True
 The Command Mode is used to execute command

directly in the Visual Studio .NET environment


which are not supported in the menu option of the
VS.NET. True
 A wide variety of server resources that are available

for use can be seen with help of Solution Explorer.


True

Main Menu 56 of 57
.NET Components

Self Assessment
State True or False:
 Microsoft Message Queuing (MSMQ) makes it easy

for developers to communicate with the application


programs quickly. True
 C# aims to combine the high productivity of Visual

Basic and the raw power of C++. True

Main Menu 57 of 57

You might also like