Docsity

Introduction to Visual Basic - Electronic Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

Partial preview of the text

Download Introduction to Visual Basic - Electronic Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Introduction to Visual Basic and

the VB Integrated Development

Environment

Docsity.com

Learning Objectives

  • To describe the .NET framework
  • Use the VB IDE to create Windows applications
  • Understand the fundamentals of the VB programming language
  • Use VB’s decision and looping structures
  • Work with the IDE debugging features

Integrated Development Environment

(IDE) (cont’d)

  • IDE supports various programming languages
  • Example - VS 2005 IDE supports multiple languages
    • C# (C-Sharp)
    • J# (J-Sharp)
    • C++
    • Visual Basic (VB)

.NET Framework

  • Provides the foundation for .NET applications
  • Primary components
    • Common Language Runtime (CLR)
    • Framework Class Libraries (FCL)
  • Common Language Runtime (CLR)
    • Environment that provides services to manage application execution, regardless of the development programming language

The Common Language Runtime (CLR)

  • Environment that provides services to manage application execution, regardless of the development programming language
  • Provides the execution engine for .NET framework applications
  • Ensures that programs are reliable and do not harm other applications

Common Language Runtime - Services

  • Loading and executing an application’s code
  • Isolating application memory to prevent one application from harming another
  • Converting Microsoft Intermediate Language code to native code
  • Enforcing code access security
  • Handling exceptions
  • Supporting debugging

Common Language Runtime -

Terms

  • Source code
    • Commands of the program written in any language by the user
  • Compiler
    • Program that decodes instructions written in a higher-level language and produces instructions in a lower-level language such as assembly language

Common Language Runtime –

Terms (cont’d)

  • MS Intermediate Language (MSIL) code
    • Hardware-independent set of instructions that can be efficiently converted to native binary code to run on a specific hardware platform
    • MSIL code file has an .exe or .dll file extension
  • Executable file
    • A file with an .exe extension
    • Can directly run on a computer

Assembly

  • A .NET source code is compiled into an .exe or .dll

MSIL file

  • Contains MSIL code, as well as program configuration

information about content, versioning, and dependencies on other programs

  • Makes applications more reliable and easier to

deploy

Registry

  • Hierarchical database that stores system and

program configuration information

  • Every workstation that runs the Microsoft

Windows operating system contains a registry

  • Registry is difficult to configure and repair
  • .NET applications do not rely on registry

JIT Compiler - Steps

  • Compiles an assembly when user runs for the first time
  • The executable code is cached, or stored, on the target computer in either NAC or GAC
  • Native Assembly Cache (NAC)
    • Stores stand-alone executable programs
  • Global Assembly Cache (GAC)
    • Stores programs that multiple applications share

Framework Class Libraries

  • Libraries that contain code assisting with common programming tasks
  • Namespace
    • Naming scheme that uses a hierarchical dotted naming convention to provide a hierarchical, folder-like organization for FCL classes
    • Example System.Windows.Forms – To create graphical user interfaces

Components of IDE

  • Document window
    • Main window that displays the Start Page
  • Toolbox tab
    • Allows user to access tools to create application items such as command buttons and lists
  • Solution Explorer window
    • Displays user’s solutions and their components hierarchically

Components of IDE (cont’d)

  • Project
    • Collection of files that comprise an application
    • A project contains one or more forms
  • Forms
    • Objects containing the application items with which a user interacts, such as text boxes, buttons, and labels, along with the code to make these items functional
  • Solution
    • Made up of one or more projects