Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Introduction Visual Basic.NET. Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 2 Objectives Explain what Visual Basic is Contrast.

Similar presentations


Presentation on theme: "Chapter 1 Introduction Visual Basic.NET. Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 2 Objectives Explain what Visual Basic is Contrast."— Presentation transcript:

1 Chapter 1 Introduction Visual Basic.NET

2 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 2 Objectives Explain what Visual Basic is Contrast the operating environment of Visual Basic with procedure-oriented languages Set forth the criteria for a sound application program Enumerate the steps to develop a program Understand the importance of hands-on experience in learning a programming language

3 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 3 Evolution of Visual Basic Evolved from BASIC (Beginner’s All-Purpose Symbolic Instruction Code) – Designed to provide interactive computing on mainframe computers Widely available on early microcomputers Introduction of personal computers (early 1980’s) – Microsoft introduced GW-Basic with the DOS operating system

4 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 4 Language Processors Required to process programs into a program the computer can understand Interpreters – Read, interpret, and carry out one line of code at a time Compilers – Translate a source program (i.e. one written in VB) – Create an object program (one a machine can read) Object programs also called “executables” – Compiled programs run much faster

5 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 5 Characteristics of Visual Basic Provides visual objects (controls) that can be drawn onto a window (form) – Makes building the interface much easier Object-oriented code structure – Code structured around objects Easy to understand syntax “IntelliSense” technology helps write code – Objects can be reused and extended through inheritance Event-driven language – Things happen in response to events Examples of events: mouse click, opening or closing a window – The user, not the program determines the sequence of operations

6 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 6 Creating a VB Program Takes place in the Visual Studio Integrated Development Environment (IDE) – Provides an environment for creating the interfaces, writing and testing code, and making changes – Provides the.NET framework for Web services, Visual C#.NET, Visual Basic.NET, etc. Statement: an instruction that can stand alone Code: a group of statements

7 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 7 Overview of VB Program Development Criteria of a sound application – Internal criteria geared to the programmer – External criteria geared to the user Program development cycle – Understand distinct steps in the process of developing an application

8 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 8 External Criteria Functionality – Does the program do what it is supposed to do? Efficiency – Program should minimize the use of computer resources Includes memory, processing time, and storage space User-Friendliness – Make the application easy to use Includes helpful error messages, guarding against user errors, consistent appearance and behavior of windows

9 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 9 Internal Criteria Consistency in coding style – Following conventions most programmers follow Indenting blocks of code Naming objects with predefined prefixes Code clarity and readability – Use meaningful variable names – Adding comments to code can aid understanding Modularity in code design – Each block of code is isolated from the rest of the program Easier to debug, review, and revise

10 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 10 Internal Criteria Elegant algorithms – Algorithm: a systematic approach to solving the programming problem – Logic easy to trace and implement – Efficient in terms of speed and storage requirements Code maintainability – General applicability: code will not require revision even if the program requirements change

11 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 11 Steps in Developing a Program Developing an application requires several distinct steps Skipping or not giving careful attention to steps can create a lot of rework, headaches, and expense – Mistakes made in the earlier stages of program development require much more time, money, and hassle to rework

12 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 12 Steps in Program Development Analyze and define the problem – Program must meet application needs Design the visual interface – Decide what data fields appear and the appropriate controls Define User-Program Interaction – Define events, both user actions and system activities

13 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 13 Steps in Program Development Design the code structure – Structure dictated by responses program should carry out – Well-designed code enhances maintainability Write Code – Develop code based on your analysis of the problem and design of the structure

14 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 14 Steps in Program Development Test and edit the program – Various error types: Syntax errors: failure to follow programming rules Semantic errors: failure to say what you mean Logic errors: difference between what programmer thinks code will do and what it actually does Place the program into production – Production program works with live data and produces “real” results

15 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 15 Learning the Language Comparing learning a spoken language and learning a programming language VocabularyTypes of objects, methods, and events GrammarSyntax rules SemanticsMeaning of how programming constructs fit together EffectivenessFinding better ways to express the same idea

16 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 16 Hands-on Practice Programming is a skill, like playing a sport or a musical instrument Practice enables you to gain familiarity with: – The IDE(Integrated Development Environment) – The vocabulary and syntax rules of VB – How different parts of the code fit together – Identify opportunities for code improvement

17 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 17 The IDE

18 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 18 Summary Visual Basic evolved from BASIC Visual elements allow easy changes in user interface Object-oriented syntax makes it easier to learn vocabulary and syntax Object-oriented language enhances code reusability – Inheritance allows programmer to reuse code

19 Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 19 Summary Sound programs must meet internal criteria and external criteria There are distinct steps in developing code. Don’t try to shortcut the early stages Learning a programming language is like learning a spoken language PRACTICE, PRACTICE, PRACTICE


Download ppt "Chapter 1 Introduction Visual Basic.NET. Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi 2 Objectives Explain what Visual Basic is Contrast."

Similar presentations


Ads by Google