473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Strategy in developing Modular application

Hi All,

I am developing a Windows based application that consists of several
different modules. These modules are effectively separate from each other
yet share information in a common database. I would like to be able deliver
specific modules depending on what the needs of the client are. Some
clients may only need Module A and B, while others may need the
functionality in Module D.
What I am trying to figure out is the best way to go about designing a
modular application? Do developers generally ship modules as separate
libraries? If so, what is the best way to see if another module is
installed? A registry key perhaps? I am in the planning stages now and
would be grateful for any suggestions. Thank you.

- Derek
Nov 13 '05 #1
1 9916
Derek,
I would recommend a Plugin pattern:

http://www.martinfowler.com/eaaCatalog/plugin.html

Basically how TraceListeners are implemented in the Framework.

Each 'module' is located in its own class library. One or more classes in
each library implement a specific interface (IPlugin for example) The
specific interface can be either an interface or an abstract base class.

Within the app.config file (or web.config for web apps) have entries that
identify the plugins. Generally I use custom sections within my app.config
to identify the list of plugins. I either use a custom section handler to
read the list of plugins (or just one plugin). Or I use
NameValueSectionHandler. Inheriting from
System.Configuration.DictonarySectionHandler works well in that you can
override the KeyAttributeName & ValueAttributeName. I normally make
KeyAttributeName=Plugin (where Plugin is actually interface name) and
ValueAttributeName=Type. I will also use sectionGroups in my app.config to
help organize it. Within the value attribute I store the name of the class,
in the format 'namespace.class, assembly' as that's what GetType expects.

I will use System.Type.GetType on the above value attribute, giving me a
Type object. I then use System.Activator.CreateInstance with the above Type
object to create an instance of the plugin, this allows me to define
constructors to the plugins if needed. Because the plug in implements the
specific interface I get early binding.

For the project I am currently working on, even the UI uses plugins, the
main executable is a minimalist shell that just starts the plug in loader
code, which happens to be in a class library... The app actually has
different categories of plugins (data layer plugins, business logic plugins,
UI plugins). I use an abstract base class for each kind of plugin as the
abstract base class has the factory method to load & manage the plugins.

I organize my app similar to:
myapp.exe - the main executable
myapp.exe.config - configuration, list of plugins
myapp.framework.dll - contains the plugin interfaces
myapp.plugin1.dll - contains the first plugin

I've been considering defining a custom installer that would create the
respective entries in my app.config file for a specific plugin. This would
allow easier deployment. I would install the class library & run installutil
to have it register the plugin in the app.config. Its on my list to define,
I just have not got to it.

The publishers in the Microsoft Data Exception block may be a good example.

Hope this helps
Jay

"Derek" <de***@wubbafish.net> wrote in message
news:1k*****************************@40tude.net...
Hi All,

I am developing a Windows based application that consists of several
different modules. These modules are effectively separate from each other
yet share information in a common database. I would like to be able deliver specific modules depending on what the needs of the client are. Some
clients may only need Module A and B, while others may need the
functionality in Module D.
What I am trying to figure out is the best way to go about designing a
modular application? Do developers generally ship modules as separate
libraries? If so, what is the best way to see if another module is
installed? A registry key perhaps? I am in the planning stages now and
would be grateful for any suggestions. Thank you.

- Derek

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wole | last post by:
I'm working on a project that requires a Web client with a graphical user interface. The client would run in a Web browser. When a user clicks a button in the client application a message is sent...
1
by: aj | last post by:
hi i am a newbi to python and developing a web application what do u all think is the best application framework for developing web application in python. I want a framework that supports...
7
by: Saso Zagoranski | last post by:
Hi! I mentioned this in my other post today but at that time I though I had it all figured out. When I got a reply regarding my other questing I saw that I don't :) Here's my problem: I...
2
by: Hernán Freschi | last post by:
Hi all. I'm writing a program which I would like to make "modular", that is, being able to add plug-ins for new functions. Basically, the plug-ins will add new MenuItems to the main MenuBar. How...
2
by: Peter Kubicsek | last post by:
Hi I need help. I'm trying to write modular APP which have only basic interfaces to work with database, and etc. All specific code will be in modules (dll's), which can be loaded/unloaded from...
4
by: Vivek Sharma | last post by:
Hi There, I am about to develop a windows application. I was wondering if there is any set of general guidelines I should be following when developing a windows application? Is there a...
0
by: Leif K-Brooks | last post by:
I'm writing an application with PostgreSQL as the database which I would like to be as modular as possible. It will have various modules, each of which will have their own database schema. A module...
22
by: Wildemar Wildenburger | last post by:
To make it short: Is there something like this already? There seem to loads of python frameworks for Web-Apps, but I have a hard time finding one for desktop-apps. I imagine it wouldn't be too...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.