Vb6 vs vb.net....(visual basic) presentation

iffi910 4,441 views 18 slides May 22, 2015
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

Difference between vb6 and vb.net


Slide Content

Iftikhar Ahmad Roll No:13 MCS-4th 5/21/2015 1

Presentation Vb6 vs VB.net Differences between VB6 & VB.net? 5/21/2015 2

Introduction More than three years ago, the Microsoft Visual Basic team set out to create Visual Basic .NET. At that time managers would kid the development team by saying that they were making only three “simple” changes to Visual Basic 6: a new runtime system, a new development environment, and a new compiler. The Visual Basic development team spent the next three years working on one of these changes: the new compiler. Two other teams provided the development environment and runtime. As we pointed out in Chapter 1, the end result is not a new version of Visual Basic 6 but an entirely new product: Microsoft Visual Basic .NET . The name is important for two reasons. First, Visual Basic is still Visual Basic. Second, Visual Basic .NET is not Visual Basic 7 . 5/21/2015 3

Visual Basic Visual Basic (also termed Visual Basic.NET or VB) is a major revision of earlier Microsoft VB products.  ·        This latest version is Version 10 of VB.  ·        This is an upgrade of earlier .NET  versions. ·        The current and earlier versions are not completely compatible—a program coded with an earlier version that is upgraded to the current version cannot be opened again with the earlier version software.  ·        Version 6 and earlier are not .NET-compatible – programs created with these versions are completely incompatible with .NET applications. 5/21/2015 4

.NET Framework The .NET Framework is composed of two general parts: the common language runtime and the Framework class library. The runtime is the foundation upon which the .NET Framework is based. It provides the basic services on which all .NET applications depend: code execution, memory management, thread management and code security. The Framework class library provides building blocks for creating a variety of .NET applications, components, and services . 5/21/2015 5

Overview VB6 and VB.NET:   The VB6 and VB.NET transcend the languages. VB.NET is part of a brand new platform, based on the .NET Framework. All languages in .NET are based on this new platform, which allows many great new capabilities for a VB developer. Because the .NET Framework is fully object-oriented, .NET languages also must support OO features. The result is that VB.NET is fully object-oriented. This is a huge difference and is a powerful improvement over previous version of VB. It also introduces another level of complexity along with this new power . In many ways, VB.NET can be seen as an entirely new language. Oh, much of the syntax is still there, and yes, much of it has changed. But the real differences in VB.NET are in the way we accomplish various tasks. Everything is done through the .NET Framework. All .NET languages use the same .NET classes - C#, VB, COBOL, J#, etc. 5/21/2015 6

Overview ( con’t …) The greatest change in VB6 and VB.NET is of runtime environment. VB6 used the VB-Runtime while VB.NET uses the .Net Common Language Runtime ( .Net CLR). The CLR is much better designed and implemented than VB-Runtime. The CLR uses better code translation through Just in Time compiler while VB-Runtime interprets the code. The CLR Garbage Collector is also more efficient than VB6 one as it may detect cyclic references too. VB6 was interpreter based language while VB.NET is a compiled language VB6 was not a type-safe language while VB.NET is a type safe language. 5/21/2015 7

There are a lot of differences: Inheritance Exception Handling Overloading Overriding Properties and Methods Constructors and Destructors Data Types Interfaces Delegates Namespaces Attributes Shared Members Multithreading Memory Management For detail check the down notes section 5/21/2015 8

Some ther differences>>>> 5/21/2015 9

VB6 vs VB.NET VB 6 programs require significant modification to run under VB .NET VB6 was interpreter based language while VB.NET is a compiled language The greatest change in VB6 and VB.NET is of runtime environment. VB6 used the VB-Runtime while VB .NET adheres to the Common Language Specification (CLS) for language interoperability which is also shared with C#. VB 4, 5, and 6 were backward compatible VB .NET is not backward compatible VB6 was not a type-safe language while VB.NET is a type safe language. There is no variant type in VB.NET and no type conversions happen automatically in VB.NET 5/21/2015 10

A lot of code (like user interface code) in VB6 was hidden from developer. In VB.NET no code is hidden from developer and you can access and control each part of your application and it now has C-like Syntax  VB .NET is now has object oriented programming features Arrays is  0 based in VB .NET. i.e when you declare an array in vb6 "Dim Items(5) As String" you would get an array with 6 elements but in VB.NET it would be 5 items now. 5/21/2015 11

  VB2008.NET   VB6 Difference    Short Integer  16 Bit  Integer Long  32 Bit  Long    64 Bit  Object Variant   Variant Dropped use the new Object Data Type  Decimal      String  String  No Fixed Length String in Vb.NET    Currency  Use Decimal or long in vb2008 5/21/2015 12 No More Variant, Currency Data Types in VB.NET, you also get the new data types in Visual Basic. NET called Object other changes are as follow.

VB6 was only considered good for desktop windows application. In VB.NET you can develop web applications, distributed applications, create .NET windows and web controls and components, write windows and web services. In VB.NET, you can also use reflections to read the meta-data of types and using reflection emit you can also generate code to define and invoke types at runtime. VB.NET uses .NET framework class library along with specialized VB library ( System.VisualBasic ) as a standard library. As a result, the standard library for VB.NET is much enhanced and useful compared to VB6 standard library 5/21/2015 13

VB.NET is platform independent because of .Net framework. Programs written in VB.NET can run on any platform where .Net framework is present. The platform include both hardware and software (operating system) platforms . VB.NET also supports language interoperability with various .NET compliant languages. This means that you can use and enhance the code written in other .NET compliant languages. Similarly the code written in VB.NET can also be used and enhanced by other .NET compliant languages. Although VB6 also provided this functionality through COM but it was limited and difficult to use and manage. 5/21/2015 14

VB.Net makes it easier because of the presence of Intermediate Language (IL) and Common Language Specification (CLS) of the .NET architecture. VB6 uses COM (Component Object Model) as component architecture. VB.NET uses assemblies as its component architecture. The Assemblies architecture has removed a lot of problems with COM including DLL-Hell and versioning problem. Components created in VB6 (COM) need to make and update registry entries. VB.NET does not require any registry entry making the deployment easier. 5/21/2015 15

Since VB.NET is a natural evolution of VB - and indeed its replacement  . 5/21/2015 16

Conclusion As we can see, quite a bit is involved in the three “simple” changes that the teams made to create Visual Basic .NET. Despite all of these changes, you should find the development environment, compiler, and language familiar. The skills that you have acquired using Visual Basic 6 are not lost when you upgrade to Visual Basic .NET. The way you create, run, and debug a Visual Basic .NET application is nearly identical to the process you are already familiar with . After all, Visual Basic is still Visual Basic. The spirit is alive and well in Visual Basic .NET. 5/21/2015 17

Thank You @ iftkr iftkr.wordpress.com 5/21/2015 18