Azure has been around for nine years and I never had a reason to look into it, until August 2017. That month I was approached by a client I had done some BigCommerce theme updates for requesting a quote on taking over a product configurator project for their website. I looked through what they currently had and went over the RFP to see what their goals were and how to best accomplish them.
Everything looked straight-forward but there were two problems. Infor, the third-party they use for their internal configurator, has a web service that is Windows-based, uses SOAP for communication and doesn’t return every option at once. Infor instead expects a step-by-step configuration where the user selects a model and then has to select every option one at a time. One model might have a specific feature that another doesn’t so the steps change based on selections. This posed some problems as the client wanted everything presented on one screen but I was certain it could be done as the existing in development configurator had managed to do just that.
Making Friends with an Old Nemesis
The bigger problem was that I could not connect to the service using PHP. I looked all over the internet for a way to connect to Infor via PHP. It’s SOAP-based and PHP supports SOAP, yet all of my connection attempts failed. I would eventually discover that Infor expects specific headers and bindings for access. This left me to figure out what I could possibly do to achieve the client’s goals. Revisiting the existing code I was resigned to that fact that I would have to use C# to communicate with the service. The client wanted this on their website, not a subdomain and their website is running on WordPress.
The solution to this problem was to have WordPress only render a Vue.js single-page application that used AJAX to communicate with Azure. On the Azure side of things, I made use of their Functions solution which allowed me to write C# code to interact with Infor and return a response in JSON to Vue.js. This was a complicated and interesting experience but eventually, everything ended working exactly as the client wanted. There was a lot of trial and error as well as a lot of me sitting in front of a Windows computer writing and testing C# files.
Despite being thrown onto multiple ASP/.NET projects at a former job from 2007 to 2010, I actually like C# as a language and would use it in the future if I need to. Functions overall is a great service and much easier to get started with than Amazon’s Lambda offering, which I’ve used before but has so many more services tied into its usage than Azure.
Look at that Vue!
This project was also my first experience with Vue.js which I like a lot but had some issues getting everything working as I wanted it to. I attribute that to the Infor data though, if it had a nice clean REST-based API to work with I don’t think I would have struggled with certain features. The Single File Components method of building a Vue.js app was a nice experience. It made updating components easier, though I didn’t take advantage of the built-in CSS support, instead opting to build my CSS file from multiple SCSS files so I could take advantage of variables, mixins, and my normal build scripts.