473,386 Members | 1,710 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,386 software developers and data experts.

Architecture advice

Hi

I am designing a brand new vb.net application. My aim is to have the main
app as a shell only and all real functionality is provided by plug-in
modules. Modules are to be loaded at runtime depending on which modules are
present. Modules also need to communicate to the main app to display such
and such toolbar and menu options. Main app needs to pass on toolbar & menu
selection to the current module. Some modules have UI elements (form). Its
ideal to have the modules as executables so they can be tested while under
development on their own too. What sort of infrastructure I am looking at?
Ideally I would like to do this in vs 2005 beta2.

Thanks

Regards
Nov 21 '05 #1
3 963
Ultimately, this isn't all that difficult. Your main app will need to
define the interface that all of your plug ins will use. The main app will
look to either a config file, or perhaps a local directory or registry entry
where mutiple config files can be referenced. That will provide the app
with the name of the plug-in that you need to call.

I'd suggest setting it up so that the main app opens, looks for a list of
plug-ins (registry perhaps), and then calls each one, passing in an object
that contains a representation of the menu structure. The plug in will add
items to the object representing changes to the menu structure that each
plug-in wants to see.

You could use delegates, or more simply, you could use a command pattern,
whereby the menu item would produce a "command" event that the main app
would send to the plug-in that registered the menu entry.

Your main app should probably create an abstract base class for any windows
that the plug-ins will need to open. That way, the plug in apps will
inherit from that base class instead of inheriting directly from
windows.forms.form. That way, you can have some control over the list of
windows that are open, and your main app will have a mechanism for doing
things like sending a "close" event to all windows when the system shuts
down or the user indicates "Exit" from the File menu.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi

I am designing a brand new vb.net application. My aim is to have the main
app as a shell only and all real functionality is provided by plug-in
modules. Modules are to be loaded at runtime depending on which modules
are present. Modules also need to communicate to the main app to display
such and such toolbar and menu options. Main app needs to pass on toolbar
& menu selection to the current module. Some modules have UI elements
(form). Its ideal to have the modules as executables so they can be tested
while under development on their own too. What sort of infrastructure I am
looking at? Ideally I would like to do this in vs 2005 beta2.

Thanks

Regards

Nov 21 '05 #2
Hi Nick

Many thanks for the detaild reply.

What sort of mechanism should the main app use to load the plug-in modules?

Thanks again.

Regards
"Nick Malik [Microsoft]" <ni*******@hotmail.nospam.com> wrote in message
news:4Y********************@comcast.com...
Ultimately, this isn't all that difficult. Your main app will need to
define the interface that all of your plug ins will use. The main app
will look to either a config file, or perhaps a local directory or
registry entry where mutiple config files can be referenced. That will
provide the app with the name of the plug-in that you need to call.

I'd suggest setting it up so that the main app opens, looks for a list of
plug-ins (registry perhaps), and then calls each one, passing in an object
that contains a representation of the menu structure. The plug in will
add items to the object representing changes to the menu structure that
each plug-in wants to see.

You could use delegates, or more simply, you could use a command pattern,
whereby the menu item would produce a "command" event that the main app
would send to the plug-in that registered the menu entry.

Your main app should probably create an abstract base class for any
windows that the plug-ins will need to open. That way, the plug in apps
will inherit from that base class instead of inheriting directly from
windows.forms.form. That way, you can have some control over the list of
windows that are open, and your main app will have a mechanism for doing
things like sending a "close" event to all windows when the system shuts
down or the user indicates "Exit" from the File menu.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi

I am designing a brand new vb.net application. My aim is to have the main
app as a shell only and all real functionality is provided by plug-in
modules. Modules are to be loaded at runtime depending on which modules
are present. Modules also need to communicate to the main app to display
such and such toolbar and menu options. Main app needs to pass on toolbar
& menu selection to the current module. Some modules have UI elements
(form). Its ideal to have the modules as executables so they can be
tested while under development on their own too. What sort of
infrastructure I am looking at? Ideally I would like to do this in vs
2005 beta2.

Thanks

Regards


Nov 21 '05 #3
The string in the registry would contain the name of the plug in, and the
main app would use reflection to load it up. Look up LoadLibrary

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eP**************@TK2MSFTNGP14.phx.gbl...
Hi Nick

Many thanks for the detaild reply.

What sort of mechanism should the main app use to load the plug-in
modules?

Thanks again.

Regards
"Nick Malik [Microsoft]" <ni*******@hotmail.nospam.com> wrote in message
news:4Y********************@comcast.com...
Ultimately, this isn't all that difficult. Your main app will need to
define the interface that all of your plug ins will use. The main app
will look to either a config file, or perhaps a local directory or
registry entry where mutiple config files can be referenced. That will
provide the app with the name of the plug-in that you need to call.

I'd suggest setting it up so that the main app opens, looks for a list of
plug-ins (registry perhaps), and then calls each one, passing in an
object that contains a representation of the menu structure. The plug in
will add items to the object representing changes to the menu structure
that each plug-in wants to see.

You could use delegates, or more simply, you could use a command pattern,
whereby the menu item would produce a "command" event that the main app
would send to the plug-in that registered the menu entry.

Your main app should probably create an abstract base class for any
windows that the plug-ins will need to open. That way, the plug in apps
will inherit from that base class instead of inheriting directly from
windows.forms.form. That way, you can have some control over the list of
windows that are open, and your main app will have a mechanism for doing
things like sending a "close" event to all windows when the system shuts
down or the user indicates "Exit" from the File menu.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi

I am designing a brand new vb.net application. My aim is to have the
main app as a shell only and all real functionality is provided by
plug-in modules. Modules are to be loaded at runtime depending on which
modules are present. Modules also need to communicate to the main app to
display such and such toolbar and menu options. Main app needs to pass
on toolbar & menu selection to the current module. Some modules have UI
elements (form). Its ideal to have the modules as executables so they
can be tested while under development on their own too. What sort of
infrastructure I am looking at? Ideally I would like to do this in vs
2005 beta2.

Thanks

Regards



Nov 21 '05 #4

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

Similar topics

25
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases...
0
by: DKode | last post by:
Ok, My company is asking me to build a portal site for managers. I think I have it down how I will structure the app, using C# and module based pages like in the ibuyspy portal example. I plan...
2
by: Andrew | last post by:
I am starting my first C# project and have a design issue which I would appreciate some advice about. I am wondering whether to use dataset to pass information between components or if I should...
3
by: Johnny Meredith | last post by:
Hi, I'm relaively new to programming languages in general, and brand new to VB.NET. I use/used VBA in MS Access previously to do what I needed. I want to learn VB.NET to stretch my boundaries a...
5
by: Tamir Khason | last post by:
Friends, maybe someone knows good references for .NET plugin based program architecture. E.g I want to be able to "put" class library(dll) in some place (where I do not the name of the class, but...
1
by: benmorganpowell | last post by:
I have a small windows service which connects to a POP3 server at defined intervals, scans the available messages, extracts the required information and inserts the data into a SQL database. I am...
0
by: Brian | last post by:
Tim- Might I suggest you take a look at book by WROX titled ASP.NET Website Programing Problem - Design - Solution Visual Basic .net Edition The ISBN is 1-86100-816-3 This book offers some...
4
by: Heath Kelly | last post by:
I need advice on correct usage of ADO.NET in an ASP.Net environment. I have an ASP.Net application that accesses data through a referenced class library. Things start to break down when multiple...
6
by: V. Jenks | last post by:
I apologize if this is the wrong forum for this, I could not locate one that was exactly appropriate for this topic. Over the last couple of years I've been doing a lot of reading on design...
0
by: CodeMonkey | last post by:
Hi, I was wondering if anybody could give me some advice on how to structure an application that I am about to start work on. The vague requirements will be: 1) Always-On monitoring of data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.