Chapter 1 - Introduction To Application Development
Chapter 1 - Introduction To Application Development
Content
1.1 Definition of Application. 1.2 Application Development Process. 1.3 Different Types of Application Development Tools. 1.4 Introduction to Visual Basic.NET. 1.5 The Visual Studio Environment
Introduction to VB.NET
also called end-user programs includes database programs, word processors, and spreadsheets. applications software sits on top of systems software because it is unable to run without the operating system and system utilities.
Introduction to VB.NET 3
Determine Output Identify Input Determine process necessary to turn given Input into desired Output
How fast is a car traveling if it goes 50 miles in 2 hours? Output: a number giving the speed in miles per hour Input: the distance and time the car has traveled Process: speed = distance / time
Introduction to VB.NET 5
Introduction to VB.NET
Program Planning
A recipe is a good example of a plan Ingredients and amounts are determined by what you want to bake Ingredients are input The way you combine them is the processing What is baked is the output Program Planning Tips
Always have a plan before trying to write a program The more complicated the problem, the more complex the plan must be Planning and testing before coding saves time coding
Introduction to VB.NET 7
Software refers to a collection of instructions for the computer The computer only knows how to do what the programmer tells it to do Therefore, the programmer has to know how to solve problems The Cycle are:
Analyze: Define the problem. Design: Plan the solution to the problem. Choose the interface: Select the objects (text boxes, buttons, etc.). Code: Translate the algorithm into a programming language. Test and debug: Locate and remove any errors in the program. Complete the documentation: Organize all the materials that describe the program.
Introduction to VB.NET 8
Requirements specification Architectural design Detailed design Implementation and Unit Testing Integration and testing Operation and maintenance
Introduction to VB.NET 9
Boolean C++ VB 6 ASP - Active Server Pages, a web-scripting interface by Microsoft PHP an open source programming language Dream Viewer Lotus Note Oracle Microsoft Access
Introduction to VB.NET 10
Windows Graphical User Interface Window = Form Toolbox of elements called Controls
Programming Languages
Procedural
Event Driven (VB 6.0 and previous) Object Oriented Programming (VB .NET)
Visual Basic (can also be purchased separately) Visual C++ C# J# .NET Framework
Introduction to VB.NET 13
Visual Basic.NET
Dot Notation
Form.Text, TextBox.Text
Form.Hide( ), TextBox.Focus( )
Button_Click, ListBox_TextChanged
Introduction to VB.NET 16
Class = automobile Properties = make, model, color, year Object = each individual car
Methods = start, stop, speedup, slowdown Events = car arrives, car crashes
Introduction to VB.NET 17
Planning
Design Interface Plan Properties Plan Code Create Forms and Controls Set Properties Write Code
Introduction to VB.NET 18
Programming
VB Application Files
Open this file directly to work on a Project
One Solution File Solution User Options File Form Files Resource File for the Form Project Files Project User Options File
.vbproj .vbproj.user
Introduction to VB.NET
19
Integrated Development Environment (IDE) Form Designer Editor for entering code Compiler Debugger Object Browser
Introduction to VB.NET 20
Introduction to VB.NET
21
Introduction to VB.NET
22
Introduction to VB.NET
23
Toolbars Document Window Form Designer Solution Explorer Window Properties Window Toolbox
Introduction to VB.NET 24
VB Toolbox
Introduction to VB.NET
25
Extensive Help feature Includes Microsoft Developer Network library (MSDN) Entire reference manual Coding examples
Introduction to VB.NET
26
Modes
Introduction to VB.NET
27
pushButton
exitButton
Introduction to VB.NET 28
Properties Window-Label1
Introduction to VB.NET
29
Label
Name Text
Name Text Name Text Name Text
Button 1
Button 2
Form
The default startup object is Form1 The name of the form should always be changed to adhere to naming rules Click on Project name in Solution Explorer window, choose Project menu, Properties and change the startup object to match the new form name
Introduction to VB.NET 31
Introduction to VB.NET
32
Write Code
While the project is running the user can perform actions Each action by the user causes an Event to occur Write code for the events you care about, the events you want to respond to with code Code is written as event procedures VB will ignore events for which you do not write code
Introduction to VB.NET 33
Remark Statement
Also known as Comment, used for documentation Non-executable Automatically colored Green in Editor Begins with an apostrophe ( ' )
On a separate line from executable code At the right end of a line of executable code ' Display the Hello World message.
Introduction to VB.NET 34
Editor Window
Introduction to VB.NET
35
Assignment Statement
Assigns a value to a property or variable Operates from right to left Enclose text strings in quotation marks (" ")
Introduction to VB.NET
36
Ending a Program
Execute the Close Method of the Form Methods always have parentheses
(this will help you distinguish them from Properties which never have parentheses)
(F5)
Start Without Debugging(CTRL F5) Compile errors Run-Time Errors Logic errors Syntax errors
Have a set of standards and always follow them No spaces, punctuation marks or reserved words Use camel casing
Examples
The End Of
Chapter 1