Presentation is loading. Please wait.

Presentation is loading. Please wait.

Compunet Corporation1 Programming with Visual Basic.NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz.

Similar presentations


Presentation on theme: "Compunet Corporation1 Programming with Visual Basic.NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz."— Presentation transcript:

1 Compunet Corporation1 Programming with Visual Basic.NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz

2 Compunet Corporation2 Hardware components

3 Compunet Corporation3 Evolution of computer languages

4 Compunet Corporation4 Running a program

5 Compunet Corporation5 The.NET Framework An architectural model for creating programs that interface with the operating system and base class libraries

6 Compunet Corporation6 The.NET Framework Contains a hierarchical set of Base Class Libraries

7 Compunet Corporation7 The.NET Framework Base class libraries are code libraries that provide general functions

8 Compunet Corporation8 Common Language Runtime Each.NET language compiles into a common intermediate language and common type system Assembly contains compiled.NET program The compiled.NET program contains the intermediate language and metadata Metadata describes the assembly contents

9 Compunet Corporation9 Compiling a program

10 Compunet Corporation10 Visual Studio.NET 2003 contains what you need to start building and executing VB.NET applications. Many Project templates are available in Visual Basic Project development environment, some of them are: –Window Application –ASP.NET Application –Smart Device Application –ASP.NET Web Application –Console Application –Windows Services Its trial version can be installed on machine. VB.NET Development Environment

11 Compunet Corporation11 Visual Basic Visual Basic is an Object-Oriented Programming Language Object contains data, method and constructor

12 Compunet Corporation12 Program Forms Program exist in two forms –Source code(text form of program) –Object code(executed by the computer).NET compiler produce an object file that contain intermediate code.

13 Compunet Corporation13 Namespaces Organizes base class libraries Top namespace is System All Windows Forms inherits the System.Windows.Forms.Form namespace

14 Compunet Corporation14 Provides a number of libraries of utility classes and methods System System.Console System.Diagnostics System.Data System.Data.sqlClient System.Web System.Xml System.IO.File VB.NET Class Libraries

15 Compunet Corporation15 Program Statements “A program statement is any combination of Visual Basic keywords, properties, functions, operators, and symbols that (make up) a valid instruction for the Visual Basic compiler. (see p. 127) For example: End Label1.Text = TimeString Syntax means the rules used to distinguish valid statements from invalid ones. It’s like grammar in English. If the syntax is not correct, the compiler will give you an error when you build your program. It’s possible to write a statement with good syntax but bad semantics (meaning). This may result in run-time errors.

16 Compunet Corporation16 Use any text editor to write this VB.NET program, call ILoveVB.vb VB.NET is not case sensitive, so be sure while writing the filename and class name Public Module Hello Sub Main() System.Console.WriteLine("I Love VB…") End Sub End Module ' Run this at the command line ' vbc ILoveVB.vb VB.NET Application

17 Compunet Corporation17 To compile this program c:\> vbc ILoveVB.vb To run your program c:\> ILoveVB You should see the following output I Love VB … VB.NET Application

18 Compunet Corporation18 Testing Blackbox testing – testing a program without knowing what’s inside it (it’s a black box). Test plans developed by looking at requirements statement. Whitebox testing – testing a program with full knowledge of how it works. Test plans developed by looking at the code. Every line of code should work correctly all the time!

19 Compunet Corporation19 Enter and compile this example on your PC to see whether your Software installation is OK VB.NET Application ( Exercise )

20 Compunet Corporation20 IL Disassembler (ILDASM) View assembly using ILDASM Displays intermediate language Can view information about namespaces, classes, and other programming structures

21 Compunet Corporation21 Using the ILDASM


Download ppt "Compunet Corporation1 Programming with Visual Basic.NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz."

Similar presentations


Ads by Google