Refactoring of everything

November 21, 2017

Refactoring is "a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior" 1. Normally you refactor in lots of small steps, but this July, Riot changed their API and broke this site. That was the proverbial straw that broke the camel's back.

Over the past month, I made a lot of time consuming and frustrating changes. While I had confidence that the ultimate result would give me much more flexibility and development speed, it was a hard grind. Hindsight always being 20/20, it was only after I had relaunched it and shared with a (technical) friend that I began to realize how much I had changed. This is still a relatively small app with only 8,000 lines of Java code, but a lot of it was rewritten and much of the tooling around it.

Here is everything I changed over the past month:

Aspect Before After
Build tool Ant Maven
Testing framework Text file of URLs JUnit 4, unit tests but not complete coverage
Build platform None Bitbucket Pipelines
Datastore Google Cloud Datastore (NoSQL) Amazon Aurora (MySQL)
Data access layer None Java DAO/services pattern
App platform Google App Engine Amazon EC2
App container Google App Engine Jetty
Provisioning N/A SaltStack
Load balancing N/A Amazon Elastic load balancing
Protocols HTTP HTTP and HTTPS
Domain Registrar Gandi Amazon Route 53
DNS hosting SoftLayer Amazon Route 53
Riot API Version 2 Version 3 (big change)

Like I said, this should give me much more flexibility to add back some features and finally get to some of the ideas I had when I first launched this site (before it turned into a constant performance rewrite to address Google cloud latency).

Please submit feedback on the site. I read every single comment, even the ones where you just want to say how horrible your teammate was.

Like a Boss isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.