EGL (programming language)
≈ 5 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
EGL (Enterprise Generation Language) is a programming technology designed to meet the challenges of modern (at the time of its design), multi-platform application development by providing a common language and programming model across languages, frameworks, and runtime platforms. Originally developed by IBM, it was later donated to the Eclipse Software Foundation and maintained as the EDT (EGL Development Tools) open source project under the Eclipse Public License (EPL). The project was proposed for termination in 2014 due to insufficient activity in the previous two years, and was effectively archived in 2017 .
EGL (Enterprise Generation Language) is a programming technology designed to meet the challenges of modern (at the time of its design), multi-platform application development by providing a common language and programming model across languages, frameworks, and runtime platforms. Originally developed by IBM, it was later donated to the Eclipse Software Foundation and maintained as the EDT (EGL Development Tools) open source project under the Eclipse Public License (EPL). The project was proposed for termination in 2014 due to insufficient activity in the previous two years, and was effectively archived in 2017 .
Overview
The language borrows concepts familiar to anyone using statically typed languages like Java, COBOL, C, etc. However, it borrows the concept of stereotype from Unified Modeling Language (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, Apache Tomcat, GlassFish) IBM System z: CICS Transaction Server, IMS, z/OS Batch, UNIX System Services, WebSphere Application Server, z/VSE, Linux IBM Power Systems: IBM i, IBM WebSphere Application Server, Apache Tomcat, Integrated Web Application Server for i Web browsers supporting JavaScript, such as Internet Explorer, Firefox, and Safari, for Ajax rich web applications 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 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 { tableNames ="Employee", keyItems =[EMPNO]} EMPNUMBER string{ column = "EMPNO", maxLen = 6}; FIRSTNME string{ sqlVariableLen = yes, maxLen = 12}; MIDINIT string{ isSqlNullable = yes, maxLen = 1}; LASTNAME string{ sqlVariableLen = yes, maxLen = 15}; DEPT string{ column = "WORKDEPT", isSqlNullable = yes, maxLen = 3}; PHONENO string{ isSqlNullable = yes, maxLen = 4}; HIREDATE date{ isSqlNullable = yes}; end In this example, the record Employee is bound to a table (or view) named Employee. 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. 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 { initialUI = [ grid ], onConstructionFunction = start, cssFile = "main.css" } grid DojoGrid { behaviors = [ ], headerBehaviors = [ ], columns = [ new DojoGridColumn { displayName = "First Name", name = "FIRSTNAME" }, new DojoGridColumn { displayName = "Last Name", name = "LASTNAME" }, new DojoGridColumn { displayName = "Salary", name = "SALARY" } ] }; function start() svc EmployeeService { }; call svc.getEmployees () returning to displayEmployees; end function displayEmployees(retResult Employee [ ] in) grid.data = retResult as any [ ]; end end
References
Further reading
Enterprise Web 2.0 with EGL, . Developing Web 2.0 Applications with EGL for IBM i, .
External links
EGL Cafe Community Site IBM Rational Business Developer product page IBM Rational Business Developer Information Centers Eclipse EGL Development Tools (EDT) Project - an open implementation at Eclipse
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377675777 under CC BY-SA 4.0; modifications have been made.