LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2004, 10:46 PM   #1
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Rep: Reputation: 30
Modular Programming with Plugins


I'm interested in creating a program in which I can later extend the functionality of the program with modules or plugins, without having to change the code to the original program. Ideally I'd like to create a main program, and upon startup let it check for plugins/or modules, and incorporate that functionality too. Does anyone know of any resources for this kind of paradigm. I'll probably be writing the main program in Java but I'm more interested in seeing how this sort of thing is implemented, so it doesn't matter which language. Thanks for any help.
 
Old 10-30-2004, 12:52 AM   #2
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
Well, for platform specific you could look into libdl (dlopen(), dlclose(), dlsym()) for Linux, and getProcAddress for Windows. Just google them. If you don't want it platform specific than I suggest a scripting language, such as Python: www.python.org

Hope that helps.
 
Old 10-30-2004, 12:06 PM   #3
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
Thanks for your reply. I don't think that's what I'm looking for though. I'm looking to build a base program, and then extend the functionality of that program by incorporating modules without ever having to modify the base program. I intended to implement this in probably Java, and didn't want to worry about platform specifics. If anyone has any ideas or links of resources for this kind of paradigm, please send them along. Thanks.
 
Old 10-30-2004, 03:11 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
With Java, dynamic class loading can be done with the Class.forName method.

Last edited by jlliagre; 10-30-2004 at 03:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-modular Kernel from scratch Help shotokan Linux From Scratch 6 09-18-2005 09:12 AM
Completely modular system Pelican Linux - General 2 07-01-2005 05:54 PM
wine and modular softwares arturo63 Linux - Software 0 10-21-2004 10:09 AM
How to write modular and commented code? coolguy_iiit Programming 2 10-07-2004 01:05 PM
Plugins Programming gr33ndata Programming 1 04-13-2004 08:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration