Tuesday, December 17, 2013

cjos Command in OSGi

From the osgi> prompt, the cjos command is the entry point to CjOS (the C++/Java Operating System). What can you do with the cjos command?

Any CjOS command
At a CjOS prompt, you can run any CjOS command without the cjos prefix. To embed CjOS in OSGi, without clashing with any existing OSGi command, we've implemented the cjos command as a prefix. The console for a CjOS command is redirected to the OSGi console.

ub command
osgi> cjos ub

The ub command is an entry point for the command-line Universal Browser. This browser uses the Smart API to resolve a URI. To run the browser in OSGi, use the cjos prefix.

For more information on available schemes, see also the JOS Technical Edition.

Example
osgi> cjos ub controller:resource:

This specification displays additional information about the resource: controller. A controller is a Java class; it implements one or more schemes.

smartlist command
osgi> cjos smartlist

The smartlist command displays a list of active schemes in Smart API. To run this command in OSGi, use the cjos prefix.

Monday, December 16, 2013

CjOS Project Revisited

The CjOS Project is a research project for a Java-based operating system with a combination of C/C++ and Java. The project has an emphasis on the Java-side of a Java-based operating system. The project has an emphasis on desktop, laptop and server machines. The project has emphasis on long-term stability of both API and implementation we like to call perfect backward compatibility.

Recent activity
One of the most active parts of the project right now is the investigation of OSGi. We're building OSGi modules from a large, monolithic Java class library.

Release 1.0
In addition, the first release of the OSGi initiative is now available. It brings many of the production-quality APIs from the CjOS Project to OSGi-compatible applications, such as the Eclipse platform and IBM WebSphere Application Server.

Example
Allow me to provide just one example of what you can do now. The Smart Archive feature enables your Java application to read a file inside an archive inside an archive inside an archive--without the use of temporary files. It also enables you to find files inside an archive inside an archive inside an archive--without the use of temporary files.

Tradition
The CjOS Project maintains a collection of Java archives. Traditionally, these Java archives are delivered to the Linux platform as a corresponding collection of RPMs. By adding the CjOS Project archives, you enable your Java application to benefit from a large, stable, backward-compatible, monolithic class library of working Java code.

Modular initiative
The previous collection of Java archives do not map directly to a collection of OSGi modules. Using the power of the XVCL Processor, we're re-generating existing Java source code into OSGi modules.

Discovery
By moving to OSGi, we have discovered and fixed hidden problems in our design and implementation. So, the OSGi initiative has improved the overall quality of the project.

Check it out
Download the recent release and experiment with it inside of your OSGi application.

Thanks for listening,

Monolithic vs Modular Java

To start this series of articles on OSGi, we'll take a look at the difference between monolithic and modular.

Why is it important?
Monolithic and modular Java are part of the same software architectural spectrum. How much is monolithic and how much is modular in your Java application should be an explicit choice. How do you decide?

Non-Motivation
We hear people talking about modular Java. We see books on modular Java. Does that mean that everyone should start developing with a modular architecture? No, you decide if modular is right for you.

Monolithic Java
A monolithic class library is where all classes are part of a single, monolithic namespace. While there may be separate collections of Java archives, the namespace is reduced to a single list.

Simplicity. The monolithic class library is the original model. It is a simple model. All classes are available all of the time.

Very large namespace. The monolithic class library is a viable alternative for large business applications because Java supports a very large namespace. Hundreds of thousands of classes can be used in a business application without loading two classes with the same name at the same time.

In other words, many programming languages prior to Java technologies have been limited by a small namespace. The name of a dynamic link library on a well-known operating system, for example, was limited to just eight characters. Java technology has a limitation, too; but, it is sufficient to say that it is more than a hundred characters.

Static class path. When a class path that is static, it never changes throughout the lifetime of your Java application. This means that the potential list of available classes never changes. Classes are neither added nor removed during the lifetime of an OS process.

Modular Java
A modular class library is where there are multiple, concurrent namespaces. The namespace becomes a tree rather than a list.

Version. Technically, the Java technologies are quite capable of loading two classes with the same name as long as they are loaded by two different class loaders. This has been true since the first version of Java (JDK 1.0).

Volatile class path. When a class path is volatile, it is capable of changing over the lifetime of an application. Classes are added and removed without starting a new OS process.

Complex. Dynamic loading of a Java class involves a little more complexity. A fully implemented module system involves a lot of complexity and resolving a lot of issues.

Moving from monolithic to modular
Changing a software architecture requires research, investigation and establishing a new set of constraints and rules. When classes have been developed in a monolithic software architecture, they must be redeveloped in a modular software architecture. Fortunately for Java classes, redevelopment uses a lot of the same tools with different techniques.

Is it worth the effort?
The big question is: Is modular worth the effort? The answer is maybe yes, maybe no. It doesn't make sense to move everything written in Java to a modular software architecture. A lot of Java code has been written in a monolithic architecture and is fundamentally incompatible with a modular architecture. In other words, some class libraries should not be modularized.

Each class library needs to be evaluated for the benefits of modular architecture. And, ultimately, the benefit of maintaining a loosely-coupled collection of modules should be evaluated. What do you hope to gain from it?

About OSGi
One of the benefits of developing OSGi modules is running applications in Eclipse Rich Client Platform and one of the many Java application servers, such as IBM WebSphere.

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.

Essential EGL+Batch - Lesson 25 SQL Select

Create an SQL record. Get records from a table and print them on the console.

Essential EGL+Batch - Lesson 24 SQL Delete, Insert and Update

Delete records with an EGL execute statement. Insert and update records.

Essential EGL+Batch - Lesson 23 SQL Drop and Create

Create a table with the EGL execute statement. Drop a table, if it exists.

Saturday, May 18, 2013

Open Source Software is Payback

The public continues to misunderstand free license and open source software after prolonged effort to educate, define and clarify. I suggest that there is a big difference between what should happen and what actually happens.

What should happen. Anyone who distributes a product should have superior social skills and talent for making their friends happy.

What actually happens. Both technical and social skill is needed to create a great software product. A programmer with high technical skill and low social skill will ultimately gets disillusioned, bitter and frustrated. No one wants to use software that is socially difficult and harsh, no matter what the possible benefit might be. Social skill is reflected in the end-user interface and especially reflected in an application programming interface (or API).

What should happen. Free license and open source software should fit under the umbrella of the commercial system and remove the risk for ultra-conservative corporate customers. It should compete with commercial software on the same turf. It should not be mysterious and unpalatable just because it costs less. (It does cost you something to use any software. Only the license is free.)

An open source open source project should have good "customer" service. It should listen to and satisfy "customer" complaints. It should offer a world-class web site and free technical support.

What actually happens. Open source software uses a bartering system. Bartering is the exchanges of goods or services without any regard to money. When you barter, neither are customers. Two parties are peers.

Anyone who visits your web site is your customer. According to the Malcolm Baldridge Total Quality Award, your "customer" is anyone who interacts with you, your goods and services. So, yes, you can have customers without any exchange of money. Some open source projects have excellent customer service. They treat their peers with dignity and social grace.

I produce free software tutorials and publish them on YouTube. It is my way of giving something back to the community. It is my way of improving my skills. I consider anyone who watches my video to be my customer.

Bartering typically happens when two parties come to an agreement about what will be exchanged. An agreement is made and then the exchange. But free license and open source is generally bad at bartering, too. In this model, an exchange involves parties that do not know each other and may take years. Your peer downloads your product anonymously. You build software in 2000 and someone downloads it in 2010. There is no (practical) recourse for failing to live up to an agreement. It is a cultural value, an honor system, bartering on faith. Some do not share the faith.

Never, ever distribute your free license and open source software with the hope that someday someone will return the favor. This is entirely wrongheaded. Make an effort. Distribute your software to return the favor to all of the free license and open source software that you have already used. Do not expect some future return on your investment. You are indebted. Your contribution is repayment. You have already benefitted.

Educate yourself on free license and open source. Listen to your peers. And when someone wants you to improve your software, be nice.

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

Making a tutorial video in five steps


What steps are used to make a tutorial video? I make a video in the following order.

  1. Gather the video clips. Some of the video clips are found in my personal video library; some must be created. During this part of video production, I must identify and gather together all of the video clips that I want to use in my video. When I forget a clip, it takes extra time to stop editing and switch back to setting up to create a clip.
  2. Assemble a rough edit for the video. I put the video clips together, working to arrange clips in a logical order. Sometimes, the order is dictated by the procedure used in a tutorial. Sometimes, the order must be discovered during the editing process. I work to eliminate for wasted frames, frames that have no action or frames that waste time, such as watching a six minute download.
  3. Capture the audio. I have a USB headset for capturing audio. Once the rough editing is completed, I write (or outline) dialog for the clip. On a good day, I play the video while I capture audio. On a bad day, I read the dialog from a script and edit the video to match the audio, rather than edit the audio to match the video.
  4. Add the audio to the video. With the audio track completed, I add the audio to the video. I playback the video to make sure that the video and audio are in sync, so that key words go with key frames.
  5. Export the video to a format compatible with the target distribution, such as YouTube.

As you can see, I did not include the many research and development steps that precede the actual making of a tutorial video.
  1. Proposing a video topic.
  2. Selection of a video topic.
  3. Research on a selected video topic, including reading and viewing similar presentations in books, articles, tutorials and other videos.
  4. Purchasing, downloading and installing tools for a software tutorial.
  5. Development and testing of working application for a software tutorial.
  6. Outline of steps in presentation.
  7. Practice video/audio capture.
What is the most important step? Choose a tutorial video as the best way to present information. Choose to learn all of the skills needed to make a video, such as video capture, audio capture, video editing and export. Take action.

Thanks for listening!

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.

Essential EGL+Batch - Lesson 12 Fixed-Length Record


Essential EGL+Batch - Lesson 12 Fixed-Length Record is now available on my YouTube channel. Convert a simple fixed-length record to a normal EGL record. Essential EGL+Batch is a video series featuring EGL Development Tools (EDT) version 0.8.

Essential EGL+Batch - Lesson 11 Record

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

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.