This document provides an overview of Visual Basic .NET (VB.NET): - VB.NET is an object-oriented programming language developed by Microsoft that is implemented on the .NET framework. It is not backwards compatible with older VB versions. - VB.NET supports object-oriented concepts and everything is an object that inherits from the base Object class. It has full access to libraries in the .NET Framework. - The .NET Framework consists of components like the Common Language Runtime and Class Library that enable multi-platform applications to be developed from languages like VB.NET.
Overview • Visual Basic.NET (VB.NET) is an object-oriented computer programming language developed by Microsoft and implemented on the .NET Framework. • Although it is an evolution of classic Visual Basic language, it is not backwards- compatible with VB6, and any code written in the old version does not compile under VB.NET. • Like all other .NET languages, VB.NET has complete support for object-oriented concepts. Everything in VB.NET is an object, including all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user-defined types, events, and even assemblies. All objects inherits from the base class Object. • VB.NET is implemented by Microsoft's .NET framework. Therefore, it has full access to all the libraries in the .Net Framework. It's also possible to run VB.NET programs on Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac OSX. 5/4/2017 Hudson Nandere Lubinga 3
4.
Why VB.Net iswidely used as a professional language • Modern, general purpose. • Object oriented. • Component oriented. • Easy to learn. • Structured language. • It produces efficient programs. • It can be compiled on a variety of computer platforms. • Part of .Net Framework. 5/4/2017 Hudson Nandere Lubinga 4
5.
The .Net Framework The.Net framework is a revolutionary platform that helps you to write the following types of applications: • Windows applications • Web applications • Web services The .Net framework applications are multi-platform applications. The framework has been designed in such a way that it can be used from any of the following languages: Visual Basic, C#, C++, Jscript, and COBOL, etc. • All these languages can access the framework as well as communicate with each other. • The .Net framework consists of an enormous library of codes used by the client languages like VB.Net. These languages use object-oriented methodology. 5/4/2017 Hudson Nandere Lubinga 5
6.
Components of the.Net framework • Common Language Runtime (CLR) • The .Net Framework Class Library • Common Language Specification • Common Type System • Metadata and Assemblies • Windows Forms • ASP.Net and ASP.Net AJAX • ADO.Net • Windows Workflow Foundation (WF) • Windows Presentation Foundation • Windows Communication Foundation (WCF) • LINQ Qn: Briefly Explain the jobs performed by each of these components. 5/4/2017 Hudson Nandere Lubinga 6
7.
Visual Studio.NET Aplatform that allows the development and deployment of desktop and web applications Allows user choice of many .NET languages May program in One of them May create different parts of application in different languages ▪ Visual Basic ▪ C# (C Sharp) ▪ C++ ▪ J++ ▪ Etc. 5/4/2017 Hudson Nandere Lubinga 7
8.
What is VisualBasic.Net 4th Generation Programming Environment / Development Language Based on BASIC language Beginners All-Purpose Symbolic Instructional Code Most widely used tool for developing Windows Applications Graphical User Interface (GUI) Menus, Buttons, Icons to help the user Full Object-Oriented Programming Language 5/4/2017 Hudson Nandere Lubinga 8
9.
How a VBApplication is Compiled and Run Solution .NET FrameworkVisual Studio .NET Project Common Language Runtime Integrated Development Environment Source files Visual Basic compiler 1 2 3 Assembly Intermediate Language (IL) Class references 5/4/2017 Hudson Nandere Lubinga 9
10.
Project and SolutionConcepts • User creates a new project in Visual Studio • A solution and a folder are created at the same time with the same name as the project • The project belongs to the solution • Multiple projects can be included in a solution • Solution • Contains several folders that define an application’s structure • Solution files have a file suffix of .sln • Project: contains files for a part of the solution • Project file is used to create an executable application • A project file has a suffix of .vbproj • Every project has a type (Console, Windows, etc.) • Every project has an entry point: A Sub procedure named Main or a Form 5/4/2017 Hudson Nandere Lubinga 10
11.
Project and SolutionFolders/Files • Solution folder • Solution file (.sln) • Project folder • Project file (.vbproj) • Visual Basic source files (.vb) • My Project folder: contains configuration information common to all projects • The file AssemblyInfo.vb contains assembly metadata • The References folder contains references to other assemblies • The bin folder contains the executable file produced as a result of compiling the application 5/4/2017 Hudson Nandere Lubinga 11
12.
• Most VisualBasic.Net programs are event-driven programs that communicate with the user through a graphical user interface (GUI) • A GUI usually consists of a window, containing a variety of objects (icons, buttons, images) • An event means the user has initiated an action (a mouse click or entering text) that causes the program to perform the type of processing called for by the user’s action. • Clicking a button triggers an event, resulting in the program performing the process called by the click. 12 Event-Driven Computer Programs with a Graphical User Interface
13.
• Examples ofevents: • The user enters the account number in the Account Number box • The user clicks the Display Account Balance button • The user clicks the Reset Window button to clear the text boxes and prepare the user interface for the next account number 13 Event-Driven Computer Programs with a Graphical User Interface