logo资料库

Genero Studio 4GL官方开发手册.pdf

第1页 / 共1563页
第2页 / 共1563页
第3页 / 共1563页
第4页 / 共1563页
第5页 / 共1563页
第6页 / 共1563页
第7页 / 共1563页
第8页 / 共1563页
资料共1563页,剩余部分请下载后查看
Genero Business Development Language User Guide 2.32
Copyright
Table of Contents
General
Introduction
Documentation Conventions
Language Features
Common Terms
Dynamic User Interface
Installation and Setup
Tools and Components
Frequently Asked Questions
General Index
Language Basics
Data Types
Literals
Expressions
Basic Syntax Elements
Exceptions
Variables
Constants
Records
Arrays
User Types
Built-in Classes
Advanced Features
Programs
Database Schema Files
Globals
Flow Control
Functions
Localization
Localized Strings
Data Conversions
Environment Variables
FGLPROFILE
Reports
Upgrading
New Features
I4GL Migration
BDS Migration
1.3x Upgrade Guide
2.0x Upgrade Guide
2.1x Upgrade Guide
2.2x Upgrade Guide
2.3x Upgrade Guide
SQL Management
Database Connections
Transactions
Static SQL
Dynamic SQL
Result Sets
Positioned Updates
Insert Cursors
I/O SQL Instructions
SQL Programming
User Interface (1)
Interaction Model
Windows and Forms
Action Defaults
Presentation Styles
Form Specification Files
Form Attributes
Form Rendering
User Interface (2)
Menus
Record Display
Record Input
Array Display
Array Input
Query By Example
Multiple Dialogs
Prompt for Values
Displaying Messages
User Interface (3)
Toolbars
Topmenus
Tree Views
Drag & Drop
Web Components
StartMenus
Canvas
Message Files
MDI Windows
Front End Functions
Front End Protocol
Built-in Classes (1)
base.Application
base.Channel
base.StringBuffer
base.StringTokenizer
base.TypeInfo
base.MessageServer
ui.Interface
ui.Window
ui.Form
ui.Dialog
ui.ComboBox
ui.DragDrop
Built-in Classes (2)
om.DomDocument
om.DomNode
om.NodeList
om.SaxAttributes
om.SaxDocumentHandler
om.XmlReader
om.XmlWriter
Programming
Compiling Programs
Debugger
Program Profiler
Optimization
Preprocessor
File Extensions
Error Messages
Automatic Source Documentation Editor
Source Code Editing
Tutorial
Summary
Overview
Using Genero BDL
Displaying Data (Windows / Forms)
Query by Example
Enhancing the Form
Add, Update and Delete
Array Display
Array Input
Reports
Localization
Master / Detail
Changing the User Interface Dynamically
Master / Detail using Multiple Dialogs
ODI Adaptation Guides
Genero db
IBM Informix
IBM DB2
Microsoft SQL Server
MySQL
Oracle Server
PostgreSQL
SQLite
Sybase ASE
Sybase ASA
Library
Built-in Functions
Utility Functions
Windows DDE Support
XML Utilities
File Manipulation functions
Mathematical functions
Extending the Language
Java Interface
C-Extensions
Genero Business Development Language User Guide Version 2.32 Copyright © 1995-2011, Four J's Development Tools Europe Ltd. www.4js.com
Copyright © 1995-2011, Four J's Development Tools Europe Ltd. All rights reserved. All information, content, design, and code used in this documentation may not be reproduced or distributed by any printed, electronic, or other means without prior written consent of Four J’s Development Tools. Genero is a registered trademark of Four J’s Development Tools. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks: ® Four Js and its logo are registered trademarks of Four J’s Development Tools Europe Ltd. ® Genero and its logo are registered trademarks of Four J’s Development Tools Europe Ltd. ® Apple, OSX, IOS, iMac, iPhone, iPad and TrueType are registered trademarks of Apple Corps. ® Adabas is a registered trademark of Software AG. ® IBM, AIX, DB2, Dynix, Informix and Sequent are registered trademarks of IBM Corporation. ® Data General and DG/UX are registered trademarks of EMC2 Corporation. ® HP, HP-UX, Digital and Compaq are registered trademarks of Hewlett Packard Corporation. ® Intel is a registered trademark of Intel Corporation. ® Linux is a registered trademark owned by Linus Torvalds. ® Microsoft, MS, NT, XP, Silverlight and Windows are registered trademarks of Microsoft Corporation. ® Oracle, 8i, 9i and 10, Sun Microsystems, Java, JavaBeans, Solaris and MySQL are registered trademarks of Oracle Corporation. ® Red Hat is a registered trademark of Red Hat Inc. ® Silicon Graphics and IRIX are registered trademarks of Silicon Graphics Inc. ® SCO and Unixware are registered trademarks of The Santa Criz Operation. ® All SPARC trademarks are trademarks or registered trademarks of SPARC International, Inc. in the United States and other countries. ® Sybase is a registered trademark of SAP Inc. ® UNIX is a registered trademark of The Open Group for the United States and other countries. ™ WAP is a trademark of Wireless Application Forum Ltd. All other trademarks referenced herein are the property of their respective owners.
Genero Business Development Language User Guide Version: 2.32 Genero Business Development Language General Introduction Documentation Conventions Language Features Common Terms Dynamic User Interface Installation and Setup Tools and Components FAQ List General Index SQL Management Database Connections Transactions Static SQL Dynamic SQL Result Sets Positioned Updates Insert Cursors I/O SQL Instructions SQL Programming Built-in Classes (1) base.Application base.Channel base.StringBuffer base.StringTokenizer base.TypeInfo base.MessageServer ui.Interface ui.Window ui.Form ui.Dialog ui.ComboBox ui.DragDrop Language Basics Data Types Literals Expressions Basic Syntax Elements Exceptions Variables Constants Records Arrays User Types Built-in Classes User Interface (1) Interaction Model Windows and Forms Action Defaults Presentation Styles Form Specification Files Form Attributes Form Rendering Built-in Classes (2) om.DomDocument om.DomNode om.NodeList om.SaxAttributes om.SaxDocumentHandler om.XmlReader om.XmlWriter Advanced Features Programs Database Schema Globals Flow Control Functions Localization Localized Strings Data Conversions Environment Variables FGLPROFILE Reports User Interface (2) Menus Record Display Record Input Array Display Array Input Query By Example Multiple Dialogs Prompt for Values Displaying Messages Programming Compiling Programs Debugger Program Profiler Optimization Preprocessor File Extensions FGL Errors Automatic source documentation generator Source code editing Upgrading New Features I4GL Migration Guide BDS Migration Guide 1.3x Upgrade Guide 2.0x Upgrade Guide 2.1x Upgrade Guide 2.2x Upgrade Guide 2.3x Upgrade Guide User Interface (3) Toolbars Topmenus Tree Views Drag & Drop Web Component StartMenus Canvas Message Files MDI Windows Front End Functions Front End Protocol Tutorial Summary Overview Using Genero BDL Displaying Data (Windows/Forms) Query by Example Enhancing the Form Add/Update/Delete Array Display Array Input Reports Localization Master/Detail Changing the User Interface Dynamically Master/Detail using Multiple Dialogs ODI Adaptation Guides Library Extending the
Language Java Interface C-Extensions Genero db IBM Informix IBM DB2 UDB Microsoft SQL Server MySQL Oracle Server PostgreSQL SQLite Sybase ASE Sybase ASA Built-in Functions Utility Functions DDE Support XML Utilities File Manipulation functions Mathematical functions
Back to Contents Introduction: Genero BDL Concepts Summary: Overview Separating Business Logic and User Interface Portability: Write once, deploy anywhere Advanced programming tools Reports Internationalization User Extensions The Language Database access Interactive statements Language library Forms The User Interface Compiling a BDL Application Deploying a BDL Application Resources for Programmers Overview You typically use Genero to build an interactive database application, a program that handles the interaction between a user and a database. The database schema that organizes data into relational tables gives shape to one side of the program. The needs of your user shape the other side. You write the program logic that bridges the gap between them. An important feature of Genero BDL is the ease with which you can design applications that allow the user to access and modify data in a database. The Genero BDL language contains a set of SQL statements to manipulate the database, and interactive instructions that provide simple record input, read-only list handling, updateable list handling, and query by example (to search the database) using forms to facilitate interaction. Genero BDL is compiled to p-code, which can be interpreted on different platforms by the Dynamic Virtual Machine (the Runtime system).
Separation of Business Logic and User Interface Genero separates business logic and the user interface to provide maximum flexibility: The business logic is written in text files (.4gl source code modules). High-level interactive instructions let you write a form controller in a few lines of code. Forms for the user interface are designed in a simple-to-understand and simple-to-read form definition syntax.. Action views (buttons, menu items, toolbar icons) in the form definition can trigger actions defined in the business logic. Compiling a form definition file translates it into XML. The XML-based presentation layer ensures that user interface development is completely separated from deployment. The user interface can be manipulated at runtime, as a tree of objects called the Abstract User Interface (AUI). Portability - write once, deploy anywhere Genero provides the ability to support different kinds of display devices using the same source code. One production release supports all major versions of Unix, Linux, Windows NT/2000/XP and Mac OS X. The same application can be displayed with a graphical device (GUI mode) as well as on a simple dumb terminal (TUI mode). A single code stream can be written to support HTML, Java, Windows, X.11, WML, MacIntosh OS X and ASCII interfaces simultaneously.
Advanced programming tools Genero BDL comes with a set of useful programming tools, to help you in the application development process: Program debugger Performance profiler Source documentation generator Reports You can easily design and generate Reports. The output from a report can be formatted so that the eye of the reader can easily pick out the important facts. Page headers and footers, with page numbers, can be defined. Data can be grouped together, with group totals and subtotals shown. The output from a report can be sent to the screen, to a printer, to a file, or (through a pipe) to another program, and report output can even be redirected to an SAX filter in order to write XML. Internationalization Genero BDL supports multi-byte character sets by using the POSIX standard functions of the C library. Genero BDL uses byte-length-semantics to specify the length of a character string (i.e. CHAR(10) means 10 bytes). You must make sure that the database client locale matches the runtime system locale. For more details about
internationalization support, see Localization. The Localized Strings feature allows you to customize your application for specific subsets of your user population, whether it is for a particular language or a particular business segment. User Extensions When the standard Genero built-in functions and classes are not sufficient, you can write your own plug-ins by using the Dynamic C Extensions. This allows you to implement specific function libraries in C, which can be called from the BDL modules. Typical User Extensions interface with C libraries to drive specific devices, such as barcode scanners or biometric identification devices. You can instantiate Java objects from Genero by using the Java Interface. This allows you to take benefit of the huge class library of Java. The Language Genero BDL is a high-level, fourth generation language with an open, readable syntax that encourages good individual or group programming style. You write your program logic in text files, or program source modules, which are compiled and linked into programs that can be executed by the Runtime system. Programs are easily enhanced and extended. This makes it easy for programmers to become productive quickly, no matter what programming languages they know. See Programs, Flow Control, Functions for additional information. Database access A set of SQL statements are included as part of the language syntax and can be used directly in the source code, as a normal procedural instruction. The Static SQL Statements are parsed and validated at compile time. At runtime, these SQL statements are automatically prepared and executed by the runtime system. Program variables are detected by the compiler and handled as SQL parameters. Dynamic SQL management allows you to execute any SQL statement that is valid for your database version, in addition to those that are included as part of the language. The statement can be hard-coded or created at runtime, with or without SQL parameters, returning or not returning a result set. Through the native drivers of the Open Database Interface, the same Genero program can open database connections to any of the supported databases. For additional information, see SQL Programming. Interactive Statements Writing the code for interactive database applications has been simplified for you in Genero BDL; single statements automatically compile into the lines of program code required for the common tasks associated with such applications. These interactive statements allow the program to respond to user input. Genero BDL introduces a major improvement with the DIALOG instruction, allowing parts of a form that have different functionality to be handled simultaneously. Using Windows and Forms In Genero, programs manipulate Window and Form objects to define display areas for interactive statements within your program. The Abstract User Interface (AUI) tree contains a definition of these objects. You can open as many windows and forms as needed, subject only to the limits of memory and the maximum number of open files on the platform you are using. The OPEN WINDOW statement creates and opens a new window on the user's screen. The runtime system
分享到:
收藏