vendredi 2 novembre 2018

What design pattern should be opted for patch releases

Problem Statement: When new web application version is rolled out, what I have seen as best practice is bundle vendor code/ business logic code and these will be cached in browsers.

Lets say we make a little change for a bug fix, what is practiced is we rebuild the code and send a new bundle.

Whats the problem: Creating a new bundle seems like browser's cache is not used to max.

What can solve: Send only a patch and don't make a new bundle.

Where I am stuck: How to have the codebase designed in a way that sending patch will work.

For example, Lets say there is a bug in a function. What will be sent in the patch is a code which will override the buggy function.

How to design the code so that this will be made possible? One thought I had is "if we have an object oriented codebase, we can create a new class which can override a buggy function. But this will work only for a public function. What if it is a private, then we will have to override the entire class".

Are there any standard solution for this ?

Aucun commentaire:

Enregistrer un commentaire