EGL (programming language)

EGL
(Enterprise Generation Language)
DeveloperIBM
LicenseEclipse Public License
Websitewww.eclipse.org/edt/

EGL (Enterprise Generation Language), originally developed by IBM and now available as the EDT (EGL Development Tools)[1] open source project under the Eclipse Public License (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, 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:

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 { 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.

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 { 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

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. This technology simplifies development by hiding the complexities of Ajax, JavaScript, REST, 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[2] 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 Designs[3]

References

Further reading

  • Enterprise Web 2.0 with EGL, ISBN 978-1-58347-091-6.
  • Developing Web 2.0 Applications with EGL for IBM i, ISBN 978-1-58347-089-3.

Read other articles:

British overseas territory in the southern Atlantic Ocean This article is about the tropical island in the South Atlantic. For the British Overseas Territory, see Saint Helena, Ascension and Tristan da Cunha. For other uses, see Saint Helena (disambiguation). Place in United KingdomSaint HelenaConstituent part of Saint Helena, Ascension and Tristan da Cunha FlagCoat of armsMotto: Loyal and UnshakableAnthem: God Save the KingUnofficial anthem: My Saint Helena IslandMap of Saint HelenaLoca...

 

Ancient paradox in geometry Aristotle's Wheel. The distances moved by both circles' circumference reference points – depicted by the blue and red dashed lines – are the same. Aristotle's wheel paradox is a paradox or problem appearing in the pseudo-Aristotelian Greek work Mechanica It states as follows: A wheel is depicted in two-dimensional space as two circles. Its larger, outer circle is tangential to a horizontal surface (e.g. a road that it rolls on), while the smaller, inner one has...

 

American politician (1867-1934) William VareUnited States Senator-electfrom PennsylvaniaIn officeMarch 4, 1927 – December 6, 1929Not seatedPreceded byGeorge PepperSucceeded byJoe GrundyMember of the U.S. House of Representativesfrom Pennsylvania's 1st districtIn officeMarch 4, 1923 – March 3, 1927Preceded byHimselfSucceeded byJames HazlettIn officeMay 24, 1912 – January 2, 1923Preceded byHenry BinghamSucceeded byHimselfMember of the Pennsylvania Se...

National rugby federation Algerian Rugby Federation (FAR)SportRugby unionFounded17 November 2015; 8 years ago (17 November 2015) (17 November 2015; 8 years ago (17 November 2015))Rugby Africa affiliation2015PresidentSofiane Abdelkader BenhassenMen's coachSalim TebaniWebsitedzrugby.com The Algerian Rugby Federation (FAR) ; (Arabic: الفدرالية الجزائرية للرغبي) is the governing body for rugby union in Algeria. Algeria became a full memb...

 

Egon VIIICount of Fürstenberg-HeiligenbergCoat of arms of FürstenbergPredecessorFrederick IV of FürstenbergSuccessorHerman Egon, Prince of FürstenbergBornErnst Egon of Fürstenberg-Heiligenberg1588Died1635Noble familyFürstenbergSpouse(s)Anna Maria of Hohenzollern-HechingenIssuesee belowFatherLandgrave Frederick IV of FürstenbergMotherCountess Elisabeth of Sulz Egon VIII of Fürstenberg-Heiligenberg (Ernst Egon; 21 March 1588 in Speyer – 24 August 1635 in Constance) was Imperial Count ...

 

DeadpoolPoster teaserSutradaraTim MillerProduser Simon Kinberg Ryan Reynolds Lauren Shuler Donner Ditulis olehPaul WernickRhett ReeseBerdasarkanDeadpoololeh Fabian NiciezaRob LiefeldPemeran Ryan Reynolds Morena Baccarin Ed Skrein T. J. Miller Gina Carano Brianna Hildebrand Penata musikJunkie XL[1]SinematograferKen SengPenyuntingJulian ClarkePerusahaanproduksi Marvel Entertainment Kinberg Genre The Donners' Company TSG Entertainment Distributor20th Century FoxTanggal rilis 8 Febr...

Questa voce sull'argomento calciatori italiani è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Giorgio Verità Nazionalità  Italia Calcio Ruolo Attaccante Carriera Giovanili 1930-1932 Lazio Squadre di club1 1932-1933 Lazio0 (0)1932-1933 Lazio II10 (4)1933-1934 Novara9 (1)1934-1936→ Lecco? (?)1936 Novara? (?)1936-1937→ L'Aquila16 (1)1938-1939 Monza? (?)1...

 

كوريدون     الإحداثيات 40°45′33″N 93°19′04″W / 40.759166666667°N 93.317777777778°W / 40.759166666667; -93.317777777778   [1] تاريخ التأسيس 27 أبريل 1867  تقسيم إداري  البلد الولايات المتحدة[2]  التقسيم الأعلى مقاطعة وين  عاصمة لـ مقاطعة وين  خصائص جغرافية  المساحة 3.607608 كي...

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Februari 2023. Masa Lalu Terjatuh ke dalam Senyumanmu Halaman sampul cetakan ke-1PengarangKedung Darma RomanshaJudul asliMasa Lalu Terjatuh ke dalam SenyumanmuPerancang sampulGuh S. Mana dan Muhammad Rois Alfin RizalNegaraIndonesiaBahasaBahasa IndonesiaGen...

Artikel ini memiliki beberapa masalah. Tolong bantu memperbaikinya atau diskusikan masalah-masalah ini di halaman pembicaraannya. (Pelajari bagaimana dan kapan saat yang tepat untuk menghapus templat pesan ini) Artikel biografi ini ditulis menyerupai resume atau daftar riwayat hidup (Curriculum Vitae). Tolong bantu perbaiki agar netral dan ensiklopedis. Gaya atau nada penulisan artikel ini tidak mengikuti gaya dan nada penulisan ensiklopedis yang diberlakukan di Wikipedia. Bantulah memperbaik...

 

Potez 630 Constructeur SNCAN Rôle Avion de chasse Statut Retiré du service Premier vol 25 avril 1936 Mise en service 1938 Date de retrait 1947 Équipage 3 personnes Motorisation Moteur Hispano-Suiza 14Ab Nombre 2 Type 14 cylindres en étoile refroidis par air Puissance unitaire 590 ch n°1 à 48 640 ch n° 49 et suivants Dimensions Envergure 16,00 m Longueur 11,07 m Hauteur 3,62 m Surface alaire 32,70 m2 Masses Maximale 3 845 kg Performances Vitesse ...

 

Icelandic breed of dog Dog breedIcelandic SheepdogOther namesIcelandic SpitzIceland DogÍslenskur FjárhundurFriaar DogCanis islandicusOriginIcelandTraitsHeight Males 46 centimetres (18 in)[2] Females 42 centimetres (17 in)[2]Weight 9–14 kg (20–30 lb)[1]: 120 Coat thick, doubleColour tan, black, chocolate-brown or grey, all with white markings[3]: 120 Life span 12–15 yearsKennel club standardsFédé...

Positive has multiple meanings in the world of photography. The two main definitions of positive photography include positive space and positive film. Positive space Positive space is the idea that any part of a photo that includes the subject, stands out from the rest of the photo. It is key component in most photographs that helps convey emotions towards an audience. The technique can illustrate emotions ranging from crowdedness, to power, to chaos, or even to movement in a photo. Positive ...

 

Різдвяне поліно Походження  ФранціяНеобхідні компоненти масло вершкове  Медіафайли у Вікісховищі Традиційний Бюш-де-Ноель[1]. Бюш-де-Ноель, або Різдвяне поліно (фр. Bûche de Noël) — традиційний французький десерт, який готують наприкінці року у Франції, Бельгії, Кв...

 

State park in Oregon, USA Yaquina Bay State Recreation SitePacific Ocean from the park roadShow map of OregonShow map of the United StatesTypePublic, stateLocationNewport, Lincoln County, Oregon, USACoordinates44°37′26″N 124°03′43″W / 44.62389°N 124.06194°W / 44.62389; -124.06194[1]Created1948Operated byOregon Parks and Recreation Department Yaquina Bay State Recreation Site, established in 1948, is a coastal state park in west-central Lincoln ...

Fictional character from Doctor Who This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Seventh Doctor – news · newspapers · books · scholar · JSTOR (January 2018) (Learn how and when to remove this message) The DoctorThe Seventh DoctorDoctor Who characterSylvester McCoy as the Seventh DoctorFirst regular appear...

 

Italian economist and politician Ezio VanoniMinister of FinanceIn office24 May 1948 – 18 January 1954PresidentAlcide De GasperiGiuseppe PellaPreceded byGiuseppe PellaSucceeded byAdone ZoliMinister of BudgetIn office18 January 1954 – 16 February 1956Prime MinisterAmintore FanfaniMario ScelbaAntonio SegniPreceded byGiuseppe PellaSucceeded byAdone ZoliMinister of Foreign CommerceIn office2 February 1947 – 1 June 1947Prime MinisterAlcide De GasperiPreceded byPietr...

 

Questa voce sull'argomento centri abitati della provincia di Pavia è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Cura Carpignanocomune LocalizzazioneStato Italia Regione Lombardia Provincia Pavia AmministrazioneSindacoGermano Randazzo (lista civica RinnoviamocuraCarpignano) dal 10-6-2024 TerritorioCoordinate45°13′N 9°15′E45°13′N, 9°15′E (Cura Carpignano) Altitudine78 m s.l.m. Superficie11,09 km² Abi...

Questa voce o sezione sull'argomento centri abitati della Toscana non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Montalcinocomune Montalcino – Veduta LocalizzazioneStato Italia Regione Toscana Provincia Siena AmministrazioneSindacoSilvio Franceschelli (PD) dal 12-6-2017 Data di istituzione1º gennaio 2017 TerritorioCoordinate4...

 

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Japanese punctuation – news · newspapers · books · scholar · JSTOR (August 2015) (Learn how and when to remove this message) This article contains special characters. Without proper rendering support, you may see question marks, boxes, or other symbols. Japane...