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.

This entry was posted in WebSmart ILE on by .

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>