04
Mon, Nov
6 New Articles

Weaving WebSphere: AIRPort Now Arriving

Development Tools
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

All my bags are packed, I'm ready to go
I'm standin' here outside your door
I hate to wake you up to say goodbye
—"Leaving on a Jet Plane"
     Written by John Denver
     Originally recorded by Peter, Paul and Mary
     Sung by Chantal Kreviazuk

You know me, always trying to find quotes that really fit. Well, this song is appropriate to this article for a number of reasons. First, it's both old and new. The original was recorded in 1967, and it's been re-recorded dozens of times over the years. Each time, it gets a little something new added. Second, it's highly versatile. Versions range from the Peter, Paul and Mary song that most of us probably know to the very hip punk version by Me First and the Gimme Gimmes. And it seems it can just keep being used in new ways; my favorite is the Chantal Kreviazuk version from the movie Armageddon, but covers range from the aforementioned punk version to Arthur Fiedler and the Boston Pops. And finally, the song can be both beautifully delivered (e.g., Chantal's version) and horribly misused (let's just say that John Denver probably should have just left this song to others).

OK, you get the point. So where am I going with this? Well, I mentioned in my recent iApplication Developer article that I had created a new use for Asynchronous JavaScript and XML (AJAX), which is itself simply a "cover" of an older technology, XMLHttpRequest. AJAX is a wonderful technology that's incredibly popular today and being used in many ways—some good, some not so good. In this article, I'm going to present that new architecture in detail, and deftly switching metaphors, I'll show you why it could easily be the next major technological tool in your Web application tool belt.

Fasten your safety belts, and make sure your tray tables are in their upright and locked position, because we're about to take off....

The Concept

In my last article, I explained the concept of an interactive portal. This is a little different than the typical "portal" as presented in many discussions of Web design. In the common parlance, a portal is really little more than a browser page with a bunch of separate small panes. Each pane is independent of the others, sort of like a mini-browser. Your standard sites like MSN and CNN are good examples of that type of portal. You'll have a pane for news and a pane for weather and a pane for stocks, but they don't interact.

This is a reasonable use of the browser, but it's really not what I consider the best use. Personally, I prefer a more robust interface in which everybody is talking to everybody else and I'm getting my data at the speed of light. Here's my example:

http://www.mcpressonline.com/articles/images/2002/060514%20(WW)%20-%20AIRPort%20Now%20ArrivingV4--05170600.jpg

Figure 1: This is how a business application portal should work! (Click images to enlarge.)

I start with a customer list in the upper left corner. I click on that, and I see the customer information for that customer in the lower left and the order history in the upper right. I click on an order there, and BOOM! the order detail shows in the lower right panel.

AIRPort does just that...and so easily you'll wonder what all the fuss was about.

Wait, What's AIRPort Again?

I'm hurt! You don't remember what AIRPort stands for? Well, the acronym specifically stands for AJAX Integrated Responses for Portals, but I also tried to create an acronym that would allow you to remember it just for its own sake.

AIRPort is simple in concept. You create an HTML page with a number of small sections that you then fill with HTML that is dynamically created by AJAX requests. In keeping with the AIRPort theme, I've coined a number of terms that can help you keep all this straight. But before I reveal them, I want to review a couple of today's most popular interfaces: the portal and the workbench.

The Portal and The Workbench

No, this is not another chapter in the Chronicles of Narnia. Instead, it's a simple comparison of two interfaces. The first is the standard portal interface. We see this on browsers all the time nowadays, even if we don't recognize it. The portal interface is generated in many ways, but the idea is always the same: a bunch of small windows that you can interact with.

http://www.mcpressonline.com/articles/images/2002/060514%20(WW)%20-%20AIRPort%20Now%20ArrivingV4--05170601.jpg

Figure 2: This canned portal package is from a company called Zimbio.

The browser-based portal is typically a simple multi-framed application in which you can open or close the individual frames. In the original implementations, such activities required round trips to the server, but as browser code has gotten more sophisticated, you can typically do this interactively. Any information (such as positioning) that needs to be sent to the browser is done via an AJAX request, so it's transparent to the user.

Depending on the sophistication of the portal, you can move windows around, resize them, and even add or remove them as you see fit. The amount of desktop configuration available depends a lot upon the business purpose of the portal application; a news portal like CNN.com is a different thing than an order inquiry application.

http://www.mcpressonline.com/articles/images/2002/060514%20(WW)%20-%20AIRPort%20Now%20ArrivingV4--05170602.jpg

Figure 3: With Eclipse/WDSC, you can switch between multiple stacked views in each panel.

The other type of interface is the workbench, a la Eclipse and WebSphere Development Studio Client for iSeries (WDSC). The workbench consists of multiple panels and each panel has one or more views. Note that Eclipse/WDSC doesn't really have a term "panel." It's my own term that simply stands for a rectangular part of the workbench that holds one or more views. There is typically a nice tab bar across the top of the panel that allows you to switch between the views. Figure 3 shows a workbench with three panels, each with multiple views. I circled the tab bars for each panel; these allow you to switch between the views in each panel. I find this interface incredibly powerful, especially when the different views interact with one another. For example, double-clicking on a source member in the Explorer view opens a new tab for that source in the editor panel. Similarly, clicking on a line in the Outline view positions the cursor to the matching line in the corresponding source view.

The Problem

The problem as I've seen it so far is that the portals require a lot of upfront configuration. In their eagerness to be a sort of one-size-fits-all interface, a lot of the application design issues have moved out of the hands of the application designer and into a separate "application administration" function. Typically, an entire infrastructure of code is required just to maintain the application.

http://www.mcpressonline.com/articles/images/2002/060514%20(WW)%20-%20AIRPort%20Now%20ArrivingV4--05170603.jpg

Figure 4: This is the IBM WebSphere Portal administration interface.

Figure 4 displays the portal administration function in the IBM WebSphere Portal product. While its flexibility is unquestioned, I have a problem with the fact that you have to go through multiple administrative tasks just to create a simple Hello World. First, you have to write the portlet; then, you have to import/deploy the portlet; then, you have to configure the page to include the portlet; and then, you have to allow a user to see the page and the portlet. This all makes sense from the perspective of making sure that all application design and administration bases are covered. However, it tends to get in the way of the rapid design and development of an application.

AIRPort to the Rescue!

This is where AIRPort comes in. By taking advantage of AJAX and the Document Object Model (DOM) used by all professional browsers today, I was able to design a simple yet powerful interface to allow the rapid prototyping, development, and deployment of powerful interactive portal applications. This new architecture allows you to quickly create simple, focused chunks of business logic and easily pass data from one to the other, all without having to repaint the entire browser screen for each user interaction. The design is simple, elegant, and very fast.

As I mentioned earlier, I wanted to create a simple acronym that would stick in people's heads, hence the term AIRPort. And in keeping with that concept, I've also rebranded several of the UI components of a browser screen with "AIRPort-related" terminology as shown in Figure 5.

http://www.mcpressonline.com/articles/images/2002/060514%20(WW)%20-%20AIRPort%20Now%20ArrivingV4--05170604.jpg

Figure 5: Terminals, gates, and planes: the primary objects of the AIRPort design.

The entire browser face is the terminal. That shouldn't be too terribly foreign; terminal is also a synonym for a computer monitor. The first step of an AIRPort deployment is to use some standard HTML to create sections of the terminal called "gates." Then, you write some simple JavaScript that fills those gates with data. (The AIRPort EAR file comes with a standard JavaScript file.) You do this by adding a "plane." This term stretches it a little: A plane is supposed to be roughly synonymous with a panel or a pane; it's the data that is inserted into the area on the screen defined by the gate.

I realize that using "cute" terms can sometimes detract from the overall professionalism of a concept, so feel free to use more normal terms. If, for example, you were trying to relate these terms to the terms you would use in Eclipse or WDSC, you might say this:

  • Terminal = Perspective
  • Gate = Panel
  • Plane = View

In a standard portal, each panel has only one view; the only way you change the contents of the screen is by minimizing the views, so in that scenario, you would have one plane per gate. And in the interests of simplicity, the examples in this article currently stick with that one-plane-per-gate design.

http://www.mcpressonline.com/articles/images/2002/060514%20(WW)%20-%20AIRPort%20Now%20ArrivingV4--05170605.jpg

Figure 6: Here's the AIRPort-enabled customer order inquiry...in Firefox!

By the way, when I say "simplicity," I mean it. I wrote the four-panel customer order inquiry portal that was outlined in Figure 1 in about an hour. The result is in Figure 6. Figure 7 shows the entire HTML required for the program. Figure 8 is the JavaServer Page (JSP) source for one panel:

<>
     <>
      Customer Order Inquiry
    
<>
     <>
       Customers
       Status
    
<>
     <>
       Orders
       Order Detail
    
<>
   <>








  


Figure 7: This is a working AIRPort HTML file.

<>
   <>
   <>
   <>
<>
  

  onclick=
    "addPlane1('02', 'CustomerStatus.jsp?ci=', false);
     addPlane1('03', 'Orders.jsp?ci=', true);">
  
<>
  
<>
  
<>
<>


 


Customer Name Orders

Figure 8: This is the entire listing for the customer list plane, Customers.jsp.

The HTML is almost negligible. It's a table with four cells, and each cell has a SPAN tag with the GATE attribute set to differentiate it from the others. The only non-HTML piece is the onload function of the BODY tag, which invokes the addPlane1 method, which is the JSP Model I version of the AIRPort UI mechanism. In it, you specify the exact URL that you wish to invoke to fill the gate. You'll notice that the invoked JSP, Customers.jsp, also includes some calls to addPlane1. In this case, a click on one line in the customer list will populate not one, but two separate gates. And that's really it. The work is done in the JavaScript file, airport.js, as well as in the COIApp class, but that's a little too detailed for this particular column.

The Two Primary Flavors

There are two primary implementation modes for AIRPort. The first is in keeping with the JSP Model I frameworks that many people are comfortable with; the primary interface is an HTML file that invokes JSPs to display the data. The customer order inquiry application uses this technique. You'll see from the source code that I've created sort of a hybrid approach; however, the first thing each JSP does is call an application method, which initializes the page. The application method keeps the state of the application and builds whatever Beans are needed for the page.

The other implementation is a standard JSP Model II implementation. I've created a servlet called Controller (sticking with those airport themes!) whose only purpose is to pass requests on to a session object called a Terminal. The Terminal object in turn passes those requests to an application object (which actually inherits from an interface called Application; I thought calling it a Plane was just a little too much). The application object is responsible for looking at request data, creating Beans, and finally forwarding to a JSP. I've included a second application, FlightStatus, to do that.

In both examples, I have no I/O. The "database," if you will, is simply a couple of hard-coded lists. But I think you can easily see from the design where the I/O operations would be written.

As Time Goes By

An initial question might be why I don't have all the goodies for being able to move gates around, minimize and maximize, add planes, and all that. Sure, it would be nice to be able to customize which panels go where so that users can create their own personalized interfaces. It would be nice to be able to maximize and minimize panes as needed and to be able to stack multiple data views in one pane, with an option to either tab through them or tile them as needed. But the problem with that stuff is the big, cumbersome administrative interface, which in turn makes it difficult to rapidly deploy business applications, and that is one of the main reasons you don't see a lot of portals in the SMB space. If you think about it, most business applications have a fixed interface, and in fact, they usually don't even have multiple panes. If AIRPort can quickly add the ability to provide multiple interactive panes, I think it can immediately be used to start building applications. That's another reason I want it to be open source; the project will add configuration capabilities as it goes along, but first we have to get some people using it. And that requires ease of implementation.

Another question might be this: Why, given my strong preference for JSP Model II, did I include the Model I approach? I did it for two reasons.

First, if you review the architecture, you'll see that there is nothing in the AIRPort Model I approach specific to JSP as opposed to RPG-CGI or PHP. In fact, you can easily use a combination of these techniques as needed (the only issue being sharing of persistent data). This is an absolutely unprecedented capability! It means I can use any Web application architecture I need for any part of the application! But to allow this flexibility, there can be no overarching architectural framework, so I need to stick with the less-sophisticated Model I approach in which all information for the request (including the target itself!) can be included in the UI. Thus, you'll notice that in my customer order inquiry, each JSP knows the names of the other JSPs that it triggers.

Second, most frameworks tend to be UI-centric. My next step with this architecture is to see how well it will interface with EGL, and I believe the JSP Model I framework will allow me to create a powerful system with little or no Java code. This is also why I kept any database I/O out of this version; it's my hope that I can soon have a template in which all I/O is done by RPG programs called directly from EGL—no Java needed.

However, I still included the AIRPort Model II framework because I believe the JSP Model II approach offers a number of benefits. It will be much easier, for example, to provide different versions of JSPs for different users, since the application specifies the names of the JSPs. This is extremely important for multi-tenant software, so it's a primary requirement for any implementation of Software as a Service (and one that few frameworks support cleanly).

In any event, the pre-release code is available for download from this Web site. It will soon be included in a SourceForge project under the Apache 2.0 license. I am including both an EAR file and a WAR file. Obviously, I can't test them on every configuration, but I've tested both the EAR and the WAR file in WDSC Version 6.0.1, running in both the WebSphere V6.0 and WebSphere V5.1 Express test environments. After you deploy the EAR/WAR file, you can launch the programs using the following URLs:

Flight Status: http://yourappserver/AirPort/airport/fs/FlightStatus.html
Customer Orders: http://yourappserver/AirPort/airport/coi/CustomerOrders.html

Hopefully, they're reasonably straightforward to use. More importantly, I want you to see how incredibly fast the interface is; responses are virtually instantaneous. As the AIRPort project team gets settled in (currently there are only two of us!), we'll include some better documentation with the SourceForge project, which you can find at the following URL:

http://sourceforge.net/projects/airport/

Please let me know what you think. If there's enough interest in the architecture, I can do a follow-up article with more details on both the JavaScript and the basic architecture, as well as whatever additional work we do on the configuration capabilities.

Joe Pluta is the founder and chief architect of Pluta Brothers Design, Inc. He has been working in the field since the late 1970s and has made a career of extending the IBM midrange, starting back in the days of the IBM System/3. Joe has used WebSphere extensively, especially as the base for PSC/400, the only product that can move your legacy systems to the Web using simple green-screen commands. Joe is also the author of E-Deployment: The Fastest Path to the Web, Eclipse: Step by Step, and WDSC: Step by Step, and is speaking at user groups around the country in May and June. You can reach him at This email address is being protected from spambots. You need JavaScript enabled to view it..

Joe Pluta

Joe Pluta is the founder and chief architect of Pluta Brothers Design, Inc. He has been extending the IBM midrange since the days of the IBM System/3. Joe uses WebSphere extensively, especially as the base for PSC/400, the only product that can move your legacy systems to the Web using simple green-screen commands. He has written several books, including Developing Web 2.0 Applications with EGL for IBM i, E-Deployment: The Fastest Path to the Web, Eclipse: Step by Step, and WDSC: Step by Step. Joe performs onsite mentoring and speaks at user groups around the country. You can reach him at This email address is being protected from spambots. You need JavaScript enabled to view it..


MC Press books written by Joe Pluta available now on the MC Press Bookstore.

Developing Web 2.0 Applications with EGL for IBM i Developing Web 2.0 Applications with EGL for IBM i
Joe Pluta introduces you to EGL Rich UI and IBM’s Rational Developer for the IBM i platform.
List Price $39.95

Now On Sale

WDSC: Step by Step WDSC: Step by Step
Discover incredibly powerful WDSC with this easy-to-understand yet thorough introduction.
List Price $74.95

Now On Sale

Eclipse: Step by Step Eclipse: Step by Step
Quickly get up to speed and productivity using Eclipse.
List Price $59.00

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: