Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 to VB using.Net by Wyatt and Oberg

2 What is.NET? What is.NET? (according to some people) –Microsoft’s version of Java What is.NET? (according to Microsoft) –Microsoft’s platform for XML Web services –Web Service = software component for the Web –People use web sites; Programs use Web Services What is.NET? (for ACC students) –Software skills that are in demand

3 Languages and CLR Compile to intermediate language (MSIL- Microsoft Intermediate Language) MSIL is JIT (just in time) compiled to native code and run by the Common Language Runtime(CLR) MSIL is designed to support different languages

4 .Net Languages Microsoft ships several languages: –C#a new Java like language –VB.NETlooks like VB –C++managed extensions –J#Java syntax 3 rd party –COBOL, FORTRAN, LISP

5 .NET Languages C# Source VB Source File Other.NET Language MSIL Machine independent Native Code Machine Specific Compile JIT Compile

6 .NET Framework C#VB.NETC++Other Visual Studio.Net Common Language Specification.Net Framework Class Library Common Language Runtime

7 .NET Framework Overview Common Language Runtime –Provides services to executing programs –Traditionally different environments have different runtimes. (standard c library, VB runtime) –The CLR manages execution of code and provides useful services –Services are exposed through the programming languages –Syntax varies from language to language, but underlying engine is the same –Not all languages expose all the features of the CLR –C# does the best job, but VB.NET does pretty well

8 .NET Framework Overview.Net Framework Class Library –Huge, more than 2500 classes –All this functionality is built into the.NET languages –4 Main Parts Base class library (networking, I/O, diagnostics, etc.) Data and XML classes Windows UI Web services and Web UI

9 .NET Framework Overview Common Language Specification –Important goal of.NET is to support multiple languages. –CLS is an agreement among language designers and class library designers about what common subset of features can be relied upon –Example – do not rely on case for uniqueness for names – because some languages are not case sensitive

10 .NET Framework Overview Languages in.Net –Language is basically a lifestyle choice –Same built in data types are used in all the languages –Classes written in one language can be used in another language –A class written in one language can inherit from a class written in another language

11 MSIL (Microsoft Intermediate Language) All VB.Net code is compiled to MSIL –Machine independent –MSIL is JIT compiled to native code then executed Metadata –Detailed info about each code module Version information All the types Details of each type Details about properties and methods of each type –MSIL and metadata are packaged together –Metadata enables ‘intellisense’ and enables types to be converted transparently

12 Visual Studio.NET Visual Studio is now one IDE for all the languages When you start, you pick a profile (example, Visual Basic Developer Profile) This arranges the windows and sets up the environment so it looks like VB Most of the VB debugging tools are there (but, not the immediate window)

13 Some of the Changes to VB All VB source files now have extension.vb No variant type Parentheses always required on all subroutine calls Values returned from functions by using return keyword Function CalculatePay(ByVal payRate as Single, hrsWorked as Single) as Single Dim grossPay as Single grossPay = hrsWorked * payRate Return grossPay End Function

14 Some of the Changes to VB Passing byVal is now the default Lower bound of arrays is always 0 Exception handling Try code that might cause error Catch e as Exception code to handle error End Try

15 Some Changes to OOP in VB.NET Objects and classes are more central to.Net programming.Net makes vb into a real OO language.Net adds Inheritance to VB Shared Members –A value or procedure associated with all instances of a class Set is not needed for instantiation –myAcct = New BankAccount()

16 Some Changes to OOP in VB.NET Syntax for Properties is different Private m_Name as String Public Property Name() as String Get Return m_name End Get Set(ByVal Value a String) m_name = Value End Set End Property

17 Some Changes to OOP in VB.NET Constructors –Class_Initialize no longer exists –A class constructor called New Public Sub New() m_acctNo = 0 m_name = “” m_balance = 0 End Sub

18 Database Access ADO.NET Why ADO.NET? –Web applications have a more loosely coupled structure –Many web apps use XML to encode data that is passed over a network. –After the data has been extracted and encoded, the connection can be closed –ADO.NET facilitates these kind of disconnected scenarios

19 Database Access ADO.NET DataSet object –Holds in memory a representation of data that was retrieved –In XML –Can hold information from multiple tables –Also holds information about relationships and constraints (an in memory database) Connection object used for connection oriented applications DataAdapter object used for disconnected applications

20 ADO.NET Architecture Application DataSet.NET Data Provider (connection) Database XML Data Connected Access Disconnected Access

21 Class Application MSIL Class DataSet MSIL DOM Data Set XML Table 2 Table 1 Internal Format Table 1 Internal Format Table 1 Internal Format Table 3

22 Object Model of DataSet DataSet Relationships Collection Tables Collection RelationTable Constraints Collection Primary Key Columns Collection Rows Collection ConstraintData Column Data Row

23 Main Challenges for VB Developers Learning how to use the classes in the.Net Framework Class Library effectively Learning to use inheritance effectively Visual Studio Changes? Learning the ADO.Net architecture


Download ppt "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."

Similar presentations


Ads by Google