View Single Post
05/09/14, 09:54 AM   #4
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by Roupine View Post
In what sort of situations would I want to create UI controls in XML vs. Lua?

I think there was a thread about this somewhere already.

Traditionally, you keep display logic and business logic separate, as you don't want that the web designer messes with your database and the web designer for sure doesn't want that you pick the Comic Sans font for displaying the content.

The ability to change the presentation without the functionality has other benefits, like for example, the ability to display a printer friendly version without the need to create a new functionality.

Of course, in this environment of addon development all those traditional benefits are not really important. You need to use a /reloadui, no matter whether you change the XML or the LUA file and the addon author is designer and coder together, too.

So here it's really more a matter of personal preference.

I try to stick everything I can into the XML, as I'm used to the traditional approach.
  Reply With Quote