Sep-04-2022, 09:54 PM
I am not seeing where you are "separating the GUI from the logic". Where is there any logic?
Or are you trying to create a layer that insulates writing a GUI program from the details of a particular GUI package? In that context "createButton()" makes a little more sense, but I would still try to implement that framework as a family of classes instead of a bunch of functions. Programmers will want to create special versions of your button (subclasses) and this is easier if you provide classes instead of functions.
Or are you trying to create a layer that insulates writing a GUI program from the details of a particular GUI package? In that context "createButton()" makes a little more sense, but I would still try to implement that framework as a family of classes instead of a bunch of functions. Programmers will want to create special versions of your button (subclasses) and this is easier if you provide classes instead of functions.