Project

General

Profile

action #67639

Updated by JERiveraMoya almost 4 years ago

After development in #66415 it was detected that with the current design we will be creating more code repeated every time we implement functionality in widgets, for example: 
 - setting/getting setting text from in textbox and numberbox 
 - items 
 - actions 

 Inheritance could still be used in some cases, but other more complex one One proposal could be to create 'real inclusion' (with mixin (kind of easy way to use inclusion strategy that is possible in ruby there could be collision in names so it might not be the best way) instead of inheritance, so basically having some ItemController class where we could have all those different and shared methods and each object would pick the ones that needs. Same could be done for and ActionController because for example label does not have any action. In the case of ItemController could be an offline class with no rest calls, just passing items, in the case of ActionController we might need to provide it with possibility to make the rest call, which might need some extra reorganization of our base class for widget so we can delegate that code.

Back