In article “Riding ExpressJs and Node.js to the Web,” you learned how to create a simple ExpressJs application complete with database access and a view layer. With this newfound knowledge, I thought it would be good to produce a tool for internal use that utilizes IBM’s ever-growing list of DB2 for i Services.
Recently I came across a scenario for a customer where I was asked, “How do we interact with our existing DDS-based, composite key, database tables?” That’s going to be a very common trait of most all IBM i shops using Ruby, and this article will cover some common situations you will come across as you use Ruby to interact with existing DB2 for i tables.
Take Sinatra “hello world” app further by introducing database access.
In the previous article we showed how to get up and running with an initial Node.js “Hello World” web application. That was pretty neat and all but the rubber hits the road when we start being able to interface with DB2 tables and existing RPG programs. The good thing is that IBM was fully aware this was a necessity and has given us some good tools to accomplish the task.