View Single Post
03-19-13, 07:47 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
DeadlyBossMods is not a very good example. The addon works just fine, but the code is absolutely awful.

For some examples of addons with decent code and frames that don't use XML, take a look at BigWigs, Omen, Bartender4, TomTom, Mapster, or anything written by Haste or Tekkub. Both of those authors have a lot of small simple addons with clean code.

Also, many of the code examples on Wowpedia are *really* outdated, and were written many years ago when you actually needed to use XML for a lot of things because the Lua frame API was incomplete. Nowadays, the only thing you can't do without XML is create templates for inheritance by secure frames, but that's a pretty advanced topic and you can generally achieve your goal without using templates anyway. The actual API reference on Wowpedia is fine, though.

The only other reason you might use XML would be if you were already hooked on XML from some other realm of programming... though honestly I don't know any programmer who uses XML who wouldn't be ecstatic to never have to look at it ever again. It's great for readability for machines; not so much for humans.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 03-19-13 at 07:53 PM.
  Reply With Quote