View Single Post
08-25-14, 12:01 PM   #14
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 102
It's still not exactly good practice I'd say to just modify a table from CreateFrame with your own methods, at least for addons larger than a single file. I've never really come across a design pattern like that outside of WoW addon development (granted, most of my experience is with OOP languages where you typically place your code in a namespace/package named after you or a company).

Keeping it separated in that way makes it more clear what code is yours and what code comes from default libraries, and can in some cases also make code more readable for an outside developer, they wouldn't have to check if the method someframe:SomeMethod() that is defined in file1.lua and used in file2.lua comes from the WoW Frame or a custom method in file1.lua.
  Reply With Quote