1 / 24

CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic

CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic. UTPA – Fall 2011. Demo. Objectives. In this chapter, you will Recall basic components in a computer system Learn the evolution of programming language Learn the history of Visual Basic

gur
Télécharger la présentation

CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic UTPA – Fall 2011

  2. Demo

  3. Objectives • In this chapter, you will • Recall basic components in a computer system • Learn the evolution of programming language • Learn the history of Visual Basic • Find the differences between structural programing and object-oriented programing • Become aware of the .NET Framework for Visual Basic

  4. CSCI 1380: Elements of a Computer System • Hardware • CPU • Main memory • Secondary storage • Input / Output devices • Software • System programs • Application programs (e.g. Visual Basic)

  5. Programming Languages • Machine language • Assembly language • High-level language

  6. History of Visual Basic • BASIC (Beginner's All-purpose Symbolic Instruction Code) • 1960, Profs Kemeny and Kurtz • 1970s, Bill Gates implemented BASIC on several early PCs • Late 1980s ~ early 1990s, Microsoft developed Microsoft Windows graphical user interface (GUI) • Basic  Visual Basic • Visual Basic is created in Integrated Development Environment (IDE)

  7. Milestones • Structured Programming  Disciplined approach to creating clear, correct and easy to modify programs. Pascal 1971 • Procedural Programming • Object Technology  Packaging Scheme for creating meaningful software units

  8. Object Technology • We humans are very good in recognizing and working with objects, such as a pen, a dog, or a human being. • We learned to categorize them in such a way that make sense to us. We may categorize them as animate object, inanimate objects, pets, friends, etc.

  9. Object Technology (cont'd) • We some times classify objects based on their attributes, for example, green apples or red apples, fat or slim people, etc. • If you think about it each object has many attributes. If I ask you list the attributes of an orange, you probably could list many things such as color, shape, weight, smell, etc.

  10. Object Technology (cont'd) • In addition to attributes, all objects exhibit behaviors. • A dog eats, barks, wags its tail, plays, and begs. A dog exhibits many more other behaviors than this short list. • Another thing we need to remember about objects is that objects interact between each other.

  11. Object Technology in Visual Basic • Visual Basic • Object-oriented • E.g. forms, labels, buttons, radios, checkboxes, etc. • Properties of objects • E.g. background color of forms • Event-driven • Behaviors  events of objects • E.g. clicks

  12. XML (eXtensible Markup Language) • HTML has fixed tags which is a limitation • XML is definable • Separation of data from description of data (data independence) • XML can be used by any software or language

  13. ARTICLE.XML file • <?xml version = "1.0"?> • <!-- Article structured with XML --> • <article> • <title>Simple XML</title> • <date>December 6, 2001</date> • <author> • <firstName>John</firstName> • <lastName>Doe</lastName> • </author> • <summary>XML is pretty easy.</summary> • <content>In this chapter, we present a wide variety of examples that use XML. • </content> • </article>

  14. What is .NET? • .NET is an Internet and Web based infrastructure • .NET delivers software as Web Services– XML based. • .NET will run in any browser on any platform • .NET framework is the infrastructure for the new Microsoft .NET Platform.

  15. What are Web Services? • Applications that run on a web server and communicate with other applications • The basic platform of Web services is XML + HTTP

  16. What is .NET built on? • Windows Servers: • SQL • Application Center • Commerce Server • Mobile Information Server • Exchange Server • BizTalk Server • Internet Security • Host Integration

  17. .NET Framework • A software platform • Language-neutral • Designed for cross-language compatibility • Applications written in VB may reference a DLL file written in any other language • 2 components: • Common Language Runtime (CLR) • Class Libraries

  18. Common Language Runtime • Execution Engine of .NET • Manages the execution of programs and provides core services: • Code compilation • Memory allocation • Thread management • Garbage collection

  19. Common Language Runtime (cont'd) • Output of .Net compilation contains a special type of code called Microsoft Intermediate Language (MSIL); it is not executable • MSIL is independent of any specific CPU. • CLR translates MSIL to executable code when the program is executed • Executable code is produced using JIT (just-in-time) compiler. The native code produced by JIT is specific for the CPU.

  20. Class Libraries • Designed to integrate with the common language runtime • This library gives the program access to runtime environment • The class library consists of lots of prewritten code that all the applications created in VB .NET and Visual Studio .NET will use • The code in Visual Basic for all the elements like forms, and controls actually comes from the class library

  21. Reasons Why Developers Build Applications Using the .NET Framework • Improved Reliability • Increased Performance • Developer Productivity • Powerful Security • Integration with Existing Systems • Ease of Deployment • Mobility Support • XML Service Support • Support for over 20 Programming Languages • Flexible Data Access

  22. Visual Basic (VB) • Forms designer • In-place menu editor • Automatic control anchoring and docking • Integrated Development Environment (IDE) • Create Web applications using the shared Web forms designer • Full object-oriented constructs - inheritance, encapsulation, and polymorphism

  23. Concepts of Object-Oriented Programming • Objects • Classes • Data Abstraction and Encapsulation • Inheritance • Polymorphism

  24. VB Object-Oriented Approach • Emphasis on data rather than procedure • Programs are divided into Objects • Data is hidden and cannot be accessed by external functions • Objects can communicate with each other through functions • E.g. click event of a button • New data and functions can be easily added whenever necessary • Follows bottom-up approach

More Related