1 Today we will discuss

9/11/2008 Microsoft Visual Basic 2008 Introduction to Visual Basic BCIS 2610 1 Introduction 1 Today we will discuss ►How the programs work (Ch1...
Author: Carol Pitts
12 downloads 0 Views 1MB Size
9/11/2008

Microsoft Visual Basic 2008

Introduction to Visual Basic BCIS 2610

1

Introduction

1

Today we will discuss

►How the programs work (Ch1) ►What is Visual Studio (Ch1) ►Working with Visual Basic (Ch 2) ►Events, objects, classes and object properties (Ch 2) ►Changing properties using property window and code  (Ch 2, 3) ►Writing VB code (Ch 3) ►Variables, data types and declarations (Ch 4) ►Assignment statements (time permitting) (Ch 4)

1

Input Operation

1

Processing: Logical Operations

►The basic function of many computer programs is  to accept data, manipulate the data (process),  and create output data or information.  Data can  also be stored.

1

Processing: Basic Arithmetic Operations

►In many programs, arithmetic operations are  performed on numeric data to produce useful  output • Addition • Subtraction • Multiplication • Division

► Computers, through the use of computer programs, can compare numbers,  letters, and special characters ► The program will perform a processing task or make a decision, based on  the result of the logical operation ► Logical operations: • Comparing to determine if two values are equal • Comparing to determine if one value is greater than another value Comparing to determine if one value is greater than another value • Comparing to determine if one value is less than another value ► Ability to perform logical operations is what distinguishes computers from  other devices

1

9/11/2008

1

Logical Operations: Equal Condition

1

Logical Operations: Greater Than Condition

1

Output Operation

1

Storage

►Saving, or storing, data refers to placing the data  or software electronically on a storage medium • Hard disk • Universal Serial Bus (USB) drive Universal Serial Bus (USB) drive ►Persistent data remains available even after the  computer power is turned off

1

Saving Software and Data

►When you develop and write a program, it must be  saved on a disk ►When you want the program to run, you can cause  the program to load into RAM and execute

1

What is computer program?

►The set of instructions that directs a computer to  perform tasks is called computer software, or a  computer program ►Applications may consist of several computer  programs working together to solve a problem programs working together to solve a problem

2

9/11/2008

1

Example of a computer code

Microsoft Intermediate Language (MSIL) and  1 Common Language Runtime (CLR) ► Program compilation translates programming statements into  instructions that can be understood by the electronics of the  computer ► Program compilation for a Visual Basic 2005 program creates a  set of electronic code expressed in an intermediate language  g g ( ) called the Microsoft Intermediate Language (MSIL) ► When the program is executed, a portion of .NET 2.0 called the  Common Language Runtime (CLR) reads the MSIL and causes  the actual instructions within the program to be executed

1

Computer Programmers and Developers

1

Program Development Life Cycle – CH. 2

►A computer program is designed and developed by  computer programmers, or developers ►Developers ‐ designing computer programs and  creating them using programming languages ►Computer programmers write the code for programs ►Computer programmers write the code for programs  using a programming language • The syntax of a programming language is the set of  rules that describe how the programming language  elements can be used. 

►Set of phases and steps that are followed by  developers to design, create, and maintain a  computer program • Gather and Analyze the Program Requirements • Design the User Interface • Design the Program Processing Objects • Code the Program • Test the Program • Document the Program/System • Maintain the Program/System

1

1

Phase I: Gather and Analyze the Program Requirements

►Gather project requirements by interviewing users,  reviewing current procedures, and completing other  fact‐gathering tasks ►Two types of requirements documentation • Requirements document Requirements document • Use Case Definition

Phase 2: Design the User Interface

►Developers sometimes spend 25% to 40% of the  program design time on the user interface • Presentation layer ►Use Visual Studio to create the user interface ►Interface designs are often called mock‐ups ►Interface designs are often called mock‐ups

3

9/11/2008

1

Phase 2: Design the User Interface

1

►Principles of User Interface Design • The GUI should be easy to use and follow

Phase 2: Design the User Interface • Once an object is used for a particular purpose,  then that object should be used for the same  purpose throughout the program interface • Arrange objects in the sequence in which they are  used • The interface should be kept as simple as possible,  while maintaining functionality • The user interface should be intuitive

►Users will not be satisfied with the application if the  user interface is not easy to use

• Three primary means of interacting in a user  p y g interface are the keyboard, a pointing device, and  voice input • Use of the interface should feel natural and normal • Provide the most appropriate object for each  requirement

1

Program Design

1

Program Design

1

Event Planning Document

1

Visual Basic 2008 and Visual Studio 2008

►Each program statement causes the computer to  perform one or more operations ►The developer must follow the programming rules, or  syntax, of the programming language precisely ►Most developers use a tool called Visual Studio 2008 t to write Visual Basic 2008 programs it Vi l B i 2008 ►Visual Studio 2008 is a type of integrated  development environment (IDE) • Provides services and tools that enable a developer  to code, test, and implement a single program or  series of programs Chapter 1: Introduction to Visual Basic 2008 Programming

24

4

9/11/2008

1

1

Visual Basic 2008 and Visual Studio 2008

Programming Languages

►Visual Basic 2008 • Based on the Visual Basic programming language  that Microsoft developed in the early 1990s • Based on the BASIC language ►C++ • Derivative of the programming language, C ►Visual C# • Synthesis of C++ syntax and Visual Basic  productivity benefits Chapter 1: Introduction to Visual Basic 2008 Programming

1

25

1

.NET Framework 3.5

►.NET technologies and products were designed to  work together to allow businesses to connect  information, people, systems, and devices through  software ►The .NET Framework provides tools and processes  developers can use to produce and run programs • Most recent version is .NET Framework 3.5

Chapter 1: Introduction to Visual Basic 2008 Programming

1

26

.NET Class Library

►A class is a named group of program code • A button is an example of a class ►A class library stores the class and makes the class  available to all developers who need to use it

27

Chapter 1: Introduction to Visual Basic 2008 Programming

1

.NET Class Library

►A button created from a class is called an object, or  sometimes an instance of a class ►The process of creating a Button object from the  Button class is called instantiation ►Rapid application development (RAD) refers to the  ►Rapid application development (RAD) refers to the process of using prebuilt classes to make application  development faster, easier, and more reliable

Chapter 1: Introduction to Visual Basic 2008 Programming

Chapter 1: Introduction to Visual Basic 2008 Programming

28

ADO.NET 3.5

►ADO.NET 3.5 (ActiveX Data Objects) provides the  functionality for a program to perform four primary  tasks when working with a database: • Get the data • Examine the data Examine the data • Edit the data • Update the data

29

Chapter 1: Introduction to Visual Basic 2008 Programming

30

5

9/11/2008

1

1

ASP.NET 3.5

►Allows developers to use Visual Studio 2008 to build  powerful, sophisticated Web application ►Almost all .NET framework objects are available in  ASP.NET 3.5 ►Easy to deploy a Web application on a Web server ►Easy to deploy a Web application on a Web server

Chapter 1: Introduction to Visual Basic 2008 Programming

1

Microsoft Intermediate Language (MSIL) and  Common Language Runtime (CLR)

►Program compilation translates programming  statements into instructions that can be understood  by the electronics of the computer ►Program compilation for a Visual Basic 2008 program  creates a set of electronic code expressed in an  intermediate language called the Microsoft  Intermediate Language (MSIL) ►When the program is executed, a portion of .NET 3.5  called the Common Language Runtime (CLR) reads  the MSIL and causes the actual instructions within the  program to be executed 31

Microsoft Intermediate Language (MSIL) and  Common Language Runtime (CLR)

Chapter 1: Introduction to Visual Basic 2008 Programming

1

32

Types of Visual Basic 2008 Applications

►Windows application • Program will run on a computer or other device  that supports the Windows GUI ►Mobile application • Designed to run on mobile devices running the  Designed to run on mobile devices running the Windows CE operating system ►Web site application • Uses ASP.NET 3.5 and runs on a Web server

Chapter 1: Introduction to Visual Basic 2008 Programming

1

33

1

Types of Visual Basic 2008 Applications

►Office application • Includes Writing Visual Basic 2008 code to automate  and manipulate documents created using both  Microsoft Office 2003 and Microsoft Office 2007 ►Database application • Written using ADO.NET 3.5 to reference, access,  Written using ADO NET 3 5 to reference access display, and update data stored in a database ►Other types of applications include console applications,  classes for class libraries, certain controls to use in  Windows applications, Web services, and device‐specific  applications

Chapter 1: Introduction to Visual Basic 2008 Programming

Chapter 1: Introduction to Visual Basic 2008 Programming

34

Summary

►Understand software and computer programs ►State the role of a developer in creating computer  programs ►Specify the use of a graphical user interface and  describe an event‐driven describe an event driven program program ►Specify the roles of input, processing, output, and  data when running a program on a computer ►Describe the arithmetic operations a computer  program can perform

35

Chapter 1: Introduction to Visual Basic 2008 Programming

36

6

9/11/2008

1

1

Summary

►Explain the logical operations a computer program  can perform ►Define and describe the use of a database ►Identify the use of a computer programming language  in general, and Visual Basic 2008 in particular in general, and Visual Basic 2008 in particular ►Explain the use of Visual Studio 2008 when developing  Visual Basic 2008 programs ►Specify the programming languages available for use  with Visual Studio 2008

Chapter 1: Introduction to Visual Basic 2008 Programming

37

Summary

►Explain the .NET 3.5 Framework ►Explain RAD ►Describe classes, objects, and the .NET Framework 3.5  class libraries ►Explain ADO NET 3 5 ASP NET 3 5 MSIL and CLR ►Explain ADO.NET 3.5, ASP.NET 3.5, MSIL, and CLR ►Specify the types of Visual Basic 2008 applications

Chapter 1: Introduction to Visual Basic 2008 Programming

38

Microsoft Visual Basic 2008

CHAPTER ONE COMPLETE Introduction to Visual Basic 2008  Programming

7

Suggest Documents