Page 1 of 1

OOP, Scope Extension

PostPosted: Sat Jul 23, 2022 12:36 am
by john1598360627
I come from a background of Object Oriented Programming. As I learn how to use Form Extensions, this is a nice way of having Forms be used as objects!

However, I'm curious as to why only forms get this feature? Forms are the UI/UX, so design wise the only code in these should be events or functions specifically related to the purpose of the form. This in contrast to Scopes, which are purely filled with code.

This makes me wonder, why not give Scopes an extension feature as well? This would then change an entire scope into an Object, just like what Form extension does.


For Example;

With Form Extension, I was able to setup a hierarchy of 'class' forms. Such that I can pull from a certain type when creating a new 'object'/form. This is so forms of the same type share the same origin, making it easier to implement features globally (without needing to copy & paste everywhere).

form-classes.png
form-classes.png (37.01 KiB) Viewed 404 times



With how many Scopes my project has, if I could setup something similar with Scopes that would make my project much cleaner with this type of organization.