Chapter 01: Intro to VB2010 Programming

Download Chapter 01: Intro to VB2010 Programming

Post on 27-Jan-2015

104 views

Category:

Education

0 download

Embed Size (px)

DESCRIPTION

An overview of VB 2010 programing. What is a program? What is the role of the developer? Event-driven programs that have a GUI. Explanation of input, processing, output, and data storage. Basic arithmetic and logice operations are examined, as well as .Net 4.0 Framework, classes, libraries, and surveys the types of VB 2010 applications.

TRANSCRIPT

<ul><li> 1. Microsoft Visual Basic 2010CHAPTER ONEIntroduction to Visual Basic 2010Programming</li></ul> <p> 2. 1 ObjectivesUnderstand software and computer programsState the role of a developer in creating computer programsSpecify the use of a graphical user interface and describe an event-driven programSpecify the roles of input, processing, output, and data when running a program on a computerDescribe the arithmetic operations a computer program can perform (+, -, *, /, and ^)Chapter 1: Introduction to Visual Basic 2010 Programming 2 3. 1 ObjectivesExplain the logical operations a computer program can perform ( equal, less than, greater than, not equal, greater than or equal to, less than or equal to)Define and describe the use of a databaseIdentify the use of a computer programming language in general, and Visual Basic 2010 in particularExplain the use of Visual Studio 2010 IDE when developing Visual Basic 2010 programsSpecify the programming languages available for use with Visual Studio 2010 (Visual Basic, C++, C#, F#)Chapter 1: Introduction to Visual Basic 2010 Programming 3 4. 1 ObjectivesExplain the .NET 4.0 FrameworkExplain RADDescribe classes, objects, and the .NET Framework 4.0 class librariesExplain ADO.NET 4.0, ASP.NET 4.0, MSIL, and CLRSpecify the types of Visual Basic 2010 applicationsChapter 1: Introduction to Visual Basic 2010 Programming 4 5. 1 Introduction The set of instructions that directs a computer toperform tasks is called computer software, or acomputer programChapter 1: Introduction to Visual Basic 2010 Programming 5 6. 1 IntroductionComputer hardware is the physical equipment associated with a computerChapter 1: Introduction to Visual Basic 2010 Programming 6 7. 1 Introduction The basic function of many computer programs is to acceptsome form of data (sometimes called input data) manipulatethe data in some manner (sometimes called processing), andcreate some form of data usable by people or other computers(sometimes called output data or information ) and storageChapter 1: Introduction to Visual Basic 2010 Programming 7 8. 1 IntroductionIn order for the computer to execute a program: Program and data must be placed in thecomputers random access memory (RAM) The central processing unit (CPU) can access theinstructions in the program and the data in RAM toperform activities as directed by the programChapter 1: Introduction to Visual Basic 2010 Programming 8 9. 1 IntroductionSaving, or storing, data refers to placing the data or software electronically on a storage medium in a persistent form. Hard disk Universal Serial Bus (USB) drivePersistent data remains available even after the computer power is turned offChapter 1: Introduction to Visual Basic 2010 Programming9 10. 1 Computer Programmers and DevelopersA computer program is designed and developed by people known as computer programmers, or developersDevelopers are people skilled in designing computer programs and creating them using programming languagesApplications may consist of several computer programs working together to solve a problemComputer programmers write the code for programs using a programming languageChapter 1: Introduction to Visual Basic 2010 Programming 10 11. 1 Computer Programmers and Developers Comments Event-Handler CodeChapter 1: Introduction to Visual Basic 2010 Programming 11 12. Event-Driven Computer Programs1 with a Graphical User InterfaceMost Visual Basic 2010 programs are event-driven programs that communicate with the user through a graphical user interface (GUI)A GUI usually consists of a window, containing a variety of objects (icons, buttons, images)An event means the user has initiated an action (a mouse click or entering text) that causes the program to perform the type of processing called for by the users action. Clicking a button triggers an event, resulting in theprogram performing the process called by the click.Chapter 1: Introduction to Visual Basic 2010 Programming12 13. Event-Driven Computer Programs1 with a Graphical User InterfaceExamples of events: The user enters the account number in the AccountNumber box The user clicks the Display Account Balance button The user clicks the Reset Window button to clearthe text boxes and prepare the user interface forthe nextaccount numberChapter 1: Introduction to Visual Basic 2010 Programming 13 14. 1 Input OperationChapter 1: Introduction to Visual Basic 2010 Programming 14 15. 1 Output Operation 73-0529$13,432.85Chapter 1: Introduction to Visual Basic 2010 Programming 15 16. 1 Basic Arithmetic OperationsIn many programs, arithmetic operations are performed on numeric data to produce useful output Addition Subtraction Multiplication Division ExponentiationChapter 1: Introduction to Visual Basic 2010 Programming 16 17. 1 Logical OperationsComputers, through the use of computer programs, can compare numbers, letters, and special charactersThe program will perform a processing task, based on the result of the comparisonLogical operations: Comparing to determine if two values are equal Comparing to determine if two values are not equal Comparing to determine if one value is greaterthan another value Comparing to determine if one value is less thananother valueChapter 1: Introduction to Visual Basic 2010 Programming 17 18. 1 Logical Operations: Equal ConditionChapter 1: Introduction to Visual Basic 2010 Programming 18 19. 1 Logical Operations: Equal ConditionChapter 1: Introduction to Visual Basic 2010 Programming 19 20. 1 Logical Operations: Less Than ConditionChapter 1: Introduction to Visual Basic 2010 Programming 20 21. 1 Logical Operations: Greater Than ConditionChapter 1: Introduction to Visual Basic 2010 Programming 21 22. 1 Saving Software and DataWhen you develop and write a program, it must be saved on some type of storage medium (i.e., a disk)When you want the program to run, you can cause the program to load into RAM and execute itThe program you write also can save data Banking applications must save account dataIn most cases, data is stored in a database Collection of data organized in a manner thatallows access, retrieval, and use of that data However, data can also be saved in a text fileChapter 1: Introduction to Visual Basic 2010 Programming 22 23. 1 Visual Basic 2010 and Visual Studio 2010Each program statement causes the computer to perform one or more operationsThe developer must follow the syntax, or programming rules, of the programming language preciselyMany developers use a tool called Visual Studio 2010 to create Visual Basic 2010 programsVisual Studio 2010 is a type of integrated development environment (IDE) Provides services and tools that enable a developerto code, test, and implement a single program orseries of programsChapter 1: Introduction to Visual Basic 2010 Programming23 24. 1Visual Studio 2010 IDE and Visual Basic 2010Menu Bar Solution Explorer Solution Explorer Form Designer ToolboxError List PropertiesChapter 1: Introduction to Visual Basic 2010 Programming 24 25. 1 Programming Languages Visual Basic Programming language that allows developers to easily build complex Windows and Web programs, as well as other software tools Based on the BASIC language C++ Derivative of the programming language, C Visual C# (pronounced C Sharp) Synthesis of the elegance and syntax of C++ with many of the productivity benefits enjoyed in Visual Basic Visual F# (pronounced F Sharp) Multipurpose language known for its math-intensive focusChapter 1: Introduction to Visual Basic 2010 Programming25 26. 1 .NET Framework 4.0.NET technologies and products were designed to work together to allow businesses to connect information, people, systems, and devices through softwareThe .NET Framework provides tools and processes developers can use to produce and run programs Most recent version is .NET Framework 4.0Chapter 1: Introduction to Visual Basic 2010 Programming 26 27. 1 .NET Class LibraryA class is a named group of program code A button is an example of a classA class library stores the class and makes the class available to all developers who need to use itChapter 1: Introduction to Visual Basic 2010 Programming 27 28. 1 .NET Class LibraryA button created from a class is called an object, or sometimes an instance of a classThe process of creating a Button object from the Button class is called instantiationRapid application development (RAD) refers to the process of using prebuilt classes to make application development faster, easier, and more reliableChapter 1: Introduction to Visual Basic 2010 Programming 28 29. 1 ADO.NET 4.0ADO.NET 4.0 (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 Edit the data Update the dataChapter 1: Introduction to Visual Basic 2010 Programming 29 30. 1 ASP.NET 4.0ASP.NET 4.0 allows developers to use Visual Studio 2010 to build powerful, sophisticated Web applicationsAlmost all .NET framework objects are available in ASP.NET 4.0Easy to deploy a Web application on a Web serverChapter 1: Introduction to Visual Basic 2010 Programming 30 31. Microsoft Intermediate Language (MSIL) and1 Common Language Runtime (CLR)Program compilation translates programming statements into instructions that can be understood by the computerProgram compilation for a Visual Basic 2010 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 4.0 called the Common Language Runtime (CLR) reads the MSIL and causes the actual instructions within the program to be executedChapter 1: Introduction to Visual Basic 2010 Programming31 32. Microsoft Intermediate Language (MSIL) and1 Common Language Runtime (CLR)Chapter 1: Introduction to Visual Basic 2010 Programming 32 33. 1 Types of Visual Basic 2010 ApplicationsWindows application Program will run on a computer or other device that supports the Windows GUIMobile application Designed to run on mobile devices running the Windows CE operating systemWeb site application Uses ASP.NET 4.0 and runs on a Web serverChapter 1: Introduction to Visual Basic 2010 Programming 33 34. 1 Types of Visual Basic 2010 Applications Office application Includes writing Visual Basic 2010 code to automate and manipulate documents created using Microsoft Office 2003, Office 2007, and Office 2010 Database application Written using ADO.NET 4.0 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 inWindows applications, Web services, and device-specificapplicationsChapter 1: Introduction to Visual Basic 2010 Programming34 35. 1 SummaryUnderstand software and computer programsState the role of a developer in creating computer programsSpecify the use of a graphical user interface and describe an event-driven programSpecify the roles of input, processing, output, and data when running a program on a computerDescribe the arithmetic operations a computer program can performChapter 1: Introduction to Visual Basic 2010 Programming 35 36. 1 SummaryExplain the logical operations a computer program can performDefine and describe the use of a databaseIdentify the use of a computer programming language in general, and Visual Basic 2010 in particularExplain the use of Visual Studio 2010 when developing Visual Basic 2010 programsSpecify the programming languages available for use with Visual Studio 2010Chapter 1: Introduction to Visual Basic 2010 Programming 36 37. 1 SummaryExplain the .NET 4.0 FrameworkExplain RADDescribe classes, objects, and the .NET Framework 4.0 class librariesExplain ADO.NET 4.0, ASP.NET 4.0, MSIL, and CLRSpecify the types of Visual Basic 2010 applicationsChapter 1: Introduction to Visual Basic 2010 Programming 37 38. Microsoft Visual Basic 2010CHAPTER ONE COMPLETEIntroduction to Visual Basic 2010Programming </p>