473,387 Members | 2,436 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,387 software developers and data experts.

what is best pratice doing this?

Hey

I'm about to start developing an windows application based on .net 2.0.

The GUI will consist of 2 things: a treeview and an area displaying things
based on selections in the treeview. The treeview shows all the modules in
the application and gives easy access to each module...

Lets say I today have 5 modules I want to include in this application. But
some day in the future I may have more modules in the application....

So I was wondering if there is possible to develop the GUI for this
application and then add the modules to the program. So I in the application
can register new modules and then the treeview will show all added module
and display windows belonging to those modules... - And also I want to be
able to remove a module from the application...

The goal is to split the modules from the GUI... I think it's not a good
idea to have the modules codes together with the GUI....

Would be great if I could develop each module into it's own assembly and in
the window applicatioin I could choose to register the module and the module
gets available in the application...

I'm wondering what is the best practice doing this?

If you have links about this subject, then please post them :)

Jeff
Oct 10 '07 #1
1 1283

"Jeff" <do***@spam.mewrote in message
news:uk**************@TK2MSFTNGP04.phx.gbl...
I'm about to start developing an windows application based on .net 2.0.

The GUI will consist of 2 things: a treeview and an area displaying things
based on selections in the treeview. The treeview shows all the modules in
the application and gives easy access to each module...

Lets say I today have 5 modules I want to include in this application. But
some day in the future I may have more modules in the application....

So I was wondering if there is possible to develop the GUI for this
application and then add the modules to the program. So I in the
application can register new modules and then the treeview will show all
added module and display windows belonging to those modules... - And also
I want to be able to remove a module from the application...

The goal is to split the modules from the GUI... I think it's not a good
idea to have the modules codes together with the GUI....

Would be great if I could develop each module into it's own assembly and
in the window applicatioin I could choose to register the module and the
module gets available in the application...

It shouldn't be too hard to do. Compile each of your modules into a
separate dll. Make each of them inherit from the same base class, or
implement an interface that is common to all of them. This base class or
interface will have methods such as GetTextToDisplayInTreeView or
ShowModuleInterfaceOnScreen.
The main program (the part with the treeview) can keep a list of
installed modules (which could be as simple as enumerating all the DLLs that
you have copied into a specific folder). For each of them, it would use
Reflection to load the assembly and create an instance of the main class
inside, then cast it to the base class or interface, and call the methods
that we defined previously to display whatever is needed in the tree and
show the interface on screen.

Oct 10 '07 #2

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

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
46
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
3
by: Tobias[br] | last post by:
hi there people... i´m developing an application where i need 190 input text, in 8 diferent forms.. anyone can tell me the best pratice to save the the data while edit the others forms?...
3
by: thedebugger | last post by:
Dear Friends, I am working on website application in c# with asp.net. My practice using aspx files is, I have 1 main aspx files for inside pages. Whenever user hit the button like aboutus,...
9
by: Brian Hampson | last post by:
I am trying to determine all the groups which the current user has permissions to add a member. Here's my code: foreach (System.DirectoryServices.SearchResult ADSearchres in...
2
by: kbutterly | last post by:
All, I have a menu which contains Category as the master and Product as the child. When I click on a Category in the menu, I want one formView control, fvpc, to show, and then when I click on...
2
by: Paulo Roberto | last post by:
Hi, I have a VS2005 asp.net 2.0 C# application with a lot of screens just like customers, companys, manufacturers wich has always the same basics working like a gridview showing the records, and...
2
by: xoro | last post by:
Hi, I'm getting a new problem with cursors in triggers. I would like to replace all my cursor fetching in all triggers but i did'nt know which is the best pratice. Here is a sample of my...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.