LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   General Authoring Discussion (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=22)
-   -   Thoughts on external libraries. (https://www.lotrointerface.com/forums/showthread.php?t=1190)

Digital_Utopia 11-04-2010 05:13 PM

Thoughts on external libraries.
 
I've been thinking a bit on the current folder structure when it comes to external libraries, in comparison to the way WoW's add-ons are done. Currently with LotRO, the general rule of thumb has been to treat external libraries like plugins themselves - in other words, install them in your plugin folder, in the Author's name folder. For instance, in my case - DUInterface would be stored in the DigitalUtopia folder, and any plugin that wishes to use that library, has to access it through that path.

On the other hand, WoW treats each add-on as its own entity, generally keeping everything that add-on needs to function, within that add-on's folder - including external libraries. I feel that this presents four advantages to the current LotRO setup:

1) No matter what changes the library's author makes - that version of the add-on will always use the version it was written for
2) It avoids a certain add-on version of "dll hell" where adding a future add-on that uses a different version of a shared library could cause an older add-on to break.
3) Unlike plugins and their .plugin file, libraries have no method to declare a version number, requiring authors to manually place some form of info file for any future update services (i.e. curse client, minion, LMM, etc)
4) Add-on authors aren't at the mercy of the library author. While using any other code than your own does require you to depend on a library author, it's a far better situation than if you had to immediately release an update should a library author change something.

For those reasons, I think it would be better to adopt that method of external library usage. However, that is merely my opinion, so I'd really like to hear from other authors here as to their own.

D.H1cks 11-04-2010 06:07 PM

I think we have the same view.

I do not like using external libraries at all for my plugins. I have made use of other's work, with credit given where due, but incorporate that work into my plugin's folder structure. (check the folder structure of the Travel Window plugin to see what I mean.)

At the same time, I have my own libraries that I use which are external to the plugins. I don't have any issue with that, because it is my own and I know that any changes I make to them will need to be checked on all my plugins. It is not my intention to ever release my libraries as stand alone downloads.

Oliner 11-06-2010 12:56 AM

WOW has the problem that a library loaded with one addon is the one that is globally referenced, and if another addon needs another version, this causes issues. It also causes more disk space to be consumed. The old WOWAce updater even allowed you to "unwind" library dependencies so they were stored at the top level and only one time.

One way that many of the addons have used to stay in sync on libraries is the use of a centralized development site like WOWAce/CurseForge which provides the libraries to the plugin authors plus provides the tools to allow the plugin author to automatically generate a ZIP file containing all the correct libraries along with the current release of code.

You might get better return on time invested by building up tools around the LOTROInterface SVN repository that allows authors to pull current versions of another author's code automatically as they build releases. This alone would eliminate many of the version problems, so long as the author is active. And for inactive plugins, there's really not much to be done unless someone else adopts it and runs with it.

Digital_Utopia 11-06-2010 01:59 AM

Quote:

Originally Posted by Oliner (Post 5415)
WOW has the problem that a library loaded with one addon is the one that is globally referenced, and if another addon needs another version, this causes issues. It also causes more disk space to be consumed. The old WOWAce updater even allowed you to "unwind" library dependencies so they were stored at the top level and only one time.

One way that many of the addons have used to stay in sync on libraries is the use of a centralized development site like WOWAce/CurseForge which provides the libraries to the plugin authors plus provides the tools to allow the plugin author to automatically generate a ZIP file containing all the correct libraries along with the current release of code.

You might get better return on time invested by building up tools around the LOTROInterface SVN repository that allows authors to pull current versions of another author's code automatically as they build releases. This alone would eliminate many of the version problems, so long as the author is active. And for inactive plugins, there's really not much to be done unless someone else adopts it and runs with it.

Since Libraries in LotRO are nothing more than scripts - thus allowing each plugin to use the same class in different paths. So for instance if Plugin1 imports Plugin1/Class1, and Plugin2 imports Plugin2/Class1, both work independently of the other. As far as disk space goes, I'm having trouble seeing a situation where any library is going to use enough space for this to even matter. Even DUInterface, with its 5 different UI elements, and related images doesn't even break 400 KB.

Regarding syncing, that's not the big issue. The issue is once a plugin is stable and mature that author could still be forced to update that plugin - for no other reason than to prevent it from breaking due to a library update. Not because of an API change, not because the library itself allowed the author to improve the plugin, but just so that the plugin continues to function. That just seems to me as a little unfair to be at the mercy of another author - after the plugin is already mature.


All times are GMT -5. The time now is 08:33 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI