Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help Creating Modular Software  RSS feed

 
D R Wilkinson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to start trying to create a piece of software that uses seperate programs that are accessed through a single program - I have no idea how to go about this. I have tried searching for articles etc but I am not even sure what the terminology is. Can anyone point me in the direction of good reference material or even help get me going themselves. As a learning example I would like to make the following basic program.

A main program that has no functionality of its own except that it 'loads' a module program and adds the module programs controls into its menus.

The module program is simply a very basic text editor that allows the user to create a new text file, open an existing text file, save an open text file. This 'module' would not have any menu items itself - instead, the main program needs to be able to add this functionality to itself after it has loaded the module.

I know how to make the main program and the simple text editor myself but only as individual, seperate programs. I need help understanding what I have to learn and do in order to make the text editor work as a module within the main program.

Anyone up for helping me get started in the right direction?

Thanks.
 
Rick Goldstein
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds to me like a plug-in architecture. The key here is that each module program (plug-in) needs to define a common entry point or interface for the main program to access. The common interface might allow the main program to do something like ask the plug-in for its menus (for example). For an example of a very extensive application framework with a plug-in architecture, see Eclipse.

Rick
[ March 31, 2005: Message edited by: Rick Goldstein ]
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also be interested in Feature Oriented Programming
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two very basic principles you might want to google for are the Dependency Inversion Principle and Inversion Of Control aka Dependency Injection.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!