What's new in EGL Development Tools (EDT)

Progress:


0.8.2 Release (January 18, 2013)

General

Enhancements and fixes in EDT 0.8.2.

0.8.2 M4 (December 14, 2012)

General

Milestone 4 features 50 fixes and enhancements. See the full list.

Language

The following language changes are in place:

  • Support has been added to Java generation for the new Class type. This new type adds the concept of abstract functions and inheritance capabilities to the EGL language. Support for static fields and functions is not yet complete, however. For more information refer to the enhancement.

  • Support for the new bytes type was added for Java and JavaScript

  • New functions have been added to the types date, bytes, string and all numeric types.

  • Support for ternary expression has been added for java and javascript. The syntax of the expression is: booleanExpression ?? trueExpression : falseExpression
  • Here is an example use:
       t time;
       Syslib.writeStdOut((t.hourOf() < 12) ?? "It is before noon" : "It is after noon");
    

Generation Validation

Generation time validation was added so that the generators can provide error messages on parts and stereotypes that are not supported by a given generator. For example, the JavaScript generator does not support generation of programs. Likewise, the Java generator does not support the generation of a handler with the type RuiHandler. These examples will now result in an error being placed on the parts during generation. Previously, the generators ignored these parts and no notification was given. Generator extensions can add parts and stereotypes that are supported.

Content Assist

Content assist is once again available.

0.8.2 M3 (November 13, 2012)

General

Milestone 3 features 12 fixes and enhancements. See the full list.

Please note that recent changes might require that you migrate your EGL applications. For details, see the differences between EDT 0.8.2 and EDT 0.8.1.

Language

The following language changes are in place:

  • You can use the const keyword when you declare a value of any type. For additional flexibility, you can assign an arbitrary expression to a constant rather than just a literal.

  • You can indicate the end of a Delegate definition by accepting the end keyword or by typing the ";" character.

Extension

The EGL Extensible Compiler is implemented:

  • Details about packages and types are no longer hard coded, but are driven by definitions that are external to the core. As a result, you can extend EGL with new types, and the compile-time processing is the same as for the provided types.

  • The team handled the following details:

    • Removed from the system scope all types that were not in the eglx.lang package.

    • Refactored the EGL code and validation logic for Rich UI, placing the content in an EDT extension.

    • Refactored the runtime Java code for SQL and IBM i, placing the content in an EDT extension.

    • Ported code to the IR object model that is used by all the EDT generators. The code was previously in an internal object model.

Content Assist

As a result of the extension changes, content assist is unavailable in the M3 release. The capability will return.

0.8.2 M2 (September 28, 2012)

General

Milestones 1 and 2 feature 9 fixes and enhancements. See the full list.

This delivery is the first that is based on work stored in the Git version-control system. In addition, the const keyword is now applicable to any variable declaration.

0.8.1 Release (August 1, 2012)

General

Enhancements and fixes in EDT 0.8.1.

0.8.1 M3 (July 2, 2012)

General

Milestone 3 features 110 fixes and enhancements. See the full list.

Mobile

EGL now supports mobile computing. For details on getting started, see Preparing to develop a mobile application.

SOA

You can now access different kinds of back-end logic in a similar way, whether the logic is a host program or a service. For details on the new approach to service access, see the following overview: Service bindings

IBM i

Two changes improve the existing support for IBM i:

  • The names of the data conversion annotations are now generic. For example, "AS400Text" became "StructText." The change facilitates the possible future access of programs on System z.

  • To indicate where an IBM i program resides, you now declare a Resource annotation in the proxy function, rather than coding a connectionResourceBindingURI annotation field. The change adds consistency and clarity.

For updated details on how to access an IBM i program, see the following overview: Support for IBM i

IDE

You can quickly access the EGL system definitions that were made available in Milestone 2:

  • You can display an EGL system definition in the editor while you are coding. For example, if you declare a widget of type DojoMobileButton, you gain read-only access to the definition by placing the cursor on "DojoMobileButton" and pressing F3.

  • You can use the EGL search mechanism to find the definition in your workspace. Here's an example that works as soon as you create a project for Rich UI:

    1. At the topmost menu, click Search > Search.
    2. Click the EGL Search tab.
    3. At that tab, type IHttp, which is the name of an EGL system definition.
    4. Click All Occurences.
    5. Click Search.

    The definition is available at the bottom right; and you gain access by double-clicking the file icon there:

0.8.1 M2 (June 11, 2012)

General

94 fixes and enhancements were made in milestones 1 and 2. See the full list.

EGL type definitions

After you have created or imported an EGL project, you can review the provided type definitions by expanding EDT System Libraries:
 

forEach statement

You can now use the forEach statement to process each element of a list in turn. For example, assume that the following Record type is available:

				
Record MyRecordType 
  myString String;
  myInt Int;
end

The following code iterates through a list of that type:

myList MyRecordType[];
myList.appendElement(new MyRecordType{myString = "01", myInt = 1});
myList.appendElement(new MyRecordType{myString = "02", myInt = 2});
myList.appendElement(new MyRecordType{myString = "03", myInt = 3});        
        
forEach (myElement MyRecordType from myList)
   SysLib.writeStdOut(myElement.myString + " " + myElement.myInt);
end

The output is as follows:

01 1
02 2
03 3

As was already true, you can use the forEach statement to process an SQL result set.

Bitwise operators

Several bitwise operators are now available:

  • ~ is a new unary negation operator, which changes 1s to 0s and the reverse. You typically assign the result, as in the following logic:
    				
       myvar int = ~10;     // bit pattern (4 bytes)
                            // previous:  0000 ... 00001010 
                            // new:       1111 ... 11110101
       Syslib.writeStdOut(myVar);
    

    The code displays the number -11.

  • The binary operators are as follows:
    • & (intersection)
    • | (union)
    • xor (exclusive or)
    • <<n (a new left shift, with zero fill)
    • >>n (a new arithmetic right shift, with a fill that reproduces the leftmost bit value)
    • >>>n (a new logical right shift, with zero fill)

    Here is an example use:

       myvar = 10 << 2;     // bit pattern (4 bytes)
                            // previous: 0000 ... 00001010 
                            // new:      0000 ... 00101000
       Syslib.writeStdOut(myVar);
    

    The code displays the number 40.

Numeric literals

You can now specify the type of a numeric literal by appending a character to the literal.

The next table shows the EGL type system for numeric literals.

Literal type Appended Character Example
DECIMAL None
// without scientific notation	
myDecimal decimal = 2.34;
FLOAT None
// with scientific notation 
myFloat float = 2.539e7;
FLOAT F
myFloat float = 12.34F;
SMALLFLOAT f
mySmallFloat smallFloat = 12.34f;
INT None
myInt Int = 123;
SMALLINT i
mySmallInt smallInt = 123i;
BIGINT I
myBigInt bigInt = 123I;

Simple types

EGL now includes TIME and limited STRING:

  • TIME is a value type, and the stored value corresponds to the HHmmss pattern: two digits for hour, two for minute, and two for second.
  • STRING(n) is a reference type, like STRING. However, STRING(n) is similar to the SQL VARCHAR type, with n representing a limit on number of characters.

0.8.0 Release (April 13, 2012)

General

Enhancements and fixes in EDT 0.80.

0.8.0 M3 (March 15, 2012)

General

140 fixes and enhancements were made in this milestone. See the full list.

SOA

The way you invoke a dedicated service is now consistent with the way you invoke a REST or EGL REST-RPC service. Specifically, you define a binding variable of type HttpProxy and do not declare a DedicatedService annotation.

For details on service access, see the following web page:
http://wiki.eclipse.org/EDT:Resource_Binding_Services

IDE A new external type wizard helps you to expose Java classes and interfaces to your EGL logic. The initial keystrokes are New > Other > EGL > External Type.

Another new capability lets you create access logic that is based on one or more database tables. Each table is accessed separately, and the overall access code is stored in a Service or Library type. The initial keystrokes are one of the following two sequences: New > Other > EGL > Service; or New > Other > EGL > Library.
Rich UI Rich UI support for Dojo is now based on Dojo toolkit version 1.7.

To provide better download performance, Rich UI has begun to reduce the size of the downloaded code and has begun a transition to Asynchronous Module Definition (AMD), which is a technology for loading handlers asynchronously.

The AMD solution has no effect on application development. For details on that technology, see the following web page:
http://dojotoolkit.org/features/

The downloaded code is also obfuscated.

Language

String is now a reference type rather than value type. In existing applications, the change has no effect on the following values:

  • Strings that are processed inside a single EGL function.
  • Strings that are passed to a function parameter that has an explicitly stated modifier, whether the modifier is IN, OUT, or INOUT.
However, the change might have an effect on an existing application, if a string is passed to a function parameter that uses a default modifier. For details, see the blog on Changes to the String type in EDT .8.

In an external type, you can now set the Throws annotation on a function or constructor prototype and in this way allow the EGL compiler to catch an error (a lack of response to a thrown exception) that would otherwise be caught only by the Java compiler.
SQL support

As before, the GeneratedValue annotation identifies a record or handler field for which the corresponding table column receives a value from the database management system. The assignment to the table column occurs when an add statement runs.

The change is as follows: the add statement now places the DBMS-generated value into the field of the record or handler, making the value available to your code.

Java runtime code The size of the jar file used during application run time is 92% smaller after a decrease from ~6 MB to ~0.5 MB.
Generator extension

The team began to define Eclipse extension points for creating new generators and for contributing to existing generators.

0.8.0 M2 (February 27, 2012)

General

60+ fixes and enhancements were made in this milestone. See the full list.

New Syntax for Resource Bindings and Call Statement
  • You now specify a URI when you reference an EGL deployment descriptor entry. The change affects your use of the Resource annotation and the SysLib.getResource function. See Resource Binding Introduction for more information.
  • When you want to access a REST service or IBM i program, you can do as follows: declare a connection variable, customize the variable, and configure a call statement to use the variable. The code is consistent with how you configure EGL add and get statements to access a database. The older process for accessing a service involved the following two steps: create a service-access variable based on a Service or Interface type; and use that variable in a call statement. The older process is still supported in the M2 release but is now deprecated. See Resource Bindings Services for more information.
  • The M2 release introduces a call statement for synchronous access. At this time, the synchronous version of the call statement is used only for the following purpose: to call an IBM i called or service program from EGL code that is outside of Rich UI.
JNDI Support for Database Access

JNDI allows for a data source configuration to be managed separately from the application (typically by the application server). JNDI also allows for fast database access across multiple users. Starting with the M2 release, you can configure a resource binding to use a logical JNDI name. For details on several changes related to setting up an SQL database binding, see the Resource Binding Databases page.

IBM i Support

As an EGL developer, you can access IBM i called programs, as well as procedures in IBM service programs. For more information, see the Support for IBM i page.

IDE

Other changes affect your interaction with the IDE:

  • You can use a wizard to create an external type, much as you use a wizard to create a Handler or Service type. Note: this wizard only creates a basic external type. Future milestones/releases will extend this wizard with support for specific external types (e.g. Java, JavaScript).
  • The outline view now displays a different icon for public and private functions, as shown here:
     
  • You can now specify whether the Console view displays tracing messages from the EGL Test Server. By default, these messages are not displayed, but a preference page is provided to change this behavior (Window > Preferences > EGL > Test Server).

RUI Widget User Data Support

Arbitrary user data of any type (primitive, record, array, Dictionary, etc.) can now be stored and accessed on a RUI widget. This allows for storing a value and accessing it later in an event handling function (for example). The new APIs are RUIWidget.setUserData(any) and RUIWidget.getUserData().

0.8.0 M1 (January 26, 2012)

General

60+ fixes and enhancements were made in this milestone. See the full list.

Content assist

EGL content assist has been enhanced to show variables, fields, functions, and types with related details and icons that illustrate the kind of information being presented:
 

Rich UI

EGL Rich UI now supports the following capabilities:

  • For better performance at startup, deployed applications are served up in zip format from the application server.
  • In the 0.7 release, you could define displayable text in an external properties file. You can now use that text to overwrite the default messages for MVC-based validation. For details, see the following help topic: "Using properties files for displayable text in Rich UI."
  • The deployed output is better organized. Specifically, the deployed HTML file is smaller and is accompanied by a new runtime file named edt_core.js.

0.7 Release

General

Hundreds of fixes and enhancements were made since M3. See the full list.

0.7 M3

General

Generators Java and JavaScript Generators are functionally complete. Additional language compliance testing continues.
EGL Language Language Overview

IDE

Project templates The New EGL Project wizard now supports the concept of a project template. A project template is selected and configured when the project is created, and controls aspects of the project including; which generators it uses, any packages created, setting up references to other projects, and more. As of now, there are 3 project templates: basic, web 2.0 application, web 2.0 application with services.

An extension point is provided to enable plug-in developers to contribute project templates that will appear in the EGL project wizard.
Source editor Improvements:
  • Quick Fix support is now provided to create a callback function

  • Quick Assist support is now provided for creating SQL related statements
  • Content assist

  • Code formatting
  • Organize imports

Rich UI visual editor A true WYSIWYG visual editor is now provided for visual editing and previewing Rich UI handlers. The editor includes three tabs: Design, Source, and Preview. The Design tab contains an embedded browser (Internet Explorer, by default, in Windows) that supports the visual contruction of UIs by dragging and dropping widgets from the Palette, moving widgets, deleting widgets, and more. Because the Design tab *is* an actual browser, what you see in the Design is what you get. The Preview tab provides a live, running version of the handler.

Deployment Descriptor Editor An editor is now provided for configuring the content of an EGL Deployment Descriptor (.egldd) file.

Create Records from SQL Database A new wizard has been provided for creating EGL Records from an existing SQL Database connection.

Rich UI

Standard widget support This library includes standard HTML widgets, such as button, text field, text label, grid layout, and data grid. Also included are core utilities, such as MVC, history, and infobus (message broadcasting). The default style for these widgets matches the Claro theme from the Dojo Toolkit.
Dojo 1.6 widget support This library provides support for 30+ Dojo widgets, including Button, Calendar, Dialog, and Tree. Dojo support can be added to a project in the New EGL Project wizard when the project is created. The remote version of this library references a hosted Dojo toolkit (Google.com) and requires internet connectivity during development. The Dojo library files are not imported into the workspace and not deployed with your applications. The remote version of the library can be selected in the New EGL Project wizard by selecting the drop down that appears in the Version column for the Dojo widgets.

Web services

Dedicated Services (JavaScript Only) Dedicated services are EGL services that can be thought of as server-side extensions to a Rich UI application. Dedicated services are generated as Java, deployed with the Rich UI handler, and do not require any additional configuration (e.g. specification of an end-point URL). To use, apply the @dedicatedservice annotation to a service variable declaration in a Rich UI handler.

REST Services (JavaScript Only) EGL services can now be generated and deployed as EGL REST-RPC (JSON) web services and invoked from EGL applications or other EGL services.
XML and JSON (JavaScript Only) Support for converting data to and from XML and JSON is now available as part of the JsonLib and XmlLib Libraries.

Debugging

JavaScript Debugging EGL code generated as JavaScript can be debugged using the standard Eclipse debug tools. To debug, right click on a Rich UI handler file and select Debug As > EGL Rich UI Application. This will launch the handler in an external browser.
Test Server An embedded Web Server based on Jetty that is responsible for executing EGL Services within the IDE (e.g. EGL Debugger, Rich UI Visual Editor, etc).

A test server instance is provided for each EGL project, and a server will remain resident until either the workspace is closed or the server is terminated manually. Each test server instance is automatically managed by the workspace, with updates to EGL source being hot-swapped where possible.

Deployment

EGL Deployment Descriptor An EGL deployment descriptor contains settings that control how an application is deployed. For example, the deployment descriptor for a project that is configured with Java support can be configured to generate EGL services as REST services.
Default deployment descriptor When a new project is created, a deployment descriptor is automatically created in the root EGL Source folder of the project, and this deployment descriptor is configured as the default for the project. To change the default deployment descriptor for a project, right click on the project and select properties > EGL Default Deployment Descriptor.
Service Deployment EGL services can now be generated and deployed as EGL REST-RPC (JSON) web services and invoked from EGL applications or other EGL services.
Rich UI Application Deployment On deploy, EGL Rich UI handlers are generated as HTML and deployed into a standard Dynamic Web project. By default, all Rich UI handlers in a project are deployed with the default EGL deployment descriptor file for the project.
Resource bindings Resource bindings are specified in an EGL deployment descriptor file, and are used to specify runtime connection information for REST service invocations and SQL database access. When entering a SQL database resource binding, a workspace connection can be specified using a database connection, which will result in the information being loaded from the connection at runtime. Workspace connections are only available in the IDE, and are replaced with information from the database connection during deployment.

Automated Testing Framework

EUnit Test Framework The EUnit test framework provides a simple way to write and run unit tests for the EGL language.

Example Test Case

Example Results

0.7 M2

General

Hundreds of fixes and architecture/infrastructure enhancements were made in this milestone. See the full list.

0.7 M1

Compiler

EGL model

A serializable model, created during compilation, which represents an EGL part. Java APIs are provided for creating, reading, and manipulating instances of the model. Serializable to XML or as binary objects is currently available, with infrastructure to support serialization to other formats.

Generator framework

An extensible code transformation framework is in place for building and creating generators that act on objects created during compilation or programmatically.

  • A 'core' generator is one that implements a transformation to a target runtime technology that adheres to the semantics of the 'core' EGL Language
  • EGL Core will be the EGL specification containing:
    • Syntax and semantics for declaring EGL definitions
    • Execution semantics for statements and expressions
    • Semantic descriptions for extensible IO statements
      • GET, ADD, etc. with no description for specifics like SQL access
  • EGL Core will not specify any metadata specifications except for those necessary to define other metadata
    • Annotation and Stereotype are types themselves known to the compiler
Java Core Generator

Supports the transformation of EGL into Java. Not fully implemented, but basic functions in place.

Simple example of Java created from EGL:

JavaScript Core Generator

Supports the transformation of EGL core into JavaScript. Not fully implemented.

IDE

Perspective

The EGL perspective provides quick access to common EGL actions (new project, new source file, etc), quick access to related perspectives (web, Java, etc), and shows a set of views commonly used during development of EGL applications (Project Explorer, Outline, etc).

Project explorer view integration

Projects configured with EGL support (either new projects or projects with EGL support added) appear in the Project Explorer view. EGL source files are organized by package and commonly used actions are available on the context menu.

EGL new project wizard

The EGL New Project wizard (File > New > EGL > New Project) creates a project configured with EGL support. By default, new projects use the default compiler and generator specified in the workspace-level preferences.

EGL support can be added to any existing project via the Configure > Convert to EGL Project action on the context menu of the Project Explorer view.

Compiler and generator preferences

EGL compiler and generator preferences can be set in the workspace-level preferences page (Window > Preferences > EDT > Compiler)

Compilers and generators can be contributed to the IDE via extension points. A generator gets associated with a compiler, for example the base Java generator belongs to the EDT compiler and can be enabled for any projects using the EDT compiler. Currently generators are provided for Java and JavaScript.

Source editor

Text editor for EGL source files. Provides the basics of content assist and color highlighting. Common, global actions (Undo, Save, etc) are available on the context menu as well as actions to format the EGL source, add/organize import statements, and jump to the declaration for a part (Open on Selection).

Breakpoints for debug

Breakpoints can be added via the EGL source editor. Breakpoints encountered during execution of the EGL part will result in the developer being directed to the Eclipse Debug perspective. Breakpoints can be set on any EGL statement.

Variables view

The Variables view allows a developer to see variables currently in scope, their values, and their types. Variables are organized based on whether they are global or local.

Debug for Java Programs

EGL programs generated as Java can be debugged using the debug tools described above.

Note: the EGL debugger is an implementation of JSR-045. Any EGL extensions mapped to a Java runtime can take advantage of this support.

Launching Programs in Debug Mode

EGL batch-style programs generated as Java can be launched in debug mode (enabling use of breakpoints, etc) via the Debug As > EGL Java Application.