Thursday, January 31, 2013

Essential EGL+Batch - Lesson 10 Delegate

Essential EGL+Batch - Lesson 10 Delegate is now available on my YouTube channel. Use functions from lessons 4 thru 9. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 09 Float

Essential EGL+Batch - Lesson 09 Float is now available on my YouTube channel. Calculate and format floating point number. Use MathLib, an EGL standard library. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Wednesday, January 30, 2013

Essential EGL+Batch - Lesson 08 Integer

Essential EGL+Batch - Lesson 08 Integer is now available on my YouTube channel. Count up and down with an integer. Create and modify an array of integers. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Tuesday, January 29, 2013

Essential EGL+Batch - Lesson 07 Character

Essential EGL+Batch - Lesson 07 Character is now available on my YouTube channel. Get a characters from a string and limit the number of characters in a string. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 06 BatchLib

Essential EGL+Batch - Lesson 06 BatchLib is now available on my YouTube channel. Update BatchLib library to print start and end times for a program. Use TimestampLib library from Lesson 05. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 05 Timestamp

Essential EGL+Batch - Lesson 05 Timestamp is now available on my YouTube channel. Get the current timestamp. Format and print a timestamp. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 04 Date

Essential EGL+Batch - Lesson 04 Date is now available on my YouTube channel. Get the current date or set a specific date. Format and print a date. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 03 Library Variable

Essential EGL+Batch - Lesson 03 Library Variable is now available on my YouTube channel. Create an EGL library. Use the debugger to see how a variable of a library is used. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Saturday, January 26, 2013

Essential EGL+Batch - Installing Remote Systems Explorer

Essential EGL+Batch - Installing Remote Systems Explorer is now available on my YouTube channel. Install Remote Systems Explorer (RSE) in EGL Development Tools (EDT). This video features RSE version 3.3.1. The Install New Software feature works with both Linux and Windows. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Installing EDT on Linux

Essential EGL+Batch - Installing EDT on Linux is now available on my YouTube channel. In this lesson, we download and install EGL Development Tools version 0.8.2 on Linux 32-bit.

While I am featuring OpenSUSE Linux version 11.1 in this video, it applies to Linux in general.

Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Transcript:

Welcome to Essential EGL+Batch. This series features EGL Development Tools version 0.8. In this lesson, we’re going to (1) download and (2) install the EGL Development Tools on Linux. We’re going to assume that you have met the system requirements for EDT, such as a Java Runtime Environment version 6 or greater.
What you want to do is to open your favorite web browser and in the location field you want to type in www dot eclipse dot org, which brings you to the main page. And then, you want to select projects, And then, you want to select the list of all projects. Now, there’s a lot of projects at the eclipse dot org web site. We want to go to the section on tools, we want to find the section on tools and then select the EGL Development Tools.
EGL Development Tools enables you to bring up an EGL+Batch environment.
Now, on the EGL Development Tools page, we want to go to Downloads. And then, on the Downloads page, we’ll scroll down and we’re looking for the all-in-one package for our platform. And in this case, we’ll be installing EGL Development Tools on Linux 32-bit.
We click on that link and it brings us to a page where we want to find a mirror that’s close to our location on the Internet. And my favorite mirror is the Georgia Tech Software Library because I’m located near Georgia Tech. We want to save the file.
This file downloads in about six minutes on my computer. I sped that up so you don’t have to wait for six minutes of video.
So the download is complete. The name of the file is eglweb hyphen zero eight two hyphen linux hyphen gtk dot tar dot gz.
Now, to be able to use a GZ-compressed TAR-compatible archive, we want to uncompress and unarchive it. From a command line, I’ll create a new directory called “egl web”. I’ll use the tar command with the X, V, Z and F options to uncompress and unarchive the file.
There! With the file uncompressed and unarchived, I need to switch to the superuser to make the EGL Development Tools available for all users. So, I’m going to change directories to slash opt slash eclipse dot org. I’m going to use the move command  to change the name of the eclipse directory to eglweb. Now, if I go into eglweb what I’m looking for is the eclipse command and there it is.
So, now, I can go back to my account. And, I’ll switch to slash opt slash eclipse dot org slash eglweb. And, I’ll start Eclipse with dot slash eclipse. And, that starts the EGL Development Tools.
I’ll accept the default directory by pressing the OK button.
This has been another lesson in the series Essential EGL Batch. Thanks for watching!

Friday, January 18, 2013

Don't use SqlRecord in EGL Web Service

Here is a general rule: When designing a SOAP web service with EGL, do not use an SqlRecord as a parameter or a return value.

"Why not?" you might ask. Good question. It takes a wee bit of explanation.

Typically, an EGL-generated SqlRecord looks something like this:

dataitem K FLOAT end
dataitem D DATE end
record T type sqlRecord {
        tablenames=[["S.T"]],
        keyItems=[K]
    }
    K K {column="S.T.K"};
    D D {column="S.T.D", isSqlNullable=yes};
end

Since the D column was defined in SQL without the "not null" clause, the EGL wizard adds the "isSqlNullable=yes" attribute.

Although the attribute says "isSqlNullable=yes", the date field is not actually nullable in EGL. And "EGL nullable" affects the null'ability of a field for a SOAP web service. The type should have been defined as D? instead of D. It's a problem with the wizard that generates the EGL code. You might not have the same problem with a hand-coded SqlRecord. (But, who does that?)

Let's say D=null in the client. If you use an SqlRecord as a parameter, D is replaced with today's date on the server side because, without a question mark, it cannot be null.

Let's say D=null in the server. If you use an SqlRecord as a return value, D is replaced with today's date on the client side because, without the question mark, it cannot be null.

Fortunately, there is a relatively easy work-around. Look for the corresponding "search" record. A "search" record is a BasicRecord, not an SqlRecord. Typically, an EGL-generated "search" record is defined in the same source file and looks something like this:

record TSearch
    K K?;
    D D?;
end

When D=null as a parameter, it will be null on the server side. When D=null as a return type, it will be null on the client side.

Because so many SQL tables have a date column and because an SqlRecord is slightly slower in a web service request/response than a BasicRecord, it might better not to use SqlRecord in this case.


Thursday, January 17, 2013

Essential EGL+Batch - Lesson 02 Library



Here is the source code for Lesson02.egl:


package lab.lesson02;

program Lesson02
    function main()
        SysLib.writeStdout("Lesson 02");
        demo();
    end
    
    private function demo()
    functionName string = "demo";
    BatchLib.startFunction(functionName);
        BatchLib.endFunction(functionName);
    end
end


Here is the source code for BatchLib.egl:


package lab.lesson02;

library BatchLib
    private const PREFIX_START string = "START ";
    private const PREFIX_END string = "END ";

    function startFunction(name string in)
        message string = PREFIX_START :: name;
        SysLib.writeStdout(message);
    end

    function endFunction(name string in)
        message string = PREFIX_END :: name;
        SysLib.writeStdout(message);
    end
end


Thanks for watching!

Essential EGL+Batch - Lesson 01

Here is the source code for Lesson01.egl:

package lab.lesson01;

program Lesson01

    function main()
        SysLib.writeStdout("Lesson 01 - 0.0.0");
    end
end

Thanks for watching!


New Video Series: Essential EGL+Batch

Starting out with EGL? Don't try to learn too much too soon. This video series is intentionally limited to the very simple EGL+Batch model. In this model, you run a program in a runnable Java Archive from a command line. You only need a Java Virtual Machine, such as provided by Java Runtime Environment 6.

With this model, you can do important production work, such as import/export information into a JDBC-compatible database, such as DB2, SQL Server or Oracle. You can validate existing data. You can write, debug and test business logic in a library before it is used by a web service provider.

With this model, you can learn the development tools, such as the IDE, editor and generator. You can learn the most important features of the the language, such as built-in types, parts, control structures, records, arrays, dictionaries, delegates and more. You can learn to work with the Eclipse debugger.

At first, you do not need to learn additional technologies. Once you have learned the basics, you can then go on to learn more complex models, such as EGL Rich UI, web service provider, EGL+JSF. You can go on to learn the complexities of the full JEE application server.

This tutorial features EGL Development Tools (EDT), an Eclipse project. We'll use version 0.8. Install EDT on Linux or Windows. In lesson 01, create a basic project, create a package, write a program, run a program, debug a program, create a runnable Java archive, run a program from a command line. In lesson 02, write a library, learn about the built-in type called string, learn about the const and private keywords, use the debugger to find and fix a bug.

Thanks for watching!

Improve your next tutorial video


Have you suffered through some of the tutorial videos on the Internet? Anyone can create a video and it shows. But, enthusiasm is not enough. Here are a few suggestions on improving your next tutorial video.

First, you need a reasonable scope. You need to be specific when creating a video. In one hour of video, you will not be able to provide detailed instructions for everything you’ll ever want to know about your subject, such as a software product. What part of the product do you want to detail?

Be choosy. The focus of a tutorial is an important decision. Many tutorial videos try to cover too much material, provide too much detail, or wander way off topic. Shorter is better. When you have something to say, just say it. Learn to turn off the camera.

Second, you must assume certain skills are already given to your audience. Prerequisite skills can be addressed in a number of different ways. Instead of explaining every concept, point to another source of information. A video can make references to a generally available resource, such as a public library or Wikipedia.

Listen to comments. If you assume skills that some of your audience does not yet have, make yet another video to cover additional material. Instead of trying to fit everything into one video, think in terms of a video series. Provide a reasonable amount of consistency. Point of view and assumptions should be similar throughout the series. Encourage your audience to watch more parts if they are interested.

Third, understand how your tutorial will be used. Your viewers will look at your tutorial for different reasons. Some simply want to be entertained. Some are researching, working toward a purchase or download. Some may want to know more about how things are done without installing and configuring the product on their own equipment. Some may want to follow your video, step by step, on their own equipment.

Fourth, use basic manners. Avoid long pauses. Don't say "Um". Use  2x, 4x, 8x to speed a video clip that drags. Speak clearly. During your presentation, please be aware that a viewer can pause, rewind and replay. It is better for your tutorial to move too quickly than drag on and on and on.

Try some or all of these suggestions on your next tutorial video. Improve the quality of your video without sounding like a professionally produced infomercial.

Wednesday, January 16, 2013

See? It's a command line.

Let's jump right in. Open up your favorite web browser and what will you see? You'll see a very well disguised command line interface for your computer. The location (or address) field is a classic command line.

What are the benefits of a command line interface, as opposed to a point-and-click interface, such as a modern tablet interface? You can go from anywhere to anywhere. The command line interface is open-ended. It is ad-hoc. You can do things that you have never done before. You can do things once.

Some years ago, a certain software company predicted the demise of the command line interface. They claimed that, in the near future, the command line interface would disappear completely from your interaction with a digital device. With the introduction of the browser, some were triumphant and hailed the end of the command line interface.

But, take another look. Think about it. The location field is a command line. The protocol or scheme is the command, such as HTTP and HTTPS, FTP and FTPS. When you type a uniform resource location on a command line and press the Enter key, you are commanding the computer to do something for you, aren't you?

Since the command line has been moved to the browser, why don't we finish it? Why can't we use the classic commands in a browser? Why can't we connect to another computer and use classic commands in a browser? Enough of my rant. I have been there, done that. The CjOS project demonstrates that, not only can it be done securely, it should be done. It would enable a classic menu created from independently compiled (and simple) programs. A command would offer a list of other commands that you might want to use.

On Linux, for example, I want to use "man ifconfig" in my favorite browser and get a man page. It can be done, and it should be.