Newbie Design Question

  • Thread starter Thread starter Mike Hildner
  • Start date Start date
M

Mike Hildner

Just fishing for ideas, so any input/links much appreciated.

I made my first commercially successful mobile app. As we sell it, different
clients want different additions - really additional "modules" or
applications. These modules all need to talk to each other - both at the DB
level and the GUI level.

I'm envisioning some container application where modules may be turned on or
off. What's the best way to go about this?

Thanks,
Mike
 
Mike,

That is a tough question without knowing the details of your domain problem.

In my current project I need to add more functionality to my base app but do
not want to recompile it every time, so I am looking at using a Plug-in
design pattern with reflection

Dan
 
Sorry - I know it was kind of an open question. Interesting thought you
have. I don't understand how that would work, care to elaborate?

In my case, my first app is a TCP based program that does criminal checks.
The cop pulls you over, types in your license plate, and gets back whether
to car is stolen, who it's registered to, that person's criminal and driving
history.

Clients like this but want more. One client wants to add a module that would
take that information and start a moving violation citation. Another would
like to take that info and search their server for any local warrants.

So I can see where I'd have several modules, but depending on the client,
they may have one or more modules - the number of modules depends on the
client.

I'm thinking it's important to find a good design right now, but I really
don't know how to go about it.

Mike
 
Mike,

Here is an article that should get you started with the plug-in pattern:
http://msdn.microsoft.com/msdnmag/issues/03/10/Plug-Ins/print.asp

Basically you could create a DLL that would house a "Perp" class and the
plugin interface. Both your main app and any of your modules would
reference this DLL. The plugin would implement the plugin interface:

Public Interfrace PerpPlugIn
Sub Execute(ByRef ap As Perp)
Readonly Property Name() As String
End Interface

Using the article above you could use reflection to enumurate all of the
DLL's in your application folder that implements the PerpPlugIn interface.
This way you can extend you app by simply placing your modules in the app
folder (or sub folder) and your main app would handle enumurating the
plugins and executing them.

Dan
 
Back
Top