Introduction to VB.NET Fiona Du. Agenda Why VB.NET What is new in VB.NET Update to VB.NET? VB.NET Language Essential.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Advertisements

.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Introduction to .NET Framework
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Abdul Waseem.  Why VB.NET  What is new in VB.NET  Update to VB.NET?
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
By Sam Nasr Nasr Information Systems May 14, 2013.
Visual Basic.NET A look into the.NET Programming Model Bryan Jenks Integrated Ideas ©2005.
Visual Basic.NET Comprehensive Concepts and Techniques What’s new in VB.NET adapted from a presentation on Introduction to Visual Basic.NET by Jeff Quasney.
Windows Programming 1 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
Using Visual Basic 6.0 to Create Web-Based Database Applications
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Introduction to the C# Programming Language for the VB Programmer.
ASP.NET Programming with C# and SQL Server First Edition
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Rajeswari Indupuri Introduction to.NET Framework.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
I NTRODUCTION TO VB.NET Kasun. A GENDA Why VB.NET What is new in VB.NET Update to VB.NET? VB.NET Language Essential.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
VS.NET Syllabus By Peter Huang.
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
Session 1 - Introduction and Data Access Layer
Introduction to .NET Rui Ye.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Nilotpal Bhattacharya Partner Technical Consultant| Microsoft.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
ISYS 573 Special Topic – VB.Net David Chao. The History of VB Early 1960s:BASIC-Beginner’s All-Purpose Symbolic Instruction Code –Teaching –Simple syntax,
Introduction to ASP.NET 1www.tech.findforinfo.com.
Microsoft Access Using Visual Basic Routines. Visual Basic Datatypes Boolean Byte Currency Date Double Integer Long Object Single String Variant Hyperlink.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
.NET Framework Danish Sami UG Lead.NetFoundry
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
VB and C# Programming Basics. Overview Basic operations String processing Date processing Control structures Functions and subroutines.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
1 Visual Studio.NET.NET as a Teaching Tool John D. Haney John M. Lovely Northern Arizona University College of Business Administration.
From DNA to.NET Design Path. Objectives Sketch up a typical Win DNA Application Sketch up the.NET version Compare Design and Implementation Advantages.
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
Module 3: Using Microsoft.NET- Based Languages. Overview Overview of the.NET-Based Languages Comparison of the.NET-Based Languages.
Applications Development
JDS – VB.NET Skill Session Fall 2004 Presented by YUHAO LIN.
1 Working with Data Structures Kashef Mughal. 2 Chapter 5  Please review on your own  A few terms .NET Framework - programming model  CLR (Common.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
ISV Community Day Best Practice Per Ahlberg Developer Evangelist Developer & Platform Evangelism Microsoft Sweden.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
ASP. NET Differences Dave Webster EMEA Technical Team dave
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
ILM Proprietary and Confidential -
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
D OTNET ONLINE TRAINING. DOTNET Online Training Course Content : Introduction to.Net Online Training NET FUNDAMENTALS Why Dot Net? The Dot Net initiative.
ASP.NET Programming with C# and SQL Server First Edition
Introduction to VB.NET Fiona Du.
VISUAL BASIC.
Introduction to VB.NET Fiona Du.
A look into the .NET Programming Model
Presentation transcript:

Introduction to VB.NET Fiona Du

Agenda Why VB.NET What is new in VB.NET Update to VB.NET? VB.NET Language Essential

Why VB.NET (from technical standpoint) The world of applications is changing: The move to Web The need for reusability, centralization and scalability MTS, COM+, and Component Services cannot be fully taken advantage of by VB. SOAP: features can be implemented more completely with.NET.

Why VB.NET (cont.) To get the benefit of.NET framework and its core execution engine: CLR. Garbage collection OO mechanism Standard security services Integrated debugging tools

Why VB.NET (cont.) Why not C# VB.NET----”The most productive tool for building.NET-connected applications. ”---- Microsoft Corporation Root in Basic, the most pure-flavor language product from MS. Easier for VB programmers: a number of unique features. E.g.: Only VB.NET has background compilation, dropdown list of the code window.

What is New in VB.NET ----For Experienced VB Programmers IDE changes Project Changes Web Changes WebClass Changes Data Changes Component Authoring Changes UserControl Changes Forms Changes Debugging Changes Setup and Deployment Changes International Changes Windows API Changes Registry Access Changes Constant Changes Namespace Changes Run-Time Changes

Overview of Big Changes in VB.Net Everything is object-oriented: abstraction, inheritance, overloading, encapsulation and polymorphism.(Note: no multiple inheritance, but interfaces supported.) Multithreaded applications are possible. Language syntax changes ……

Changes in VB Language All data are objects, based on the class: System.Object. E.g. class supports Windows forms: System.Windows.Forms.Form. The built-in VB functionality is encapsulated in a namespace called System. E.g Collection has be replaced by System.Collections. Old control are gone, and new ones have appeared.

Changes in VB Language (cont.) Many keywords are renamed or gone, while some new added. E.g. Gosub removed Strict data typing is now enforced Variable must be declared before used by default. Cannot assign one data type to another, but can use Ctype to convert between types. The same as in VC++ and C#. Structured exception handling: Try…Catch…Finally.

Changes in VB Language (cont.) When calling procedures, must use parentheses. Parameters are by default passed by value, instead of by reference. Supports constructors and destructors for use when initializing an object of a class. If…Then statements are now short- circuited.

Changes in VB Language (cont.) A number of new compound operators E.g. x+=2 The And, Or, Not and Xor operators have changed from bitwise to boolean operators. Meanwhile, the bitwise versions are BitAnd, BitOr, BitNot, and BitXor. No default property supported E.g. VB6: TextBox1=“Hello” VB.Net: TextBox1.Text=“Hello”

Changes in VB Language (cont.) Three new data types Char: unsigned 16- bit Short: signed 16-bit Decimal: signed 96- bit (replaces Variant) Integer Type VB 6.0VB.NET 8 bitByte 16 bitIntegerShort 32 bitLongInteger 64 bitNot ApplicableLong

Changes in Data Handling A new data-handling model: ADO.NET. Facilitates Web application. Uses XML to exchange data. COM/DCOM technologies have been replaced by.NET framework. Datasets (not record sets now) are based on XML schema, so they are strongly typed. Many new tools are provided to handle data. But can still work with ADO using COM interoperability in the.NET framework.

Changes in Web Development Two major types of Web application: Web forms: web-based applications with GUI. Based on ASP.NET Can use standard HTML control, or new Server control handled by the Web server. Controls can be bound on a Web form by setting the codes in the properties. Web services: to process data using HTTP and XML files on the Internet.

Update to VB.NET ? “Visual Basic.NET represents a major departure form previous versions of Visual Basic in several ways.” ----Microsoft Corporation Plenty changes in VB.NET will take lots of effort of even the experienced VB developers. Old but running fine systems, fund, experienced developers…

Update to VB.NET ? (cont.) Consideration Unsupported features OLE Container Control Dynamic Data Exchange DAO or RDO Data Binding VB5 Controls DHTML Applications ActiveX Documents Property Pages

Update to VB.NET ? (cont.) Carefully reworked Single-tier Database Applications VB Add-ins Games Graphics Drag and Drop Functionality Variants Windows APIs

Update to VB.NET ? (cont.) Visual Basic Upgrade Wizard Automatically invoked when open a VB6 project. Results are not satisfactory due to the big different. Recoding by hand.

VB.NET Language Essential ---- For Non-VB Programmers Projects Types Three most commonly used: Windows Forms Web Forms Console Applications Statements

Statement: If…Else Module Module1 Sub Main() Dim intInput As Integer System.Console.WriteLine(“Enter an interger…”) intInput=Val(System.Console.ReadLine()) If intInput=1 Then System.Console.WriteLine(“Thank you!”) ElseIf intInput=2 Then System.Console.WriteLine(“That’s good!”) Else System.Console.WriteLine(“Not a right number!”) End If End Sub End Module

Statement: Select Case Module Module1 Sub Main() Dim intInput As Integer System.Console.WriteLine(“Enter an interger…”) intInput=Val(System.Console.ReadLine()) Select Case intInput Case 1 System.Console.WriteLine(“Thank you!”) Case 2 System.Console.WriteLine(“That’s good!”) Case 3 To 7 System.Console.WriteLine(“OK”) Case Is> 7 System.Console.WriteLine(“Too Big”) Case Else System.Console.WriteLine(“Not a right number!”) End Select End Sub End Module

Functions: Switch and Choose Switch Function Syntax Switch(expr1, value1[, expr2, value2…[,exprn, valuen]]) E.g. intAbsValue=Switch(intValue =0, intValue) Choose Function Syntax Choose(index, choice1[, choice2,…[,choicen]]) Note: unlike array index, choose index from 1 to n E.g. Str=Choose(intValue, “Thank you!”, “That is good!”)

Loop Statement: Do Syntax: Do [While|Until] condition] [statements] [Exit Do] [statements] Loop E.g. Module Module1 Sub Main() Dim strInput As String Do Until Ucase(strInput)=“Stop” System.Console.WriteLine(“What should I do?”) strInput=System.Console.ReadLine() Loop End Sub End Module

Loop Statement: For Syntax: For index=start To end [Step step] [statements] [Exit For] [statements] Next [index] E.g. Module Module1 Sub Main() Dim loopIndex As Integer For loopIndex=0 to 3 System.Console.WriteLine(“Hello!”) Next loopIndex End Sub End Module

Loop Statement: While Syntax: While condition [statements] End While E.g. Sub CheckWhile() Dim intCounter As Integer =0 Dim intNumber As Integer =10 While intNumer>6 intNumber-=1 intCounter+=1 End While MsgBox(“The loop ran “ & intCounter & “ times.”) End Sub

Loop Statement: For Each…Next Syntax: For Each element In group [statements] [Exit For] [statements] Next element E.g. Sub Main() Dim intArray(2), intItem As Integer intArray(0)=0 intArray(1)=1 intArray(2)=2 For Each intItem In intArray System.Console.WriteLine(intArray) Next intItem End Sub

Like a Loop: With Syntax: With object [statements] End With E.g. With TextBox1,Height = 1000.Width = 3000.Text = “Welcome, World!” End With

Like With: Enumerations E.g. Module Enum Days Sunday=1 Monday=2 Tuesday=3 Wednesday=4 End Enum Sub Main() System.Console.WriteLine(“Monday is day “ & Days.Monday) End Sub End Module

Option Statement Option Explicit: On/Off. “On”:requires declaration of all variables before used. Option Compare: Binary/Text. Specifies strings are compared using binary or text comparison operations. Option Strict: On/Off. “On”:used when assigning a value of one type to a variable of another type, indicates any possibility of data loss.

Example for Option Strict Option Strict On Module Module1 Sub Main() Dim dbData As Double Dim intData As Integer dbData= intData=Cint(dbData) ‘Not intData=dbData System.Console.WriteLine(“intData:”&_ Str(intData)) End Sub End Module

Imports Statement To import a namespace. E.g. Option Strict Off Imports System.Console Module Module1 Sub Main() WriteLine(“Hello!”) End Sub End Module

References Steven Holzner, “Visual Basic.NET Black Book”, The Coriolis Group, LLC,

Thank you!