MuleSoft: A Frightening Start to a Glorious Finish

Posted on Posted in Blog

Have You Ever Showed Up to the Wrong Party?

Imagine you’ve been invited an 80s Dance Party and decided to go all out on your costume. You arrive at the address, looking like you’ve just stepped out of a time machine as MC Hammer and ready to break out your perfectly choreographed “U Can’t Touch This” moves, and knock on the door. Faint music, which doesn’t remotely resemble “Thriller” or “Don’t Stop Believin'”, pours through a slowly opening chain-locked door. A voice on the other side exclaims, “What’s the password?” Of course, your friend didn’t mention anything about a password. You stammer in confusion until the source of the voice relieves you with a chuckle as the door unchains and opens.

Now the real horror. You’ve arrived, dressed to the gills in ’80s paraphernalia, to a 1920s Speakeasy Party.

This was my horrific introduction to MuleSoft (except for the ’80s attire, of course).

I had arrived at my first day of a new engagement completely prepared to start on a Xamarin project, having spent the prior week refreshing my front-end skills with Pluralsight courses to prepare to make a great first impression on my new teammates and managers. I met my direct manager and a couple of the developers before being whisked off on a tour of the office. In an attempt at some small talk, I asked my tour guide about the Xamarin project. He looked puzzled but responded confidently. He told me that I was going to be on a team utilizing a technology called MuleSoft. It was at this very moment I realized that I have shown up to a 1920s Speakeasy Party dressed as MC Hammer. I, probably looking like a deer in headlights, responded, “MuleSoft???”

Fast forward six months and I have gone from never hearing the name “MuleSoft” to wondering where it has been my entire development life.


MuleSoft in a Nutshell

This powerful tool utilizes the AnypointStudio IDE, which combines a slick graphical interface backed by a Java runtime allowing our team to very quickly and precisely perform the grueling task of lifting legacy on-premise accounts up into the cloud. These accounts need to adhere to specific templates, which we have dubbed “integrations.” Essentially, we have these MuleSoft integrations polling on a data source, whether it be a database or a directory path, and it then lifts raw data from this source. The data is very quickly processed through a series of Anypoint Connectors–facilitating integration of Mule applications with third-party APIs and standard integration protocols. This process provides a means to access web services and resources–that read, transform, and output the manipulated source data into a specified file structure in a configurable output directory. This smooth process comes out of the box with the ability to be maven-ized and placed into a full-fledged CI/CD pipeline.


But Wait, it’s Testable

Now all this is super slick! But what really had me loving MuleSoft was MUnit integration.

MUnit is a native unit testing framework that is baked right into AnypointStudio. It makes Test Driven Development not only easy, but surprisingly fun. There is this connector in AnypointStudio called a “Mock” which allows a developer to completely isolate “flows” (functions) from each other and test solely the functionality of a particular flow, even if said flow has multiple calls to other flows or data sources. Essentially you get to mock the response of these other flows or sources to be exactly what you want to test against and then write a case that would handle the mock accordingly. Executing these cases results in some pretty awesome-looking reports generated in AnypointStudio and, if desired, the failure of an entire build/deploy if a single test fails. Studio also allows for there to be a configurable coverage percentage to be reached before succeeding a build!


Exploring New Tools Can Really Pay Off

All in all, my experience with MuleSoft has been an incredible one. I am constantly uncovering more and more of its immense power and finding myself thinking of ways to utilize it. If you ever get the chance, I strongly urge you to step out of your development comfort zone and build some basic applications that utilize MuleSoft. You know, show up to that 1920s Speakeasy Party in your finest ’80s gear, so to speak!