Target Group: PMs, ISVs, Architects
Complexity: Advanced
Easy-CPQ is coming along nicely, all MVP features are implemented, Feature Freeze is reached. Currently, people are Alpha-Testing the app. Usually, I’d go about documentation and marketing material next. This time I do it differently.
Situation:
I know, after Go-Live the first weeks are full of bug fixes, smaller improvements, and talking to potential clients. It will be quite stressful.
Solution:
To make my life easier after Go-Live I refactor my app one more time top-to-bottom before Go-Live.
Reason:
During development over the last few months I learned so much in all different areas of the app, might it be admin or coding stuff.
There’s almost no better time to refactor than right now. Not yet any customers using the app and all the details are still fresh in my mind.
I focus on a few key areas:
Must-Have:
1) Data Model
2) Move all Queries and DML to its own layer
3) Remove Magic Strings
4) Break up large & complex classes and LWC files
5) Naming variables, page layouts, fields, objects.
Nice-To-Have:
1) Transform all tests to mocking
2) Implement adapter layer
To not go over-board with refactoring I timeboxed it to 40 hours. I don’t want to keep endlessly refactoring and never Go-Live.
What’s your experience with refactoring before Go-Live?
Disclaimer: I know, I have the luxury of going about things as I like, not all projects are like that.
Clean-Up Success so far:
Admin:
5x Page Layouts Cleaned-Up
3x Fields deleted
1x Permission Set removed
1x Object renamed
LWC Code:
4x local helper files
2x shared Utility components
9x better error handling
APEX Code:
12x Magic Strings replaced
7x Queries moved to Query Service
2x large classes broken up
5x new Custom Exceptions