HTTPS clone URL
Subversion checkout URL
Clone this wiki locally
LibDataBroker is a small WoW addon library designed to provide an MVC interface for use in various addons. LDB's primary goal is to "detach" plugins for TitanPanel and FuBar from the display addon. Plugins can provide data into a simple table, and display addons can receive callbacks to refresh their display of this data. LDB also provides a place for addons to register "quicklaunch" functions, removing the need for authors to embed many large libraries to create minimap buttons. Users who do not wish to be "plagued" by these buttons simply do not install an addon to render them.
Due to it's simple generic design, LDB can be used for any design where you wish to have an addon notified of changes to a table.
I know, lot of fancy programmer talk there... ignore all that. I'm sure you're asking "so what does this do for me that FuBar/Titan doesn't?" Well if you use FuBar or Titan currently and like it, not much. But if you don't use one of those two addons, or do use them but are looking for alternatives, LDB-based plugins and display addons open up your horizons. Think of it like taking a cell phone that is locked into a specific carrier and "unlocking" it to use on any network.
LDB-based addons still use the display-plugin design, the key difference is that plugins are not tied to a specific display addon, and vise-versa. Any LDB plugin should work with any LDB display. You're no longer forced to use a certain addon to display your plugins.
Another cool feature of LDB-based addons are "launchers". A launcher is essentially a button you can click to do something, like those shortcuts littered across your desktop. Launchers can do lots of things, open addon panels, launch config GUIs, toggle settings... pretty much anything short of casting spells (Blizzard protects that!). When an addon registers one of these launchers with LDB it is flagged as a launcher, telling display addons "I don't have any data, but you can click me!". Some display addons may choose to ignore these, others may choose to only display launchers. The idea is to get rid of all those little buttons on your minimap (something we programmers lovingly refer to as "minimap herpes") and bundle them up into one little display addon. You, the user, get to decide how to display them by your choice of display addons... or not display them at all! No more having to turn off 15 addon buttons and have them come back at unexpected times.
So why should you abandon your favorite bar addon and use this newfangled crap? Lots of reasons!
- You're giving the user the power (and responsibility) to pick how they want the addon to be displayed. This also means that you don't have to write a different plugin for every bar mod out there. One addon can handle rendering LDB plugins into the user's bar mod of choice, or the bar mod can explicitly integrate support.
- Minimal overhead. 74.7 KiB of deep embedded goodness. FuBarPlugin and all the libs it requires can run you upwards of 500 KiB. That's a lot to throw in every one of your addons when all you want is a little minimap button that opens your config panel... and a lot for the user to load up when they're planning on hiding your button.
- If you're creating a launcher, you're not forcing it upon users that don't want it cluttering up their minimap or bar addon... assuming of course you're nice enough to mark your LDB dataobject as a launcher. The user, again, has the power over how their launchers are displayed. Maybe he wants a single minimap button that opens a menu... maybe he wants a panel full of buttons that automatically collapses to the edge of the screen... who knows, users are weird!
If you're writing a display addon, why should it support LDB? Well that should be blindingly obvious, you get access to all those plugins out there! There's even a backwards-compatibility addon to pull FuBar plugins into LDB (yea, it's a hack I know, but hey, it works until those plugins get converted!) Oh, and we'll send you a free Slurpee(r)*
*We cannot guarantee Slurpee(c) will arrive frozen.