Delphi Jon Krueger Matt Merkel Jack Neil. Overview Paradigm and problem domains Language concepts Sample code The history of Delphi Language Comparison.

Slides:



Advertisements
Similar presentations
Programming Languages and Paradigms
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Chapter 7:: Data Types Programming Language Pragmatics
Chapter 10 Introduction to Arrays
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
Brief Introduction on Delphi one of the OOP Languages Presented by Wu-hsun Chan.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
Ryan Piercy Jon Hooker. Invented by Nicklaus Wirth Named After Blaise Pascal Pascal’s Triangle Invented a Digital Computer.
Advanced Object-Oriented Programming Features
Programming Languages Structure
Chapter 8 High-Level Programming Languages Nell Dale John Lewis.
Chapter 8 The Tower of Babel. Chapter Outline Procedural languages Fortran, COBOL, PASCAL, C, Ada Object-oriented programming Special-purpose languages.
Pascal By: Liane Tom. Outline o Background o Data types and Syntax o Procedures and Functions o Advantages o Disadvantages.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Programming Language Concepts
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
Programming Languages and Paradigms Object-Oriented Programming.
Block-Structured Procedural Languages Lecture 11: Dolores Zage.
PASCAL. HISTORY OF PASCAL Developed by Niklaus Wirth a member of the International Federation of Information Processing(IFIP) To provide features that.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
An Introduction to Visual Basic
Tutorial C#. PLAN I. Introduction II. Example of C# program :Hello World III. How to use C# language GUI elements Primitives Types Expressions and operators.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
JavaScript, Fourth Edition
Java Introduction to JNI Prepared by Humaira Siddiqui.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
1 Programming Language History and Evolution In Text: Chapter 2.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Computer Concepts 2014 Chapter 12 Computer Programming.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Chapter 0 Overview. Why you are here? Where will you go? What is this course for?
Chapter 6 Programming Languages (1) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Programming Languages and Paradigms Imperative Programming.
Applications Development
The Evolution of Programming Languages Day 2 Lecturer: Xiao Jia The Evolution of PLs1.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Windows Programming, C.-S. Shieh, KUAS EC, Chapter 0 Overview.
ISM 2110 Programming for Business Applications Lecture 2 - Section 2 Delphi and Object Pascal Basic By Tony Chun-Kuen WONG Tutorial after 12/09/2002.
Chapter 12: Computer Programming 1 Computer Programming Chapter 12.
Principles of programming languages 10: Object oriented languages Isao Sasano Department of Information Science and Engineering.
Object Oriented Software Development 4. C# data types, objects and references.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
CIS 200 Test 01 Review. Built-In Types Properties  Exposed “Variables” or accessible values of an object  Can have access controlled via scope modifiers.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
Programming Language History and Evolution
Programming Languages 2nd edition Tucker and Noonan
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Why study programming languages?
Programming Language History and Evolution
Computer Programming.
Elizabeth Pruett, Eric Gonzalez and Nick Puig
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 12: Computer Programming
Assembly Language for Intel-Based Computers
Programming Languages 2nd edition Tucker and Noonan
Overview of Programming Paradigms
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Presentation transcript:

Delphi Jon Krueger Matt Merkel Jack Neil

Overview Paradigm and problem domains Language concepts Sample code The history of Delphi Language Comparison

Paradigm and problem domains Delphi follows a imperative and OO model The word Imperative come from Latin and means to command. In imperative languages commands update variables. Builds directly on what happens at the hardware level.

Paradigm and problem domains Delphi follows a imperative and OO model You can look at data structures in terms of states. The program is a means to manipulate the states. Variables are used in imperative programming to hold intermediate results of computation. Other major imperative languages include: Fortran, Basic, COBOL, Algol, PL/1, Modula, C, Ada, Perl

Paradigm and problem domains Delphi follows a imperative and OO model Object-Oriented languages are imperative, but considered part of a different paradigm. Delphi is object-oriented Inheritance (single) Polymorphism Encapsulation

Delphi concepts Classes (single inheritance) Interfaces (similar to java) Exception handling Built-in support for Unicode strings and single-byte ANSI strings Very fast compiler and optimizer Compiles to native x86 code.

Delphi concepts Values and types – static, strong, standard primitives (char, real, integer, boolean), enumerated, composite (arrays, records, sets)

Delphi Features Delphi and C++ Builder IDE GUI Builder – drag and drop Source editor Debugger No runtime environment required to execute Delphi object code.

Delphi Structure Program Control Keywords Begin// starts a statement block End// terminates a statement block Exit// exit abruptly from a function or procedure Halt// terminates the program with an optional dialog Try// starts code that has error trapping Uses// declares a list of units (modules) to be imported Var// starts the definition of a section of data variables

Delphi Structure Some routines provided with DELPHI Erase// Erase a file FileSearch// Search for a file in numerous directories FileSetDate// Set the last modified date and time of a file Flush// Flushes buffered text file data to the file Truncate// Truncates a file size TStringList// A class provided with DELHPI that has methods for loading and writing a list of strings from a text file

Delphi Example Reading and writing files var myFile : TextFile; begin AssignFile(myFile, ‘Test.txt’); ReWrite(myFile); //Opens file as new – discards existing contents Append(myFile); //Opens file for appending new data to end Reset(myFile); //Opens a file for read and write access

Delphi Example A class example

Unit Stringy; interface type TString = Class private stText: String; stWordCount: Integer; stFindString : String; stFindPosition : Integer; procedure GetWordCount; procedure SetText(const Value: String); published constructor Create(Text : String); function Replace(from, toStr : String) : Integer; function FindFirst(search : String) : Integer; function FindNext : Integer; property Text : String read stText write SetText; property WordCount : Integer read stWordCount; end;

//continuation of last slide implementation uses SysUtils, StrUtils; constructuror TStringy.Create(Text: String); begin stText:= Text; stFindPosition:= 1; stFindString := ‘’; GetWordCount; end; procedure TStringy.SetText(const Value: String); stText:= Value; stFindPosition := 1; GetWordCount; end; //other methods here

unit Main; uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Stringy; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; procedure TForm1.FormCreate(Sender: TObject); var myText: TStringy; count: integer; position: integer;

//continuation of last slide begin myText := TStringy.Create(‘The cat in the hat’); myText.Text := ‘There was a cat’; end; end.

History of Delphi Delphi’s predecessors date back to as early as 1968 In 1968, a man named Niklaus Wirth began work on a programming language called Pascal, which he completed in 1970 with its first working implementation appearing on a CDC6000 Computer

The Evolution of Pascal In the 1970s, Wirth worked with Jensen on Modula, the next child of Pascal In the very early 1980s, Turbo Pascal was born, and received good press for its excellent compilation and execution speed

Delphi Is Born In the 1990s, a project began at Borland with the Greek Mythological code-name “Delphi” Borland liked the code-name enough to actually use it as the product name 1995, Borland’s Delphi was introduced as an Object-Oriented version of Turbo Pascal

Delphi’s Market Delphi’s main asset was its speed, both in compilation and execution (just like Turbo Pascal) Designed specifically for RAD (Rapid Application Development) Ideal for anything from Business and Database applications to intensive application development

Comparison of Delphi Delphi is most closely related to Visual Basic more than any other programming language Delphi incorporates Object-Orientation but Visual Basic is much more like traditional Basic in the fact that, it is not Object-Oriented

Comparison of Delphi Memory management weighs in Delphi’s favor because the programmer has more freedom in managing objects, such as removing them when they are no longer needed, instead of waiting on a “garbage collector.” Delphi is also broader in the sense of what types of applications it can be used for, whereas Visual Basic’s main applications include only business and database applications

Comparison of Delphi Lower (hardware and time) cost of execution than Visual Basic Visual Basic tends to be easier to learn for someone who is not agile or experienced with programming Visual Basic is more commonly used New programmers are taught Visual Basic

References A comparison between Delphi and Visual Basic Borland History: Why the name "Delphi?" Delphi Basics: A brief history of Borland’s Delphi Delphi Basics