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)?
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.