View Single Post
09-28-13, 02:11 AM   #34
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Vrul View Post
Blizzard's code is full of horrible implementation so citing it as a basis for doing something isn't really the way to go.

Some negatives of using XML:
1. Global variables must be used either for object names or inherited functions.
2. Directly coding a script handler in an XML template will result in separate copies of each function rather than one copy shared between the all objects.
3. Most code I've seen ends up with wasted functions for script handlers, a function that does nothing but call another function. This is a waste of memory and processing time, no matter how small a waste it is.

Some positive of using Lua:
1. A Lua factory function can be garbage-collected, an XML template cannot.
2. No need for an OnLoad script.
3. You can pass arguments to really customize the creation process.
Well i don't code everyting in xml, just the shell of the GUI, the interacting functions are in lua.
  Reply With Quote