Author Archives: Derek Woods

About Derek Woods

Formerly on the development team for award-winning web development tool WebSmart, Derek Woods is now a project manager for the web development team in Professional & Application Services at Fresche. He started his career on the IBMi in 1999, just in time to pull the night shift for Y2K support. With dozens of successful web application deployments under his belt, he has a keen interest in helping everyone continuously get better. He's also learning to play the accordion because he wants to be a rock star when he grows up.

How to Leverage your WebSmart ILE Investment

So you have a long history with WebSmart ILE, having built your first web site back in the heady days of 2002. A lot has changed since then, technologies have evolved, paradigms shifted. The way you built your first web app back then isn’t necessarily how you’d architect it now. Through it all WebSmart ILE has maintained its relevance, and adapted to changing needs. And now? WebSmart ILE is well positioned to leverage your infrastructure and the deep business logic your senior developers have, and still take advantage of new browser technologies.

Separation of Concerns (Model-View-What?)

Long have developers been exhorted to separate their application’s business logic from presentation. In fact, HTML was designed for that very purpose. Alas, when the web exploded in popularity, this isn’t how things got developed. It was the wild west, discipline was lacking, and spaghetti code ensued. As the web has matured, there have been ever more robust frameworks arriving to handle the demands of apps that run in browsers. React, Angular, Ember, and others have come to dominate the scene. These are Model-View-Controller (MVC) style technologies that “bake in” the split between your presentation and business rules.

Fortunately, WebSmart ILE is well suited to working in this paradigm.

WebSmart ILE as Web Service Provider

Although you may be accustomed to writing WebSmart programs to output HTML/CSS, there is no reason you can’t use the tool to create web service-only programs. Whether it is XML or JSON responses, WebSmart’s integration with your IBMi makes it a convenient platform for developing web services. You may have already built web services for responding to requests for order status, for example. You can expand that role even further to make WebSmart the Model component of a MVC-style application using a browser technology like Angular. The beauty of this approach is that it doesn’t matter what the underlying technology for providing the data is: the output is just text (JSON strings, to be precise) so you can use anything you wish. Why not leverage your developers’ WebSmart ILE knowledge?

Why WebSmart ILE with Angular (or React, Vue, et al)?

One of the advantages of the MVC style of development is the ability to have one developer work on the presentation (the view) and another developer look after the business logic (the model). When reworking legacy apps into new technology, this can be a real boon. Let’s face it, your developers are most likely already over-worked with little time to learn a new JavaScript framework and new paradigm. So your developers with their many years of hard-won business knowledge can work with WebSmart ILE to program the model, and the presentation can be handled by a different person. And since these browser frameworks are in common use amongst web developers these days, it is easy to hire for a front-end developer. The newbie might not even have heard of IBMi, and can still be a productive member of the team.

Image: the separation of presentation and logic (the MVC approach)

Image: the client code being edited in the IDE.

Back to the Future

The rise of Angular and similar front-end technologies breathes new life into WebSmart ILE. You don’t have to go to a server-side MVC model (like PHP frameworks, for example), and you don’t have to deploy a new server technology like node.js either. By providing the web services for a client framework to consume, you have many years of productive WebSmart ILE development ahead of you.

WebSmart 8.9 is now available for download

Some of the features and fixes are:

New Features
  • PHP debugger; same feature set as the ILE debugger
  • Clover job scheduler
  • Clover can access non-iSeries databases
  • PHP license keys: site license, limited seat license, stand-alone (no iSeries needed)
  • PHP now has a ‘getparm’ function (actually called xl_get_parameter).
  • Formatting changes to the PHP templates to make them easier to read
  • New PML functions for hashing
  • New PML function ‘addheader'; write any http header you want
  • Support for calculated fields in SQL templates
  • Support for creating record filter in some PHP templates
  • Download generator files upon first defining a system (for new installs)
  • An optional ‘FOR FETCH ONLY’ clause can be appended to Clover queries
  • XSS protection code added to the PHP templates
  • Reduce the number of messages appear after a failed compile
  • Improved the default toolbar positioning
  • Updated the trial banner
  • User-customizable extensions; if you want your .zork files to be color coded as PHP (for example)
  • Database reconciliation now works with JDBC as well as PHWs
  • FTP now supports ascii transmission
  • setcookie/dltcookie performance improvements
  • TIMExxx functions now work correctly
  • Removed an incorrect “Object names cannot be blank” message box
  • PHP validation improvement for quoted strings
  • SQL utility should work better when varying length fields are involved
  • Visual HTML editor plays nice with JavaScript
  • Update the ‘Info’ tab
  • Fix memory leak in XML code
  • Made the html more consistent with the declared doctype

The new version is available from our client portal myBCDSoftware or from our public site.