Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Prepares Command API for migrating Order view page #13712
referenced this pull request
May 14, 2019
I've got one good news and one bad news
The bad news: when I see all the processings you have extracted from the AdminOrdersController, I think "Woah ! So crazy !" then "Sarunas must hate me now" and finally "Sarunas is going to hate me even more".
The 3rd one is because the code is extracted is a mess. Yes, I know this is legacy code but we cannot let it like this.
I think we need at least to define a proper mapping of who does what.
For example, according to
I'd like us to modify the code to make it very clear. Like
Then we'll have 3 private functions that, later, we'll be able to plug on correct implementations.
but one day we'll change it to
To sum it up:
Oh, the good news ? We'll do it in another PR, not this one
That makes sense and I totally agree, however, in a lot of cases code is very coupled, for example, method is 300 lines of code, then variables create in the first 50 lines are used in the last 50 lines or somewhere in the middle, so it's not that easy to split the code into little private functions.
Of course it does not apply to every situation.
Interesting, it's not random.