• Embed Doc
  • Readcast
  • Collections
  • 1
    CommentGo Back
Download
 
VB Language
 Visual Basic, the name makes me feel that it is something special. In the History of Computing world no other product sold more copies than Visual Basic did. Such isthe importance of that language which clearly states how widely it is used fordeveloping applications. Visual Basic is very popular for it's friendly working(graphical) environment. Visual Basic. NET is an extension of Visual Basicprogramming language with many new features in it. The changes from VB to VB.NET are huge, ranging from the change in syntax of the language to the types of projects we can create now and the way we design applications. Visual Basic .NETwas designed to take advantage of the .NET Framework base classes and runtimeenvironment. It comes with power packed features that simplify applicationdevelopment.
Briefly on some changes:
The biggest change from VB to VB .NET is, VB .NET is Object-Oriented now. VB.NET now supports all the key OOP features like Inheritance, Polymorphism,Abstraction and Encapsulation. We can now create classes and objects, deriveclasses from other classes and so on. The major advantage of OOP is code reusabilityThe Command Button now is Button and the TextBox is TextBox instead of Textas in VB6Many new controls have been added to the toolbar to make applicationdevelopment more efficientVB .NET now adds Console Applications to it apart from Windows and WebApplications. Console applications are console oriented applications that run in theDOS versionAll the built-in VB functionality now is encapsulated in a Namespace (collection of different classes) called SystemNew keywords are added and old one's are either removed or renamedVB .NET is strongly typed which means that we need to declare all the variables bydefault before using themVB .NET now supports structured exception handling using Try...Catch...FinallysyntaxThe syntax for procedures is changed. Get and Let are replaced by Get and SetEvent handling procedures are now passed only two parametersThe way we handle data with databases is changed as well. VB .NET now uses ADO.NET, a new data handling model to communicate with databases on local machinesor on a network and also it makes handling of data on the Internet easy. All the datain ADO .NET is represented in XML format and is exchanged in the same format.Representing data in XML format allows us for sending large amounts of data on theInternet and it also reduces network traffic when communicating with the databaseVB .NET now supports Multithreading. A threaded application allows to do numberof different things at once, running different execution threads allowing to usesystem resourcesWeb Development is now an integral part of VB .NET making Web Forms and WebServices two major types of applications
Namespaces
A namespace is a collection of different classes. All VB applications are developedusing classes from the .NET System namespace. The namespace with all the built-in
 
VB functionality is theSystemnamespace. All other namespaces are based on thisSystem namespace.Some Namespaces and their use:System: Includes essential classes and base classes for commonly used data types,events, exceptions and so onSystem.Collections: Includes classes and interfaces that define various collection of objects such as list, queues,hash tables, arrays, etcSystem.Data: Includes classes which lets us handle data from data sourcesSystem.Data.OleDb: Includes classes that support the OLEDB .NET providerSystem.Data.SqlClient: Includes classes that support the SQL Server .NET providerSystem.Diagnostics: Includes classes that allow to debug our application and to stepthrough our codeSystem.Drawing: Provides access to drawing methodsSystem.Globalization: Includes classes that specify culture-related informationSystem.IO: Includes classes for data access with FilesSystem.Net: Provides interface to protocols used on the internetSystem.Reflection: Includes classes and interfaces that return information abouttypes, methods and fieldsSystem.Security: Includes classes to support the structure of common languageruntime security systemSystem.Threading: Includes classes and interfaces to support multithreadedapplicationsSystem.Web: Includes classes and interfaces that support browser-servercommunicationSystem.Web.Services: Includes classes that let us build and use Web ServicesSystem.Windows.Forms: Includes classes for creating Windows based formsSystem.XML: Includes classes for XML support
Assemblies
 An assembly is thebuilding blockof a .NET application. It is a self describingcollection of code, resources, and metadata (data about data, example, name, size,version of a file is metadata about that file). An Assembly is a complied andversioned collection of code and metadata that forms an atomic functional unit.Assemblies take the form of a dynamic link library (.dll) file or executable programfile (.exe) but they differ as they contain the information found in a type library andthe information about everything else needed to use an application or component.All .NET programs are constructed from these Assemblies. Assemblies are made of two parts:manifest, contains information about what is contained within theassembly andmodules, internal files of ILcode which are ready to run. When programming, we don't directly deal with assemblies as the CLR and the .NETframework takes care of that behind the scenes. The assembly file is visible in theSolution Explorer window of the project.An assembly includes:
o
 
Information for each public class or type used in the assembly – informationincludes class or type names, the classes from which an individual class is derived,etc
 
o
 
Information on all public methods in each class, like, the method name andreturn values (if any)
o
 
Information on every public parameter for each method like the parameter'sname and type
o
 
Information on public enumerations including names and values
o
 
Information on the assembly version (each assembly has a specific versionnumber)
o
 
Intermediate language code to execute
o
 
A list of types exposed by the assembly and list of other assemblies requiredby the assemblyImage of a Assembly file is displayed below.
OOP with VB
 
OOP Basics
 Visual Basic was Object-Based, Visual Basic .NET isObject-Oriented, which meansthat it's a true Object-Oriented Programming Language. Visual Basic .NET supportsall the key OOP features likePolymorphism,Inheritance,Abstractionand Encapsulation.It's worth having a brief overview of OOP before starting OOP withVB.
Why Object Oriented approach?
 A major factor in the invention of Object-Oriented approach is to remove some of theflaws encountered with the procedural approach. In OOP, data is treated as a criticalelement and does not allow it to flow freely. It bounds data closely to the functionsthat operate on it and protects it from accidental modification from outside functions.OOP allows decomposition of a problem into a number of entities called objects andthen builds data and functions around these objects. A major advantage of OOP iscode reusability.Some important features of Object Oriented programming are as follows:
o
 
Emphasis on data rather than procedure
o
 
Programs are divided into Objects
o
 
Data is hidden and cannot be accessed by external functions
o
 
Objects can communicate with each other through functions
o
 
New data and functions can be easily added whenever necessary
o
 
Follows bottom-up approach
Concepts of OOP:
 
o
 
Objects
o
 
Classes
o
 
Data Abstraction and Encapsulation
o
 
Inheritance
o
 
Polymorphism
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
07 / 13 / 2010<span class="translation_missing">en_US, this_document_made_it_onto_the</span>Rising List!
You must be to leave a comment.
Submit
Characters: ...