HOME

TheInfoList



OR:

EGL (Enterprise Generation Language), originally developed by IBM and now available as the EDT (EGL Development Tools) open source project under the
Eclipse Public License The Eclipse Public License (EPL) is a free and open source software license most notably used for the Eclipse IDE and other projects by the Eclipse Foundation. It replaces the Common Public License (CPL) and removes certain terms relating to li ...
(EPL), is a programming technology designed to meet the challenges of modern, multi-platform application development by providing a common language and programming model across languages, frameworks, and runtime platforms.


Overview

The language borrows concepts familiar to anyone using statically typed languages like Java,
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily us ...
, C, etc. However, it borrows the concept of
stereotype In social psychology, a stereotype is a generalized belief about a particular category of people. It is an expectation that people might have about every person of a particular group. The type of expectation can vary; it can be, for example ...
from
Unified Modeling Language The Unified Modeling Language (UML) is a general-purpose, developmental modeling language in the field of software engineering that is intended to provide a standard way to visualize the design of a system. The creation of UML was originally ...
(UML) that is not typically found in statically typed programming languages. In a nutshell, EGL is a higher-level, universal application development language. EGL is similar in syntax to other common languages so it can be learned by application developers with similar previous programming background. EGL application development abstractions shield programmers from the technical interfaces of systems and middleware allowing them to focus on building business functionality. EGL applications and services are written, tested and debugged at the EGL source level, and once they are satisfactorily functionally tested they can be compiled into COBOL, Java, or JavaScript code to support deployment of business applications that can run in any of the following environments: *Platforms with a Java virtual machine, such as Microsoft Windows, Linux, and UNIX, for example in the context of a Java EE servlet container (
IBM WebSphere Application Server WebSphere Application Server (WAS) is a software product that performs the role of a web application server. More specifically, it is a software framework and middleware that hosts Java-based web applications. It is the flagship product wi ...
,
Apache Tomcat Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It provides a "pure Java" HTTP web server environment in which Java code can also ...
, GlassFish) * IBM System z:
CICS Transaction Server IBM CICS (Customer Information Control System) is a family of mixed-language application servers that provide online transaction management and connectivity for applications on IBM mainframe systems under z/OS and z/VSE. CICS family products ...
,
IMS Ims is a Norwegian surname. Notable people with the surname include: * Gry Tofte Ims (born 1986), Norwegian footballer * Rolf Anker Ims (born 1958), Norwegian ecologist See also * IMS (disambiguation) Ims is a Norwegian surname. Notable people wit ...
, z/OS Batch,
UNIX System Services z/OS UNIX System Services (z/OS UNIX, or informally USS) is a base element of z/OS. z/OS UNIX is a certified UNIX operating system implementation (XPG4 UNIX 95) optimized for mainframe architecture. It is the first UNIX 95 to not be derived ...
, WebSphere Application Server,
z/VSE VSEn (''Virtual Storage Extended'') is an operating system for IBM mainframe computers, the latest one in the DOS/360 lineage, which originated in 1965. DOS/VSE was introduced in 1979 as a successor to DOS/VS; in turn, DOS/VSE was succeeded by ...
, Linux * IBM Power Systems: IBM i, IBM WebSphere Application Server,
Apache Tomcat Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It provides a "pure Java" HTTP web server environment in which Java code can also ...
, Integrated Web Application Server for i * Web browsers supporting JavaScript, such as Internet Explorer, Firefox, and Safari, for
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Greek ...
rich web applications A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...


Code examples


Program

An EGL Program part is a generatable logic part with one entry point. Each Program part contains a main() function, which represents the logic that runs at program start up. A program can include other functions and can access functions that are outside of the program. The function main() can invoke those other functions. Program functions are composed of a set of EGL statements, variables, and constants. Program HelloWorld const GREETING string = "Hello, "; function main() myName string = "John"; sayHello(myName); end function sayHello(name String in) SysLib.writeStdOut(GREETING + name + "!"); end end


Record

An EGL Record part defines a set of data elements. In this example, a record with the name ''CustomerRecord'' is defined with 6 fields. Record CustomerRecord type BasicRecord customerNumber INT; customerName STRING; customerAddr1 STRING; customerAddr2 STRING; customerAddr3 STRING; customerBalance MONEY; end EGL has a specialized type of record called ''SQLRecord'' that is used to exchange data with a relational database. record Employee type sqlRecord EMPNUMBER string; FIRSTNME string; MIDINIT string; LASTNAME string; DEPT string; PHONENO string; HIREDATE date; end * In this example, the record ''Employee'' is bound to a table (or view) named ''Employee''.


Service

An EGL Service part contains public functions meant to be accessed from other applications or systems. In this example, a service with two functions is defined. package com.mycompany.services; service EmployeeService function getEmployees() returns(Employee[]) records Employee[0]; // define an empty array of records get records; // retrieve records from the database return (records); // return the records end function addEmployee(emp Employee in) returns (boolean) try add remp; return (true); onException (ex AnyException) return (false); end end end * In EGL, code is organized in packages (like Java (programming language)) * The first function, ''getEmployees'', returns an array of records populated from the records in a database. * The second function, ''addEmployee'' adds a new record to the database and returns a true or false depending on whether the record was added successfully.


RUIHandler

The main component of a Rich UI application is a Rich UI handler part. These parts are generated into JavaScript. package com.mycompany.ui; import com.mycompany.services.Employee; import com.mycompany.services.EmployeeService; import dojo.widgets.DojoGrid; import dojo.widgets.DojoGridColumn; handler EmployeeView type RUIhandler grid DojoGrid ; function start() svc EmployeeService ; call svc.getEmployees () returning to displayEmployees; end function displayEmployees(retResult Employee in) grid.data = retResult as any end end


Web 2.0 with EGL

In December 2008, IBM introduced new technology, EGL Rich UI, to simplify the creation of Web 2.0-style
rich web applications A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
. This technology simplifies development by hiding the complexities of
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Greek ...
, JavaScript,
REST Rest or REST may refer to: Relief from activity * Sleep ** Bed rest * Kneeling * Lying (position) * Sitting * Squatting position Structural support * Structural support ** Rest (cue sports) ** Armrest ** Headrest ** Footrest Arts and entert ...
, and SOAP from the developer, which enables them to focus on the business requirement and not on the underlying technologies.


Commercial Products

EGL programming tools are available as an Eclipse-based commercial product, the Rational Business Developer and also in the EGL edition of Rational Developer for System z. EGL is a target language for modernization of legacy applications because of the language semantics affinity with procedural languages and legacy 4th generation languages: * a set of conversion tools available within the Rational Business Developer product provide automated the conversion from older and stabilized IBM and Informix 4th generation languages * a set of IBM service offerings and complementary products (Rational Migration Extension for Natural, Rational Migration Extension for System i, Rational Migration Extension for CA-products) provide the ability to convert from Software AG Natural, IBM RPG, CA Cool:Gen and CA Ideal/Datacom to EGL Tools for searching large EGL code bases, comparing individual EGL files for changes, and detecting duplicated code are available from Semantic DesignsSemantic Designs
/ref>


References


Further reading

* Enterprise Web 2.0 with EGL, . * Developing Web 2.0 Applications with EGL for IBM i, .


External links




IBM Rational Business Developer product page

IBM Rational Business Developer Information Centers

Eclipse EGL Development Tools (EDT) Project
- an open implementation at Eclipse {{IBM FOSS Fourth-generation programming languages IBM software Scripting languages