What are your thoughts on plugin dependencies?

Discussion in 'Plugin Development' started by BRampersad, May 13, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    BRampersad

    This isn't a coding question more than a general open ended question.

    What are your thoughts on plugin dependencies? Should plugins be as self contained as possible (Ideally a simply drag and drop of a jar file). I find myself going for the most general solution to a problem often. For example i wanted to manage the gamestate of a game (Starting, Running, Deathmatch, Restarting) and instead of using a simple enum, i went straight to maven and got an Abstract Finite State Machine library that handle transitions and such. It grew my jar file from ~10kb to 7mb. Not to mention i see myself including large libs (worldedit, protocollib etc) for simple plugins. I guess i tend to over-engineer things too much but is it really that bad? Share your opinions on this subject.
     
  2. Offline

    Jogy34

    I personally hate adding dependencies to my plugins with the exception of Valut for economies and even then I try to add in a gold substitute in case vault isn't used. I just find it annoying when programming to have to worry about other plugins and then also if I'm trying to use another plugin to have to make sure I have all these other plugins that I have to worry about.
     
    BRampersad likes this.
  3. Well, even though you wanted a general discussion, for your example you're really overdoing things. You can do your own state machine pretty easily and it'll probably even fit better in your project.

    To the general topic, I would say it depends on what you need or what you want to do. If there's for example a library out there and you need about 90% of it, then I would use it instead of creating my own, but again, if this is really small and easy to accomplish, I would consider making my own. Moreover, if there's a plugin or library which is widely accepted than I wouldn't even bother making my own and go straight for it, because everyone uses and needs it anyway.

    Another aspect would be how much does the library you'd like to use offer and how well does it fit in your project. For example I'm also doing some mmo server development and there are probably a lot of multithreaded server libraries out there but since I'd like to do things way differently than how those libraries do it, I don't use them, even though I could use them to their full extend and it would be harder for me to create my own, but in the end, I would've ended up with a worse system than I would've when created my own and in fact, I don't regret making my own at all.

    So as you might see, it really depends on the situation. You can't make a general conclusion, at least I think so. Because it's your project you're the one who decides on what you need and what not. You decide how you do this and that. If you think that you can integrate something way better than a library you'd like to use can, make your own. If you think you will spend more time than you will benefit from it, then use the library instead.
     
    BRampersad likes this.
Thread Status:
Not open for further replies.

Share This Page