Class system for GUI

I wanna to know if it is efficient to use a class system for the GUI

There is no issue only a idear

i have also writen such a code is it effivient?

Details:Uses Classes for every Instances and table to save the data and create te GUI

Thank you for answers

1 Like

The built-in classes - including the GUI related ones - constitute a “class system”. So any system you make would kinda sit on top of that. If you mean having a table-object for every GuiObject Instance, that would be inefficient as it takes up memory. The more data you store in these table-objects, the more memory it takes. If you use the table-objects mostly as proxies to the built-in objects, so you don’t have to store all the data, that makes your code run slower since everyone lookup and mutation has another level of indirection.

Soooo… that’s less “efficient”, but if this lets you program GUIs in a way you like more then it might be worth it. And if you gain a lot for a bit of memory and speed, maybe that’s very “efficient”.

You might be interested in Roact, which is a Roblox version of React which uses components that are reusable and support things like inheritance in a way.

2 Likes

Thank you for your reply, I will keep working on this System.

But i notice the Advantages and disadvantages.So i will keep an eye on the memory and the speed.Like you say if its good it can save a lot of memory and time.I will be sirious i m scripting since only a year Sooo … my Experience you know.

1 Like