VB in Context Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh Pittsburgh, Pa 15260

Slides:



Advertisements
Similar presentations
Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Advertisements

Programming Languages and Paradigms
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Names and Bindings.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
Lab#1 (14/3/1431h) Introduction To java programming cs425
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Ch.2: Syntax and Semantics Fall 2005.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
PLLab, NTHU Cs2403 Programming Languages Implementation Issues Cs2403 Programming Language Spring 2005 Kun-Yuan Hsieh.
Department of Information Science and Telecommunications Interactive Systems Michael B. Spring Department of Information Science and Telecommunications.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
CSE S. Tanimoto Syntax and Types 1 Representation, Syntax, Paradigms, Types Representation Formal Syntax Paradigms Data Types Type Inference.
1 Run time vs. Compile time The compiler must generate code to handle issues that arise at run time Representation of various data types Procedure linkage.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Names and Bindings Introduction Names Variables The concept of binding Chapter 5-a.
Processes CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
CSE 341, S. Tanimoto Concepts 1- 1 Programming Language Concepts Formal Syntax Paradigms Data Types Polymorphism.
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Introduction to FORTRAN
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
CIS 199 Test 01 Review. Computer Hardware  Central Processing Unit (CPU)  Brains  Operations performed here  Main Memory (RAM)  Scratchpad  Work.
CS 403: Programming Languages Lecture 2 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CS 363 Comparative Programming Languages
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
Names Variables Type Checking Strong Typing Type Compatibility 1.
5-1 Chapter 5: Names, Bindings, Type Checking, and Scopes Variables The Concept of Binding Type Checking Strong Typing Type Compatibility Scope and Lifetime.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
Programming Language C++ Xulong Peng CSC415 Programming Languages.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Programming Languages and Paradigms Imperative Programming.
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan.
These notes were originally developed for CpSc 210 (C version) by Dr. Mike Westall in the Department of Computer Science at Clemson.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Variables reference, coding, visibility. Rules for making names  permitted character set  maximum length, significant length  case sensitivity  special.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Processes and Threads MICROSOFT.  Process  Process Model  Process Creation  Process Termination  Process States  Implementation of Processes  Thread.
What is a Process ? A program in execution.
CS533 Concepts of Operating Systems Jonathan Walpole.
Names, Scope, and Bindings Programming Languages and Paradigms.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Operational Semantics (Slides mainly.
RealTimeSystems Lab Jong-Koo, Lim
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Software Architecture of Sensors. Hardware - Sensor Nodes Sensing: sensor --a transducer that converts a physical, chemical, or biological parameter into.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Introduction to Operating Systems Concepts
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Representation, Syntax, Paradigms, Types
Representation, Syntax, Paradigms, Types
CSCE 330 Programming Language Structures Ch.2: Syntax and Semantics
CS285 Introduction - Visual Basic
Representation, Syntax, Paradigms, Types
Representation, Syntax, Paradigms, Types
Presentation transcript:

VB in Context Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh Pittsburgh, Pa Web: Voice: (412) Fax: (412)

The Value of History Unix 1980 Ethernet 1998 Wireless 1993 WWW 1994 Java C C/Basic 1999 Java Visual Basic 2002 VB.NET 1999 XML

Design Methodology and Language Capability Computer architecture constrains language design and language design constrains system design Some languages are better suited to different design methodologies Languages have evolved, in response to SAD needs –Data abstraction –Structure abstraction –Modularization –Componentization

Language Design Goals Language design goals originate with the software development process goals –Software must be reliable It must be “writable” (e.g. match to the problem) It must be readable (e.g. ability to follow logic) It must be able to deal with exceptions (e.g. trapping) –Software must be maintainable (e.g. constants) –Software must execute efficiently (e.g. automatic optimization)

Abstraction A programming language is an abstraction of the underlying processor and computer. A program is an abstraction of some problem The history of programming languages may be viewed as an effort to ever greater abstraction –Abstraction of data types –Abstraction of process structures –Abstraction of arbitrary data types –Abstraction of modules

Data Abstraction A byte is a byte is a byte –The problem of streams -- sockets –Big and little endian –Floating point variation – exponent and mantissa Structures and Unions –Type declaration –Variable declaration –Variable definition

Control Abstraction Basic computer control is provided with two simple mechanisms –Sequencing –Branching These mechanisms, in various forms are abstracted as: –Sequencing –Selection (single, double, and multiple) –Repetition (do/while, while, and for) Blocks of code are further abstracted as modules or subprograms

Selected Programming Concepts Variable scope and lifetime Weak and strong typing Early and Late Binding Recursion Multithreading Exception handling

Variables: Scope and Lifetime The scope of a variable is the range of program instructions over which a variable is known and over which it can be manipulated –Global static –Local static –Program dynamic The lifetime of a variable is the period of time over which its storage space is provided: –Static –Stack –Dynamic

Weak and strong typing Typing is the specification of the class of the allowable values of a variable. In C, typing is very weak and the contents of any particular memory location may generally be interpreted differentially –Booleans and ints –Addition of characters Weak typing generally allows implicit conversions Strong typing requires explicit cast or method based conversions

Early and Late Binding Binding refers to when the attributes (required for execution) of some object (variable or module) are set. Early binding generally means that these attributes are set at the time of compilation Late binding means that the attributes are set at time of execution

Recursion Recursion is a programming language feature that allows a module to invoke itself It is required that the algorithm have a recursion termination condition private static long factoral(long a) { if (a==1) {return 1;} else {return a*factoral(a-1);} }//factoral

Multiprocessing and Multithreading Modern OS allow for multiple processes and multiple threads within a process Processes –Share files and selected other objects –Do not share memory –Forking is the invocation mechanism Threads –Share memory and must be memory synchronized –Threads are very common in Java

Exception handling Exception handling has to do with the provision in a language for dealing with possible function failures –In C, return values of the functions are the mechanism used to handle exceptions –In Java, catch/try blocks and “exception throwing” are the mechanism General, system failures are handled by signals and signal handlers

WIMPS – A Programming Model WIMP interfaces are developed in a “sandbox” The sandbox is an event collector and dispatcher Objects within the sandbox are event generators –Objects form a hierarchy of containers and components –Objects are capable of generating different events Mouse action events Exposure events Change events Action events Code fragments are written to handle events and then registered

Common Elements of A User Interface Tookit Command Tools –Menus –Dialog boxes Selection Tools –Command buttons –Radio buttons –Check boxes –Text fields –Palettes and choosers Navigation Tools –Scroll bars –Hands –Murals/Maps Status Tools –Status bars –Cursors