That is the second submit of a weblog collection which summarizes the teachings I discovered throughout a technological migration with excessive uncertainty and complexity. Within the earlier submit, I talked about how I found the unique downside. On this submit, I’ll speak about how I confronted the issue.
The small print, uncertainty and complexity stored my progress sluggish, so I made a decision to bounce some concepts with my chief as a result of I wanted a brand new plan to begin making substantial progress. The aim we set was to do away with the complexity to begin progressing with the event whereas within the background I continued with the evaluation to ultimately cowl all of the enterprise logic.
The ASP.NET file had lots of code that wasn’t even associated to the scope of the requirement, which was emigrate the Transaction Overview Web page, so the primary transfer was to determine the comfortable path for this characteristic and its principal elements. The next steps have been to iterate time and again emigrate extra performance on each iteration till I reached the bizarre eventualities.
The opposite factor I modified was the evaluation method. To start with, I used to be making an attempt to grasp the front-end and the back-end to find out what to render (fields, labels, buttons) and the way (when to cover or present the fields, when to point out a area as editable or read-only), however for the reason that code was unreadable this method wasn’t working. I made a decision that I might render each part and aspect that I might determine immediately within the UI, then I might begin including the logic to cover the weather, then the logic to vary them to read-only, and at last the remaining functionalities. With this method, I didn’t must dive into the code, not less than for the primary half I simply had to have a look at the UI, and infrequently verify some assumptions within the front-end, one thing that I’ve by no means accomplished earlier than.
With these modifications, I began making vital progress. This new technique to work with out wanting on the code was very fascinating to me. I logged into the applying utilizing totally different customers of various organizations after which opened as many transactions as doable. For each variation that I noticed within the UI, I took a screenshot. With this, I recognized and documented nearly all of the elements that wanted to be constructed for the UI simply by altering the situation. Having recognized the sections, their parts, and their variations allowed me to create and distribute the whole lot in MVC Views and partial Views.
Constructing the brand new UI from scratch additionally gave me the flexibility to grasp the legacy code higher, one thing that I didn’t even assume was doable nor wasn’t anticipating, particularly as a result of I wasn’t it a lot. With each iteration I made so as to add extra parts to the UI I needed to go deeper into the outdated code, one way or the other, I acquired familiarized with each part and immediately the legacy code was not so exhausting to learn anymore. And once I regarded again to the outdated Transaction Overview Web page to match if I used to be lacking one thing I noticed that the principle construction of the HTML that I had developed was similar to the one within the legacy code, only a lot cleaner and extra readable. That stunned me!
What amazed me essentially the most was that in a few weeks, I used to be capable of current a demo of the brand new Transaction Overview Web page written in ASP.NET MVC. This demo was solely the front-end of the characteristic, it was utilizing dummy knowledge and it didn’t have any logic in any respect, nevertheless it rendered nearly each part and aspect that the characteristic included.
From right here the work turned extra manageable and I stored updating my planning. The next steps have been apparent, I simply continued including extra performance like studying the data of the transaction from the database and populating the weather, including the performance to cover/present parts, figuring out which JavaScript strategies and C# strategies I needed to migrate, which strategies I might reuse, which strategies I needed to decouple from the info and think about logic and create once more, and so forth.