©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021

Slides:



Advertisements
Similar presentations
Chapter 7: User-Defined Functions II
Advertisements

The Web Warrior Guide to Web Design Technologies
CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
Object-Oriented PHP (1)
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
C# Programming: From Problem Analysis to Program Design1 Advanced Object-Oriented Programming Features C# Programming: From Problem Analysis to Program.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
ASP.NET Programming with C# and SQL Server First Edition
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
OOP Languages: Java vs C++
Introduction To System Analysis and design
Neal Stublen Overview of.NET Windows Applications Microsoft Windows OS / Intel Platform Windows Application File SystemNetworkDisplay.
Programming Languages and Paradigms Object-Oriented Programming.
Microsoft Visual Basic 2005: Reloaded Second Edition
Neal Stublen Class Objectives  Develop an understanding of the.NET Framework  Gain proficiency using Visual Studio  Begin learning.
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
Chapter 8 More Object Concepts
(C) 2010 Pearson Education, Inc. All rights reserved. Java™ How to Program, 8/e.
Using Visual Basic 6.0 to Create Web-Based Database Applications
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
© All rights reserved. U.S International Tech Support
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
JavaScript, Fourth Edition
The Java Programming Language
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
E FFECTIVE C# 50 Specific Ways to Improve Your C# Second Edition Bill Wagner محمد حسین سلطانی.
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
© All rights reserved. U.S International Tech Support
© All rights reserved. U.S International Tech Support
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 26 - Java Object-Based Programming Outline 26.1Introduction.
Copyright © 2015 Curt Hill Java for Minecraft Those things you should know.
© BASIS International Ltd. All rights reserved. U.S. Sales: Worldwide Sales:
© All rights reserved. U.S International Tech Support
CS-1030 Dr. Mark L. Hornick 1 Basic C++ State the difference between a function/class declaration and a function/class definition. Explain the purpose.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Liang, Introduction to Java Programming, Tenth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 19 Generics.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Introduction to Object-Oriented Programming Lesson 2.
Programming with Microsoft Visual Basic th Edition
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Classes, Interfaces and Packages
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Creating Java Applications (Software Development Life Cycle) 1. specify the problem requirements - clarify 2. analyze the problem - Input? Processes? Output.
Object-Oriented Programming Using C++ Third Edition Chapter 7 Using Classes.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Chapter 3: Using Methods, Classes, and Objects
Lecture 22 Inheritance Richard Gesick.
CSE 1030: Implementing GUI Mark Shtern.
Fundaments of Game Design
(Computer fundamental Lab)
Object Oriented Programming in java
Defining Classes and Methods
The Lua Chunk Vault, an enhancement to epics base
Presentation transcript:

© All rights reserved. U.S International Tech Support Language Objects Dr. Kevin King, Chief Information Officer Brian Hipple, Quality Assurance Supervisor BASIS International Ltd.

© All rights reserved. U.S International Tech Support Overview ► Object-oriented Business BASIC ► TechCon2006 workbench ► Retrofitting legacy code into Objects ► Event Objects ► Type checking ► Memory management ► Autorun

© All rights reserved. U.S International Tech Support Why Use Objects? ► Objects closely model the real world Customer object models an actual customer Inventory object models an inventory item ► Self-contained Each object carries both methods and its internal state Building blocks for constructing larger applications ► Controlled access Interaction is through defined methods Internal data is hidden Internal implementation can evolve over time

© All rights reserved. U.S International Tech Support Object-Oriented Languages ► Java ► C++ ► C# ► Visual Basic BBx

© All rights reserved. U.S International Tech Support Introduction to Object-Oriented Programming (a Primer) ► Reusability ► Compartmentalization ► Encapsulation ► Readability ► Scoping

© All rights reserved. U.S International Tech Support New Custom Object Keywords ► CLASS – Marks the beginning of a class definition ► CLASSEND – Marks the end of a class definition ► Access Modifiers PUBLIC – Accessible from all PRIVATE – Accessible only within the given class PROTECTED – Accessible within the given class and derived classes STATIC – Makes field values and methods persist across all instances of a class within an interpreter. An instance of the object is not required to utilize. ► FIELD – Class member or data variable, can be another class

© All rights reserved. U.S International Tech Support Red Class class public Red field public BBjString RedString method public void RedMethod() print "RedMethod!" methodend classend

© All rights reserved. U.S International Tech Support Blue Class Class public Blue extends Red field public BBjString RedString field public BBjString BlueString method public void RedMethod() method public void BlueMethod() print "BlueMethod!" methodend classend

© All rights reserved. U.S International Tech Support Black Interface interface public Black method public void BlackString() print "BlackString!" methodend interfaceend

© All rights reserved. U.S International Tech Support Green Class Class public Green extends Blue implements Black field public BBjString RedString field public BBjString BlueString field public BBjString GreenString method public void RedMethod() method public void BlueMethod() method public void BlackMethod() method public void GreenMethod() print "GreenMethod!" methodend classend

© All rights reserved. U.S International Tech Support Code Completion Vignette

© All rights reserved. U.S International Tech Support Techcon06 Workbench Demonstration

© All rights reserved. U.S International Tech Support Object-Oriented Workbench ► Points to ponder ► Steps to success ► Reasons and rationale ► Benevolent benefits ► Accurate architecture ► Features and functions ► Pinning performance

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Points to Ponder ► Object-oriented vs. procedural ► Relate functionality and data ► Base classes – reusable code ► Extended classes – reduce code ► Interface classes – flexible code ► Time Value Readability Usability Maintainability

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Steps to Success ► Create MDI host ► Create Toolbar, AppTree, SourceViewer ► Create extendable infrastructure BBj and 6.0 Visual PRO/5 Third party ► Document and publish classes

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Reasons and Rationale ► Structurally similar to human thinking ► Similar to Java, C++,.NET, Visual Basic, etc. ► Gives developers code-completion ► Reduced overall bugs ► Reduced coding time ► Reduced debugging time ► Reduced documentation time

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Benevolent Benefits ► Provided written and tested extendable classes ► Provided common code interface ► Provided common look and feel ► Provided common features and functions ► Provided access to BACKGROUND processing

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Accurate Architecture

Object-Oriented Workbench

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Features and Functions ► MDI ► Virtual desktop ► Toolbar ► Tree ► Source view ► Application monitor

© All rights reserved. U.S International Tech Support Object-Oriented Workbench Production & Pinning Performance ► Single parsing of class definition ► Never checked for Changes Deletions File reference changes ► Unpin options Programmatic  BBjAPI->BBjAdmin->BBjAdminEnvironment->unpinAllPrograms() Manual  Enterprise Manager ► See the speed…

© All rights reserved. U.S International Tech Support Enhanced Performance of Pinned and CALLed Programs in BBj 6.00 Demonstration

© All rights reserved. U.S International Tech Support Benefits of Custom Objects ► Code reusability ► Code readability ► Data encapsulation ► Variable scoping ► Code-completion ► Modern programming architecture ► Intuitive programming ► Simplified debugging

© All rights reserved. U.S International Tech Support Retrofitting Legacy Code Into Objects ► CUI READ RECORD from console channel No event loop ► GUIBuilder READ RECORD from SYSGUI channel Receives all events per event mask ► BBjAPI PROCESS_EVENTS Receives only events registered for Event Objects

© All rights reserved. U.S International Tech Support CUI – READ RECORD Demonstration

© All rights reserved. U.S International Tech Support CUI – READ RECORD Source Code

© All rights reserved. U.S International Tech Support GUIBuilder – READ RECORD Demonstration

© All rights reserved. U.S International Tech Support GUIBuilder – READ RECORD Source Code

© All rights reserved. U.S International Tech Support BBjAPI ProcessEvents Objects Demonstration

© All rights reserved. U.S International Tech Support BBjAPI ProcessEvents Objects Source Code

© All rights reserved. U.S International Tech Support Event Objects ► Object-oriented which contain event information ► Provide methods to access event information ► Created Automatically when event occurs Programmatically  BBjAPI::postCustomEvent, BBjAPI::postPriorityCustomEvent ► Accessed BBjAPI::getLastEvent() As a parameter to object based event handler

© All rights reserved. U.S International Tech Support Event Objects Source Code

© All rights reserved. U.S International Tech Support Type Checking Features ► Option for bbjcpl to enable type checker ► Can specify prefix via the command line or from a config file ► Verbs facilitate IDE code completion ► Optionally warns about unsafe uses of undeclared expressions to allow incremental code improvement ► bbjcpl options integrated into IDE compiler configuration

© All rights reserved. U.S International Tech Support Type Checking ► Compile-time Command line – bbjcpl  Options -t Enables type checking -W Enables warnings about undeclared variables -P Specifies a prefix for files containing Custom objects -c Specifies a config file which contains prefix information BASIS IDE  Tools->Options->BBj Compiler Settings ► Runtime !ERROR=26 Mismatch ► Opt in strategy

© All rights reserved. U.S International Tech Support Type Checking Types ► BBjNumber Numeric expressions Assignment compatible to boolean, Boolean, java.lang.Integer, BBjInt ► BBjInt Integer expressions Assignment compatible to Java integer numeric types, boolean ► BBjString String expressions Assignment compatible to java.lang.String and byte[] $ suffix

© All rights reserved. U.S International Tech Support Type Checking Types ► Objects ! Suffix BBjAPI  Obtained by calling a BBjAPI() method mdi! = BBjAPI().getMDI() Java  Obtained by instantiating a Java object or method call states! = new java.util.HashMap() Custom  Obtained by instantiating a Custom object or method call workbenchMDI! = new WorkbenchMDI()

© All rights reserved. U.S International Tech Support Type Checking DECLARE Verb ► Provides a contract between the developer and BBj ► Contract specifies that declared variable will never contain anything other than the declared type ► Example DECLARE java.util.HashMap a! a! = new java.util.HashMap() a!.put("dog", new java.lang.Integer(5))

© All rights reserved. U.S International Tech Support Type Checking CAST Function ► Changes the declared type of an expression to a specified type ► Use sparingly ► Failure invokes error branch ► Example DECLARE java.util.HashMap a! a! = new java.util.HashMap() a!.put( " dog ", new java.lang.Integer(5)) a!.put( " cat ", new java.lang.Integer(6))... b = CAST(BBjNumber, a!.get( " dog " ))

© All rights reserved. U.S International Tech Support Type Checking Benefits ► Detects potential runtime errors at compile time ► Improves code robustness ► Encourages good programming practices

© All rights reserved. U.S International Tech Support Type Checking Command Line Demonstration

© All rights reserved. U.S International Tech Support Type Checking BASIS IDE Demonstration

© All rights reserved. U.S International Tech Support Autorun ► BACKGROUND replacement ► Auto starting daemon/service ► Programs run when BBjServices starts ► Configuration options Name of program config.bbx file Initial working directory User Set default values for all options ► Licensing infinite number of programs for one licensed user

© All rights reserved. U.S International Tech Support Autorun ► Background processing Server process Listener processes Worker process Socket server Print server ► AppMonitor built into the workbench – Demo ► Basic sample writing out the starting of BBjServices - Demo

© All rights reserved. U.S International Tech Support Autorun Source Code

© All rights reserved. U.S International Tech Support Autorun in Enterprise Manager Demonstration

© All rights reserved. U.S International Tech Support Autorun AppMonitor Demonstration

© All rights reserved. U.S International Tech Support Memory Management ► Caching algorithm modified Programs Resources ► Performance improvements ► Fault tolerant

© All rights reserved. U.S International Tech Support Summary ► Object-oriented Business BASIC ► TechCon2006 workbench ► Retrofitting legacy code into Objects ► Event Objects ► Type checking ► Memory management ► Autorun