WebSmart 6.6 New Feature Profiles
WebSmart 6.63 includes several important new features to both broaden the scope of your WebSmart ILE applications as well as make development easier.
New JDBC Templates and Functions to Connect to MySQL, MsSQL and Other Databases
In today's complex corporate environment, many of us work at companies that in recent times has been bought, sold or merged. And if not, it's probable that over the years our IT department has had various managers come through, with sometimes divergent philosophies. For these reasons and others, we may be faced with the challenge of building applications that access data from other servers and databases.
With the release of the new features in WebSmart 6.63, you can now build ILE/RPG programs that run on your iSeries and transparently connect to other platforms and databases to access and work with that data. This means that as a programmer, you are working with a single development platform, and that your users can be trained on a single web application, running on your iSeries, with a consistent interface and functionality regardless of where the data they access is coming from.
Field Renames
When you are developing applications you can sometimes run into situations where you have non-unique field names across files. This can be a particular problem when the fields have unlike attributes. With WebSmart 6.63 you can now use the field rename feature to address this problem.
Here is an illustration from a program where we are resolving a duplicate field name problem by renaming a Customer Number field in the Order Header file:
Renaming a field in the WebSmart IDE.
In the illustration above, we have right-clicked the field OHCUST in the fields window, and are selecting the Rename Field option. In Step 2, we entered the new name, and when we finish, you can see in Step 3 that both field names are shown in the listing.
After making this change, anytime you add the field to your definition, WebSmart uses the new name. And to correct references to the old field name just syntax-check your definition. The syntax-checker will issue an error for any spot where the old field name is references; you can then correct the errors, or just use the find/replace tool to do this for you.
In the generated RPG the result of our change is this:
The ILE/RPG source code of our generated program.
To remove a field rename, you just right-click the entry in the fields list
IntelliPrompting
Another useful new coding tool is the WebSmart IDE’s ‘intelliprompting’. As you type new PML or PHP function names, the IDE displays a subsetted lists of potential matches for the function you are starting to code. Below is an illustration where as we begin to add this PML ‘getparm’ statement, by the time we reach the ‘p’ the IDE has limited our list of potential functions to these seven:
IntelliPrompting in the PML.
In the prompt window, you just use your up and down arrow keys to go to a function from the list and the Enter key to select it.
For further information about the WebSmart 6.63 new features, please visit our website.
Customizing WebSmart Templates: Using PML Includes
Over the last few months the Tech Update has included a series of articles describing some of the tasks involved in customizing WebSmart templates. We began by looking at the structure of the templates themselves and in particular how these have been designed to use Cascading Style Sheets to control the appearance of almost every design element. In September's Tech Update we tracked down where the templates actually live and how you can use WCM (WebSmart Change Management) to also manage your custom templates and make them available to all your developers. This month we'll look at how you can share components and design elements across more than one template.
Adding Header Links to All Your Programs
When you decide to use WebSmart as your web application development tool it's likely that one of the first tasks you'll embark upon is to adjust your WebSmart-generated programs to reflect your company or organization's identity. Or at the very least you will want to include some standard images and links in the header area of all your programs, perhaps to navigate around your application. But what is the best way to add the same features to several different templates without having to maintain your added HTML in each of the template files? For example, if you decide to add a new link to your top menu, or change an image, you want to do it in only one place, and have that change immediately reflected in all your programs.
The best solution is to create a single HTML file with your custom content, and add PML includes to your templates.
Let's walk through implementing an example of this.
Creating the Include File
Our first step is to create the HTML file with the content that we need to add to all our templates. For this example we'll add a set of standard links along the top of our program header.
To get started we'll use Notepad to create a file named 'headerlinks.html' with these three links:
<a href="index.html">Home</a> | <a href="orderentry.pgm">Order Entry</a> |
<a href="custmaint.pgm">Customer Maintenance</a>
In the first article in this series we created a custom style sheet to use. To do that, we made a copy of the Idaho folder on the IFS and named it 'Yoyo'. So to keep things together, it's a good idea to also save your include files to the iSeries IFS. We'll put ours in the folder esdi\websmart\v6.6\Yoyo\includes.
Now that we have created the content we want to include in all our templates, let's find and change the actual template.
Editing the Templates
The templates for the current release of WebSmart are on your PC, in the folder C:\Program Files\ESDI\WebSmart\Templates v6.6\ILE Templates\DB2\Idaho. To start make a copy of the folder Idaho and all it's contents. For the sake of continuity, we'll call our new folder 'Yoyo', to match the name of the new template family we created on the IFS.
After copying the Idaho folder and its contents you can use WebSmart (or another text file editor) to open the A Simple Page template from your new folder. In our example, we are opening the file C:\Program Files\ESDI\WebSmart6.62\Templates v6.6\ILE Templates\DB2\Yoyo\A Simple Page.tpl.
In the open template, scan for the <html> tag, which will be at the top of each page generated by this program. Here is the only instance of this tag in the A Simple Page template:
Editing a WebSmart template in the IDE (we closed the Fields List and Functions panes).
In the illustration above the large box encloses the code for the HTML segment MainSeg, and in the smaller box you can see the template token that points to a section of your template further down, the Fragments, where you'll find this:
FRAG='PAGEHEAD'
{
TYPE='ONETIME';
DIR='if(&U_EXCLUDEHDR == "0") &SRCKEY = "SRC2"';
SRC='<div id="headline">
<div id="logo" title="Logo"></div>
<div id="title">&TITLE#</div>
</div>
<div id="divider"></div>';
SRC2='<div id="title">&TITLE#</div>';
To add our include file to this section, we will add this line, just after the line containing the Logo:
<% include("/esdi/websmart/v6.6/Yoyo/includes/headerlinks.html"); %>
This is how you insert a line of PML in your HTML. In this case, the line we inserted is a PML include function.
Save your updated template file.
Using the New Template
In the WebSmart IDE click the New File icon to create a new definition (you don't have to close your template file; you may need to adjust it). At the New Program window, rather than selecting any of the templates shown, we can click the Browse... button to locate this new template.
As you walk through the design process the wizard steps are unchanged. The only difference we'll see is that the HTML in the MainSeg segment includes our PML include:
A new definition, showing the include statement we added to the template.
We can now save, generate and compile our program to see the results:
The new program, incorporating the formatting added to the template.
Once you have verified that your include file works in one definition you can work through editing the other templates you think you will use in your application.
And when you are satisfied that your addition is correctly incorporated into all the generated programs, you can import the finished templates to WebSmart Change Management so all your programmers can use them.
|
New Service from BCD: FREE Educational Webinars
As part of our headline article above you can see the first iteration of a new direction we're pursuing at BCD. Beginning this November, we plan to offer free educational webinars every week or two on topics directly and indirectly related to our software applications.
Our second webinar is scheduled for November 14th at 2 PM (CST). Register now to learn how RPG programmers can create PHP apps over DB2 files in 5 minutes with WebSmart PHP. In this webinar you will learn how, as an RPG or PHP programmer, you can create fully functional PHP apps over DB2 or MySQL files in 5 minutes with WebSmart PHP's Intelligent Application Templates. WebSmart PHP is more than a PHP IDE, it is a complete Rapid Web Application Development tool – the templates guide you through the process of generating your base application so you can focus on business logic instead of routine coding tasks.
WebSmart’s template-driven design methodology is also excellent for teaching you PHP, because it generates the code for a fully functional PHP application for you. You can then customize any part of the application using the WebSmart IDE.
For further information about this webinar, visit the registration page or contact Technical Support.
New WebSmart Site Gallery Addition: Happy Vacations
The latest addition to the WebSmart Site Gallery is one we take particular pride in.
The Happy Vacations project (click for screen shots) was begun by our Professional Services team over a year ago, and in that time has gone through several iterations until arriving at its current form. In that time we also took on training the staff at their company, and have been managing the hand-off of the maintenance and development work on the site over the course of the last couple of months.
Unfortunately, the area of the site that was developed with WebSmart is the booking area, which can only be accessed by travel agents registered in their system. But we've posted several screen shots in the gallery so you can get a sense of how the application works.
This online WebSmart application replaces an existing green screen application, allowing travel agents to log in and generate a quote for a vacation including air, hotel, transportation and activities. The programs we built still take advantage of many of their existing batch processes. For example, flight information is gathered using an RPG module that makes a web service request to the Galileo engine.
This site uses JavaScript, AJAX and a tabbed interface to enhance the user experience.
If you have any questions about this site and how it was developed, please contact Technical Support.
BCD at IBM's Fall System i Tech Conference in Orlando
If you plan to attend the Fall Tech Conference in Orlando next week (November 5-9) make sure you track down booth #50 to pay us a visit. We'll primarily be demonstrating the latest release of WebSmart ILE and PHP, and we can also show you how you can use Catapult, Nexus and WebSmart together effectively!
And don't forget to ask for a demo and explanation of our exciting recent development: the JDBC templates you can use to build ILE programs over MsSQL and MySQL database files (and others!).
If you have any questions about where to find us at the Tech Conference, please contact Technical Support.
WebSmart Tip: Combined Operations
A relatively unheralded feature in the latest release of WebSmart is the addition of another combined operation. You may already be familiar with using ++ and -- to add or subtract one from field, which allows you to more succinctly render lines such as this one:
counter = counter + 1;
with this:
counter++;
In WebSmart 6.6 we have added one more function of this type: +=. You can use the ‘+=’ operation to add values to numeric fields and append text to string fields. This allows you to perform mathematical operations using less code.
Here is an example of how to use this operation with a numeric field:
number+=10;
This operation adds 10 to the value of the field ‘number’. You can also use the above technique to append values to strings. Consider this example:
applicant += "(Dependant)";
This statement appends the string “(Dependant)” to the end of the field ‘applicant’.
If you have any questions about this feature, please contact Technical Support.
New WebSmart PHP Example Program
This month our support team added the first WebSmart PHP example program to the list of more than 135 existing example programs.
Example 137 demonstrates how you can code a dynamic drop down box to control a list of records. The program is designed to use SQL to load a list of valid header records from a file to populate the dropdown box in the header area, while also using a second DB2 connection cursor to load the list area of the page with records from the Order Details file.
If you have any questions about this or any of the WebSmart example programs, please contact Technical Support.
Cam is our Technical Support veteran, probably the only member of the team who goes back almost to the time when ProGen Plus, DbGen and File-Flash Plus were the only horses in our stables! Cam will have his 9th anniversary with the company this month, and over the years he has handled almost 10,000 support incidents.
He did this while managing our network (6 years) and, over the last three years, leading many of our WebSmart and ProGen Plus training classes both here in Sidney and around North America and the world.
Like many of our staff, Cam came to us from the Computer Science program at the University of Victoria. In his heyday back at UVic Cam also rowed on their world-class team and played basketball, and for many years he worked his summers as a fishing guide out of his family's lodge in Campbell River (get in touch for a deal on riverside cabins!).
Nowadays, Cam spends most of his free time in front of the fireplace with his young son Riley, nursing his sports injuries and wondering what to do about the wallpaper in his new house. However, a couple times a year, despite our efforts to re-educate him, he rouses himself to make his annual pilgrimage to the Merritt Mountain Music Festival and go hunting with this father and brothers in Northern Alberta. Finally, in a company where many of us pride ourselves in our creativity, ingenuity and general synapse power, Cam can pride himself in having incontrovertibly crushed all takers in chess.
BCD Welcomes 2 New Employees
Over the last few months two more of us have switched over to mostly working remotely, from nearby Lake Cowichan and not-so-nearby Quito, Ecuador; but cubicle space at the BCD/ESDI office in Sidney continues to be in high demand, as we have recently welcomed two more members to the Technical Support and Professional Services teams.
Yanna Postaj-Boyce comes to us from Sarajevo (Bosnia-Herzegovina) via Edmonton(Canada) where she earned a degree in Applied Information Systems Technology from the North Alberta Institute of Technology while also working in several IT positions. On finishing her degree this spring she and her husband immediately fled the cold, white north for the milder temperatures and greener pastures of Victoria. When not pretending to be a total geek, Yanna enjoys gardening in summer, skiing in winter and yoga all year round.
Todd Connick is the latest addition to the Technical Support team. Todd comes from nearby Saanichton, and is a recent Computer Science graduate from the University of Victoria. While at UVic, Todd is reported to have created a fully-functional interactive model of a black hole, so we'll be expecting him to work twice as many hours as the rest of us from his cubicle in the 5th dimension.
If you have the opportunity to speak with Todd or Yanna on the phone over the next few months, take a moment to introduce yourself and say hello, we hope to have them with us for many years to come!
Current
BCD Software Release Levels
These are the current release levels for all our products:
If you have any questions about how to get to the latest versions, please contact
Technical Support.
Summary
List of Recent Updates
Nexus 3.34
You can download the latest version of Nexus (Release 3.34) from our website. This version includes several fixes and enhancements. There are also three additional Nexus 3.34 iSeries updates, NX33401, NX33402 and NX33403. All of these were released at the end of September and beginning of October.
For additional information, including detailed descriptions of the updates, please visit the Nexus Updates page.
Catapult 6.18
Catapult 6.18 is now available
for download from our website. Version 6.18 includes the following features
and fixes:
- A change to the Exodus code in Catapult allows users to specify a specific CCSID for both the iSeries EBCDIC encoding and the PC ASCII encoding. The Data Area SP_CCSID can be modified to indicate the expected CCSID's so that a proper translation is performed on any data sent to and from the iSeries.
- Using a replacement value inside the user defined Fax Number field in a split segment now works correctly.
- An issue with the &i replacement value has been resolved.
- An issue when submitting documents to the ECM with a qualified share name has been resolved.
- Added a message to indicate that the PDF generator failed to create the pdf temporary file after it has finished the generation process. This was incorrectly distributing a plain ascii text file with a .pdf extension.
- Resolved issue where the compression ZIP password was being incorrectly updated.
Please visit the Catapult Updates page for further information.
Organizations
that Recently Purchased BCD Software
AHS • Basler Electric • City Furniture • City of Carrollton, TX • Clayton County Board of Commissioners • Columbus Salame • Crudi d'Italia • Data House • Euromobil • Express Services • FDFP Ivory Coast • FiliVivi • Fortis Insurance • Golden Flake Snack Foods • Great Southern National Bank • Harker's Distribution • Hope Health • Industrial Motion Control • Johnson & Johnson Middle East • KTH Parts Industries • Lacks Enterprises • Marley New Zealand Ltd • Nobles County • Orion South, Inc. • Polish National Alliance • Sillo Giovanni • Sully Cooperative Exchange • Technology Consultants • Valley Mental Health • Veolia ES Technical Solutions • Volkswagen Group • Wahl Clipper • The Wensum Corporate Company • Western Digital Fremont |