3 Objectives In this chapter, you will Recall basic components in a computer systemLearn the evolution of programming languageLearn the history of Visual BasicFind the differences between structural programing and object-oriented programingBecome aware of the .NET Framework for Visual Basic
4 CSCI 1380: Elements of a Computer System HardwareCPUMain memorySecondary storageInput / Output devicesSoftwareSystem programsApplication programs (e.g. Visual Basic)
5 Programming Languages Machine languageAssembly languageHigh-level language
6 History of Visual Basic BASIC (Beginner's All-purpose Symbolic Instruction Code)1960, Profs Kemeny and Kurtz1970s, Bill Gates implemented BASIC on several early PCsLate 1980s ~ early 1990s, Microsoft developed Microsoft Windows graphical user interface (GUI)Basic Visual BasicVisual Basic is created in Integrated Development Environment (IDE)
7 MilestonesStructured Programming Disciplined approach to creating clear, correct and easy to modify programs. Pascal 1971Procedural ProgrammingObject Technology Packaging Scheme for creating meaningful software units
8 Object TechnologyWe 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 Object-orientedE.g. forms, labels, buttons, radios, checkboxes, etc.Properties of objectsE.g. background color of formsEvent-drivenBehaviors events of objectsE.g. clicks
12 XML (eXtensible Markup Language) HTML has fixed tags which is a limitationXML is definableSeparation 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 applicationsThe basic platform of Web services is XML + HTTP
16 What is .NET built on? Windows Servers: SQL Application Center Commerce ServerMobile Information ServerExchange ServerBizTalk ServerInternet SecurityHost Integration
17 .NET Framework A software platform Language-neutral Designed for cross-language compatibilityApplications written in VB may reference a DLL file written in any other language2 components:Common Language Runtime (CLR)Class Libraries
18 Common Language Runtime Execution Engine of .NETManages the execution of programs and provides core services:Code compilationMemory allocationThread managementGarbage 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 executableMSIL is independent of any specific CPU.CLR translates MSIL to executable code when the program is executedExecutable 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 environmentThe class library consists of lots of prewritten code that all the applications created in VB .NET and Visual Studio .NET will useThe 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 ReliabilityIncreased PerformanceDeveloper ProductivityPowerful SecurityIntegration with Existing SystemsEase of DeploymentMobility SupportXML Service SupportSupport for over 20 Programming LanguagesFlexible Data Access
22 Visual Basic (VB) Forms designer In-place menu editor Automatic control anchoring and dockingIntegrated Development Environment (IDE)Create Web applications using the shared Web forms designerFull object-oriented constructs - inheritance, encapsulation, and polymorphism
23 Concepts of Object-Oriented Programming ObjectsClassesData Abstraction and EncapsulationInheritancePolymorphism
24 VB Object-Oriented Approach Emphasis on data rather than procedurePrograms are divided into ObjectsData is hidden and cannot be accessed by external functionsObjects can communicate with each other through functionsE.g. click event of a buttonNew data and functions can be easily added whenever necessaryFollows bottom-up approach