Showing posts with label egl. Show all posts
Showing posts with label egl. Show all posts

Friday, August 16, 2013

One Reason to Use EGL: External Types

Whew! I just finished working on a major software feature for my ultra-conservative corporate customer. It provides me with one great reason to use EGL, and specifically, the EGL Development Toolkit (EDT).

I was asked to do the (seemingly) impossible: Duplicate an existing process to create form letters. A few thousand different forms needed to be converted to the new process. While BIRT might have been a general solution to the problem of producing PDFs, there wasn't enough time. I've used BIRT successfully. Generally, I would recommend it. But, designing a few thousand BIRT reports didn't seem to be the right answer.

I used EGL to prototype the PDF generation process. While the development environment was strictly Rational Business Developer, I chose EDT as the tool to build the prototype. And, I'm really glad I did. EDT provides a New | External Type feature, to generate external types from an existing Java library. I imported the iTextPdf library (at www.itextpdf.com). I bought the electronic book: iText in Action.

Within a few minutes, I generated my first PDF. It wasn't much. Writing the code in EGL made it easy to think about the problem in high-level, business-logic terms. I was able to change my mind several times while exploring different designs without the complexity of refactoring Java source code. And yet, external types enable me to use the off-the-shelf iTextPdf library, with all of its power to read and write PDFs.

I connected my PDF generator to a frame library (Framing Software, XVCL) to store key-value pairs in an SQL database. In this specific case, an analysis of a few thousand forms showed a very distinctive pattern and consistency of purpose for the form letters. Knowing exactly what needed to be produced, I was able to create a custom form letter editor. The letter editor provides a mechanism for variable substitution (lifted directly from Apache Ant).

And then, it hit me. The original form letters were composed with Microsoft Word and stored in an open document format. Tapping again into the power of EGL and external types, I imported the text (but not formatting) of the existing form letters into the frame table, using an EGL business logic library. With the text of the form letter in the editor, it was (relatively) quick and easy to add formatting to recreate the original form.

Importing from Microsoft Word to a BIRT report is beyond my technical skill at the moment. This turned out to be the right answer to the specific problem facing the customer. They needed a new way of generating form letters in their production system and, with demands from their customers, they only had thirty days to do it.

Working with EGL alone, I wouldn't be able to finish the project. And working with Java alone, I wouldn't be able to quickly build a succession of prototypes, trying and working through different design ideas.

The best design was selected and imported into Rational Business Developer. While the syntax is similar, EGL written with EDT did not simply drop into the customer's version of RBD. It had to be reworked, especially lack of support for a question mark (?) at the end to indicate a nullable type. At the end of thirty days, end-users were generating customizable PDFs using production web application.

Now, that's a good reason to use EGL. What do you think?

Thursday, May 23, 2013

Essential EGL+Batch - Companion Book

The 2013-05-23 draft of a companion book for the Essential EGL+Batch video series is now available in PDF format. It includes instructions for installing EGL Development Tools on Linux, OS X and Windows. It includes the source code for lessons 1 thru 22. It includes additional information on EGL not presented in the video series.

Wednesday, March 20, 2013

Essential EGL+Batch - Introduction to Eclipse

Introduction to Eclipse is the first session of our Essential EGL+Batch training course. It features EGL Development Tools version 0.8.

This session describes the essential features of Eclipse, such as workspace, perspectives and views. It is based upon the following three documents:
  1. Presentation. For on-site, an instructor uses a presentation called 1 Introduction to Eclipse
  2. Self-study guide. For our on-line students, this 1.0 Introduction to Eclipse self-study guide provides the instructor's notes for the presentation.
  3. Exercise. The exercise is 1.1 Introduction to Eclipse.
Thanks,

Wednesday, February 27, 2013

Essential EGL+Batch - Source Code 1 thru 22

Source code for lessons 1 through 22 is now available in an archive file. This includes both the EGL and Java source code.

eglprogram-22.zip

For more information on importing the source code, see also Essential EGL+Batch - Archive File.

Essential EGL+Batch - Archive File

Backup your EGL project by exporting it to an archive file. In a new workspace, restore your EGL project by importing an archive file.

Sunday, February 24, 2013

Essential EGL+Batch - Lesson 22 Connection Properties


Get properties from an open connection to a JDBC-compatible database. Configure a database connection for (1) your Eclipse workbench, (2) your EGL project and (3) your EGL program. Use the Database Development perspective to create a new database connection. Edit the EGL Deployment Descriptor (.egldd) file to add a database (SQL/JDBC) resource. Create a library called ConnectionLib to connect to a database. This lesson does not describe how to install database software or create a database.

Essential EGL+Batch - Lesson 21 Arguments


Essential EGL+Batch - Lesson 21 Arguments is now available on my YouTube channel. Use a Java class and external type to get command-line arguments. Pass arguments from a command-line to an EGL batch program.

Essential EGL+Batch - Lesson 20 Delegate Field


Essential EGL+Batch - Lesson 20 Delegate Field is now available on my YouTube channel. A delegate can be a field in a record. Use demo functions from lessons 4 thru 19.

Essential EGL+Batch - Lesson 19 External Type is now available on my YouTube channel. Define and use an external type in an EGL program. Create a Java class called JavaSystem to get a complete list of property names for Java system properties.

Friday, February 22, 2013

Essential EGL+Batch - Lesson 18 Custom Property


Essential EGL+Batch - Lesson 18 Custom Property is now available on my YouTube channel. Define a custom property on the command line and get a custom property in an EGL program. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Wednesday, February 20, 2013

One Reason To Use EGL: Implied Decimal Point


An implied decimal point type is but one small, insignificant reason to use EGL. (That's my way of saying HUGE and COMPELLING.)

Let's compare EGL to Java. Java technology does not have built-in support for an implied decimal point, like COBOL does. In other words, you cannot possibly declare a type like decimal(16, 2). And yet, as you know, SQL supports a column type with an implied decimal point. When reading and writing to an SQL database, Java requires jumping through hoops. You may be required to use a double-precision floating-point type, which is not exactly suited for the task.

EGL has built-in support for an implied decimal point, just like COBOL and SQL. It comes from the fact that an implied decimal point type is one of the cornerstones of business programming. You can generate from EGL to COBOL. The EGL runtime for Java comes with a Java class called something like EDecimal. It provides everything that we need in an implied decimal point type; it behaves exactly like COBOL and SQL. It is built-in so that we don't have to think about it. In EGL, when reading and writing to SQL, it's so easy.

Have you use double-precision floating-point type in your EGL code when you should use an implied decimal point type? That's another issue.

Thanks for listening!

Wednesday, February 13, 2013

One Reason to Use EGL


What is one reason to use EGL? It reduces risk.

Big ol' enterprises, such as state and federal government and major corporations, have been pushing COBOL and CICS as the best way of doing things for the entire duration of my career. It comes from a real need to reduce and eliminate risk.

Risk is a big factor in developing big software. It is bigger than the lifetime cost of software development. It is bigger than productivity of individual developers. It is bigger than the benefit of improved development technique and paradigms.

Big ol' enterprises are ultra-conservative corporate customers. They need a safe bet. The safer the better. They need a very predictable computer environment. The more predictable the better. They have an aversion to risk and the leading edge of technology.

So, what do they choose? They consistently choose big iron, such as mainframes and virtual machines, COBOL and CICS, along with its baggage of big ol' enterprise culture. The decades-old establishment means very little measurable risk. It does not allow software revolution. And actually, that's a Good Thing.

Meanwhile, there has been something of a revolution going on in gadgets, such as smartphones and tablets. The ultra-conservative corporate customer understands that gadgets exist. Instead of adopting the gadget way of doing things, they are finding ways to connect gadgets to big iron. They are creating a new model for gadgets to connect to low risk COBOL and CICS infrastructure.

As a big iron developer, expert in COBOL, CICS and MVS, you might be experiencing the effect of a major clash of cultures as people try web technologies, such as Java and JavaScript, to connect to the big iron. Using a dozen different programming languages to build one application—what does any ultra-conservative corporate customer that? It make no sense.

But, there is a big problem. While there is nothing inherently wrong with the Java Virtual Machine technologies, there is something wrong with the Java programming language. The language is a system programming language like C. Who wants to write a business application in a system programming language? Many people don’t know any better. They are stuck and feel like they have no choice. If you're writing for the Java Virtual Machine, you have to write in the Java programming language, right? Actually, no, you don't.

A long list of other programming languages have been ported to the Java Virtual Machine, including Clojure, Python, Scala and—believe it or not--COBOL. But, ultra-conservative corporate customers don't like the risk of using a so-called foreign programming language on the Java Virtual Machine. They use the Java programming language, the official programming language of the Java Virtual Machine.

And this is part of the reason why I like EGL. I like EGL because it generates to Java to make my ultra-conservative corporate customers happy. While they get a JEE-compatible web application (with HTML/CSS/JavaScript/Java), I get to write in EGL, a business language that gets my work done. When I get my work done, I’m happy. Everybody’s happy.

Essential EGL+Batch - Lesson 17 System Property


Essential EGL+Batch - Lesson 17 System Property is now available on my YouTube channel. When EGL generates to Java, the standard Java system properties, such as “os.name” and “user.name”, are available to your EGL program. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Friday, February 8, 2013

Essential EGL+Batch - Lesson 16 Log Exception


Essential EGL+Batch - Lesson 16 Log Exception is now available on my YouTube channel. When it is thrown, log an exception on the console. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Thursday, February 7, 2013

Essential EGL+Batch - Java Control Panel

Essential EGL+Batch - Java Control Panel is now available on my YouTube channel. Which version of Java is installed? Explore the Java Control Panel. This video is part of the Essential EGL+Batch series. Featuring Java 6 on Windows.

Essential EGL+Batch - Installing EGL Development Tools on Mac OS X


Essential EGL+Batch - Installing EGL Development Tools on Mac OS X is now available on my YouTube channel. Download and install Eclipse Indigo (3.7) on Mac OS X (Lion). Install EGL Development Tools (EDT) with the Install New Software feature of Eclipse. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Installing EGL Development Tools on Windows


Essential EGL+Batch - Installing EGL Development Tools on Windows is now available on my YouTube channel. Download and install EGL Development Tools (EDT) version 0.8.1 on Microsoft Windows XP (32-bit). Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 15 Exception

Essential EGL+Batch - Lesson 15 Exception is now available on my YouTube channel. Handle an exception with try/onException. Throw an exception with throw. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 14 Record Array

Essential EGL+Batch - Lesson 14 Record Array is now available on my YouTube channel. Work with an array of records. Use a fixed-length record to generate a report. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 13 Nested Record

Essential EGL+Batch - Lesson 13 Nested Record is now available on my YouTube channel. Create and use a nested record, a record within a record. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.