Page 1 of 1

Module, extension or Add-On... How ?

Posted: Sat Mar 19, 2011 5:51 pm
by koolgraph
I've always been wondering how is it possible to implement such things... I've think about some kind of polymorphism but even then, i don't really see the way it would work...

Does anyone ever thought about it or know a way to make Add-Ons possible into your program ?
Thanks for all your answers.

Re: Module, extension or Add-On... How ?

Posted: Sat Mar 19, 2011 6:39 pm
by k1net1k
you have opened up a very broad and vague discussion. depending on how you look at things, addons can range from color persona themes, through to complete changes of functionality so that the original and modded product are vastly different.

Re: Module, extension or Add-On... How ?

Posted: Sat Mar 19, 2011 9:28 pm
by koolgraph
Well i haven't seen things this way but you're right, it was vague. I meant addons to add some features, maybe like firefox. There is a lot of addons like fireftp which add the Ftp Client features. Otherwise it's really to add features, if we talk about a game, it could be to add a Item Set System or even a Pet System. So it will act differently but not completly change the program. This is why i thought about polymorphism and heritage to implement a modified version of a procedure but i don't really see how to add these functions to the program...

Thanks again for your help.

Re: Module, extension or Add-On... How ?

Posted: Sat Mar 19, 2011 10:05 pm
by eatcomics
Scripting languages and DLL injection to name a couple

Re: Module, extension or Add-On... How ?

Posted: Sun Mar 20, 2011 1:29 am
by Falco Girgis
...lolwut?

Re: Module, extension or Add-On... How ?

Posted: Sun Mar 20, 2011 3:40 am
by k1net1k
i would suggest you have a look at other programs and see how they have implemented it. maybe try writing your own firefox addon (or at least look at the doco). you can either make your program surface an API so that others can do additional stuff to it. i think the best way would be to make your program engine/core be able to utilise a scripting language, and then addons is the next logical step. it really depends on the program you are making as to what level of features you make available this way. i mean you dont want your program to fail because you allow anything in your addons 'sandbox' maybe thats the word

Re: Module, extension or Add-On... How ?

Posted: Sun Mar 20, 2011 4:26 am
by Milch
Well, there are a couple of ways to do that.

Use a scripting language like Lua or Phyton
Well this is pretty obivous.
Phyton is actually better for application-addons/plugins, because is a really big and complete language that can stand on its own.

Use dynamic DLL loading
Should be pretty self explaining.
Big plus for the DLL loading: You can use whatever language you want to as far as I know.
Though, the actual loading is plattform dependent!

Use an interpreted language like Java(though, most of the other interpreted languages will have similar features)
They often have features to dynamically load classes.
(e.g. in Java it would work this way: http://fdt.powerflasher.com/blog/tag/urlclassloader/)
eatcomics wrote:...DLL injection...
Well, this sure isn't the best way to do it, I would prefer one of the methods I explained above ;)

Re: Module, extension or Add-On... How ?

Posted: Sun Mar 20, 2011 4:24 pm
by eatcomics
Milch wrote:
eatcomics wrote:...DLL injection...
Well, this sure isn't the best way to do it, I would prefer one of the methods I explained above ;)
Yeah I meant what you said. I didn't mean injection :P
GyroVorbis wrote:...lolwut?
Dunno if you mean me or the OP, but either way I agree xD