Project consisting of multiple projects

S

Sheldon

Hello -

I have an application I've been working on which is basically a combination
of four different applications. The users want to be able to access all
applications from one spot. Two of the applications consist of five forms
each. I used a tab strip for user access to each of the four applications.

Thus far, I have only incorporated two of the applications. The thought
just occurred to me, should I have designed this to consist of four projects
in one solution? If I do that, what would be the best way for users to
access the different projects?
 
G

Gregory A. Beamer

Hello -

I have an application I've been working on which is basically a
combination of four different applications. The users want to be able
to access all applications from one spot. Two of the applications
consist of five forms each. I used a tab strip for user access to
each of the four applications.

Thus far, I have only incorporated two of the applications. The
thought just occurred to me, should I have designed this to consist of
four projects in one solution? If I do that, what would be the best
way for users to access the different projects?



If they are four separate apps, you will have to create an app launcher
appliation and spin up the different apps based on the user's input (which
app he wishes to open).

if you have defined the actual app logic in class libraries, you can merge
the apps into a single application, but if they are truly separate apps,
you will have to launch them.

NOTE: You can launch apps from inside your other apps, but be careful if
only one instance should be opened, as they can go on a launch fest and
possibly create issues.

NOTE: Launching separate apps is generally done via a Process object.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
S

Sheldon

Thanks for your response, Gregory. You mentioned the following:
NOTE: You can launch apps from inside your other apps, but be careful if
only one instance should be opened, as they can go on a launch fest and
possibly create issues.

How would I prevent this from happening? Is there some way to close down
one application when they click on another tab?

How can I test to see if this is happening?
 
G

Gregory A. Beamer

Thanks for your response, Gregory. You mentioned the following:


How would I prevent this from happening? Is there some way to close
down one application when they click on another tab?


here is an article for checking if an app is already running or not:
http://www.codeproject.com/KB/dialog/PrevInstance.aspx


As for shutting down an application that is running, I know you can do this
with PInvoke on the windows libs with the application handle. I do not have
a link or code sample for this. If you go this route, be sure you have a
cleanup on shutdown for your apps, just in case they had something open in
edit mode.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
U

uncleSally

Hi Gregory, and Sheldon,

An interesting discussion, thanks.

I am wondering in what scenario having an application with multiple
applications opened and closed would be most useful.

curiously, Bill
 
G

Gregory A. Beamer

Hi Gregory, and Sheldon,

An interesting discussion, thanks.

I am wondering in what scenario having an application with multiple
applications opened and closed would be most useful.

curiously, Bill

In general, I would say it is more of an exception than the rule.

When I code, the apps are actually libraries, so setting up multiple
"applications" that call the libs is not an issue. And I can make
reusable controls quite easily. In addition, for a single app, I can
selective show forms based on permissions.

But, there are times when apps are already developed where all the code
is in the windows forms app. In these cases, spinning up the other app
is often the only choice, as management will not give you the time to do
it right.

In an optimal world, I would not head this direction with multiple .NET
apps that I actually "owned".

This is not completely true, as I have been on teams that created
application suites, where an entire app was only available if you passed
a perm check. I am sure it could have been done differently, but adding
a huge amount of bits to an app for a user that would never use them
meant it made sense in this scenario.

In general, here are reasons why you might do this:

1. Heavy apps (ie, lots of code to load) with users that do not have
permissions to use all of the functionlity (aka, the "apps")

2. No time to refactor apps into one app

3. Lack of knowledge on the team (security, refactoring, etc.)

4. Management/customer resistance

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top