Visual Basic .NET: Visual Basic .NET by
History of Visual Basic: History of Visual Basic Microsoft first released Visual Basic in 1987.
first visual development tool from Microsoft
to compete with C, C++, Pascal and other well-known programming languages.
Visual Basic wasn't a hit at first until release 2.0
slowly people discovered the potential of the language
with release 3.0
it had become the fastest-growing programming language on the market. What Is Visual Basic.Net: What Is Visual Basic.Net Visual Basic. NET is an extension of Visual Basic
Visual Basic .Net is a true object oriented language therefore supports:
Visual Basic .NET was designed to take advantage of
the .NET Framework base classes
and runtime environment. Versions of Visual Basic .NET: Versions of Visual Basic .NET Visual Basic .NET 2002 (VB 7)
was released alongside Visual C# and ASP.NET in 2002.
Visual Basic .NET 2003 (VB 7.1)
was released with version 1.1 of the .NET Framework.
Visual Basic 2005 (VB 8.0)
the next iteration of Visual Basic .NET,
Visual Basic 2008 (VB 9.0)
will be released together with the Microsoft .NET Framework .3.5.
Visual Basic 'VBx' (VB 10.0)
also known as VBx, will offer support for the Dynamic Language Runtime. Inheritance: Inheritance Inheritance allows :
to build a hierarchy of related classes
and to reuse functionality defined in existing classes.
Implemented with the keyword “Inherits”
a class with the keyword "inherits”, is called a subclass
It automatically contains each and every member of its super class "virtually”
can have its own members too
Inheritance (contd): Inheritance (contd) single inheritance
a class can derive from only one base type.
VB .NET supports only single inheritance
more than two levels of inheritance (in the form of a chain of classes).
all the members of all super classes would automatically be available within the sub class. What is a Component?: What is a Component? Component is a compiled set of classes that support the services provided by the component.
the classes expose their services through the properties, methods, and events that comprise the component's interface
built as DLLs
run within the process space of the host application
tend to run faster
have an EXE file name extension
run as independent processes outside of the client application
more stable than In-Process Components
Component Reuse: Component Reuse
Facilities for Component Reuse:
By simply adding a reference to a COM component
it is instanced and called as though it is a .NET component
saves a huge amount of re-development time
.Net provides a good framework for code libraries
components can be easily adapted /modified by the programmer
Components are particularly useful for developing GUI’s
Degree of Component Reuse:
A whole application can be put together using the components itself Class reuse : Class reuse Visual Basic.Net is Object-Oriented thus involves objects in some way or other
everything is based on the Object Class.
Controls, Forms, Modules, etc are all types of classes.
VB.Net comes with
thousands of built-in classes
which are ready to be used
kept in namespace called System
all other namespaces are based on this System namespace
namespaces can be included in the code with the keyword import followed by the namespace
Class Reuse (contd): Class Reuse (contd) Some Namespaces and their use:
System: Includes essential classes and base classes for commonly used data types, events, exceptions and so on System.Collections: Includes classes and interfaces that define various collection of objects such as list, queues, hash tables, arrays, etc System.Data: Includes classes which lets us handle data from data sources System.Data.OleDb: Includes classes that support the OLEDB .NET provider System.Data.SqlClient: Includes classes that support the SQL Server .NET provider System.Diagnostics: Includes classes that allow to debug our application and to step through our code System.Drawing: Provides access to drawing methods System.Globalization: Includes classes that specify culture-related information System.IO: Includes classes for data access with Files System.Net: Provides interface to protocols used on the internet System.Reflection: Includes classes and interfaces that return information about types, methods and fields System.Security: Includes classes to support the structure of common language runtime security system System.Threading: Includes classes and interfaces to support multithreaded applications System.Web: Includes classes and interfaces that support browser-server communication System.Web.Services: Includes classes that let us build and use Web Services System.Windows.Forms: Includes classes for creating Windows based forms System.XML: Includes classes for XML support Information Hiding: Information Hiding reduces software development risk
by shifting the code's dependency on an uncertain implementation onto a well-defined interface.
no other class has knowledge about attributes and/or behavior of the hidden class
unless published explicitly (by the class).
Information Hiding (contd): Information Hiding (contd) Information hiding in Visual Basic. Net
can be implemented using keywords public and private
Private keyword :
Used for attributes and behaviors
hides them from the world outside of the class.
Public keyword :
Used for properties and methods
other objects can access them
yet know nothing about their implementation.
Usability: Usability Visual Basic .NET
the easiest, most productive language, and tool for rapidly building Windows and Web applications.
People with very little programming experience can also develop powerful Windows applications
Since the real hard code is already written
makes life far easier
so what could take days in other PLs can be done in hours with VB.
GUI Development: GUI Development Developing GUI applications with VB is a 3-step approach:
Design the appearance of application
Assign property settings to the objects of the program
Write the code to direct specific tasks at runtime
GUI Development (contd) Toolbox Window: GUI Development (contd) Toolbox Window gives us access to all
GUI Development (contd)Properties Window: GUI Development (contd) Properties Window allows us to set properties
for various objects at
GUI Development (contd) Code design window: GUI Development (contd) Code design window opens when we double-click on a form or any control
allows us to edit and write code.
Web Development : Web Development VB.Net supports web development
The IDE is capable of the following:
ASP .NET Web Application:
allows to create web-based applications using IIS.
can create web pages,
ASP .NET Web Service:
- allows to create XML Web Services. Reality-Cost: Reality-Cost
Visual Studio 2005 Express Edition Free
Visual Basic .Net 2003 Standard Edition $149.99- 179.99
Visual Studio 2005 Standard Edition $199.00- $299
Visual Studio 2005 Professional Edition $549.00- $ 799.00
Various Visual Studio Team Editions for:
Database Professionals $2,309.00
Software Architects $2299.00
Software Developers $5469.00
Pros of Visual Basic. Net are
Can build applications very rapidly
full access to the capabilities available in .NET Framework 1.1.
can call components running on any platform using open Internet protocols
can develop mobile Web applications for Internet-enabled mobile devices
can create reusable, enterprise-class code using full object-oriented constructs.
also enables you to leverage your existing code assets
Cons: Cons Microsoft supplies
an automated VB6-to-VB.NET converter with Visual Studio .NET
but cannot convert all code
VB7 has large runtime as compared to VB6 runtime
Large class library Thank You All !!!: Thank You All !!! References: