Intermediate Visual Basic - PowerPoint PPT Presentation

About This Presentation
Title:

Intermediate Visual Basic

Description:

Intermediate Visual Basic CISP 371 CRC Prof. Chapman VB Capabilities Most people think that Visual Basic is only useful if you want to build a GUI program that runs ... – PowerPoint PPT presentation

Number of Views:93
Avg rating:3.0/5.0
Slides: 27
Provided by: webCrcLo
Category:

less

Transcript and Presenter's Notes

Title: Intermediate Visual Basic


1
Intermediate Visual Basic
  • CISP 371
  • CRC
  • Prof. Chapman

2
VB Capabilities
  • Most people think that Visual Basic is only
    useful if you want to build a GUI program that
    runs on a desktop PC.
  • But VB is much more powerful than that.

3
VB Capabilities
  • VB can be used to work with databases and to
    build web sites.
  • Who needs Java or Javascript or PHP? Who needs
    SQL or Oracle or MySQL? Not a master VB
    programmer.

4
VB Capabilities
  • VB can handle
  • Windows desktop GUI applications
  • Windows web applications
  • Database connectivity
  • Extension of the language
  • OOP
  • Application security

5
Windows Desktop GUI Apps
  • This was covered in the prerequisite course CISP
    370.
  • More to come about what I expect you all to know
    in this area.

6
Language Extension
  • The rest of what VB can do can is defined within
    the huge class library called the .NET Framework.
  • As the first part of this course well work with
    this library.

7
OOP
  • You will learn how to effectively use the .NET
    Framework. You will also extend the .NET
    Framework into customized classes using the OOP
    concepts of inheritance, polymorphism, and
    encapsulation.
  • These concepts are vital when programming VB web
    apps and database connectivity.

8
OOP
  • You will be able to create advanced memory
    storage for your programs data.
  • Youll learn to communicate between modules with
    events and exceptions, to organize data and
    procedures into classes, to create expandable
    array-like objects called collections, and to
    save organized data to a file using serialization.

9
Database Connectivity
  • The subset of the .NET Framework that deals with
    connecting an app to a database is called
    ADO.NET.
  • These classes let you use a database as a
    permanent storage area for your applications
    data.

10
Database Connectivity
  • You can use VB to copy databases into memory,
    search the data with VB, edit the data, and save
    the data back to the database.
  • Working with an existing database with VB does
    not require SQL.

11
Windows Web Applications
  • The subset of the .NET Framework that deals with
    connecting an app to a database is called
    ASP.NET.
  • These classes let you create an event-driven web
    page that contains controls.

12
Windows Web Applications
  • You can use VB to build web sites using the same
    techniques as building desktop applications.

13
What You Already Know
  • This is contained on Blackboard in the document
    CISP 370 topics.
  • If you dont feel comfortable with any of these
    topics, plan to meet with me ASAP during office
    hours for a quick tutorial.

14
What You Already Know
  • Lets look at two examples
  • TextBox input data validation
  • Complicated multiple-window WinApp to play craps

15
Simple CISP 370 WinApp
  • This WinApp accepts input in the TextBox and then
    validates the input as a positive integer. If
    input is invalid, then a MessageBox dialog
    informs the user.

16
Simple CISP 370 WinApp
  • Read the code behind MainForm to see the
  • btnProcess_Click() event handler definition
  • the validation technique using Val() and an If
    statement

17
More Complicated WinApp
  • In the past, the last homework in my CISP 370
    asked for a WinApp with three windows that played
    the game of craps.
  • The user could place bets and enable a log file
    to keep track of their bets.
  • The application would determine whether a bet had
    won or lost and update the users bankroll.

18
More Complicated WinApp
  • GUI sketches are a method to design the
    application before writing a single line of
    VB.NET code.
  • In these sketches the developer communicates
    their vision for the abilities of each window.

19
(No Transcript)
20
More Complicated WinApp
  • After the windows have been sketched out, then
    the developer writes the code behind each window.

21
More Complicated WinApp
  • The main window is always on the screen and is
    where the user rolled the dice and managed the
    game. The user can navigate to the other windows
    and exit the app here.

22
More Complicated WinApp
  • The bets window allows the user to place a bet
    prior to their next roll. The allowable bets
    depend on the current state of the game (has the
    point been set?), the table minimum bet, and the
    total amount of money the user has.

23
More Complicated WinApp
  • The show-all-bets window displays the currently
    placed bets and their amount.

24
What You Dont Yet Know
  • How to use .NET Framework classes directly
    (instead of having Visual Studio automatically
    generate the necessary code).
  • How to build customized classes that are based
    upon the .NET Framework.
  • How to group code together into a coherent class
    that other programmers would find useful.

25
What You Dont Yet Know
  • How to connect your app to a database using the
    ADO.NET library.
  • How to build active web pages using .NET
    techniques and the ASP.NET library.

26
My Goal
  • Students who finish this course have enough
    knowledge about using and expanding the .NET
    Framework library to do whatever they like with
    Visual Basic.
  • VB its not just for desktop applications any
    more!
Write a Comment
User Comments (0)
About PowerShow.com