Solved

Solution vs. Project

Posted on 2010-08-23
6
481 Views
Last Modified: 2013-12-17
After many years of working in a Java environment, I'm working with a small team of C# developers.  We have several different applications that will share some common code.  In my Java experience, this is handled by separate applications, that share a jar file for the common code.  In the .Net world, my suggestion is to create multiple Windows form applications, and then create an application for the common code that will build as a .dll.  The .dll can be shared by the Winform applicaitons.

There is another suggested approach that puts all the code into a single solution, with each Winform application as a project, and the common code also as a separate project.

Am I wrong to think that since the Winform applications have nothing to do with one another they should be separate solutions.  And that the common code should be a separate solution.  As development is done on the common code, it can be checked into the SVN repository.  Only when the common code is ready for a releaase, should the revised dll be made available to the other applications.
0
Comment
Question by:jkavx
  • 3
  • 2
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33506994
Let's try an explanation like this:

1) A solution file is a logical grouping of projects.  It brings together different projects into one "solution".  

2) Projects need references to other DLLs, so the solution doesn't build a single DLL.  Each project would still have its own DLL.  

3) Single solutions can be easier to work with.

4) You can use SVN with the solution, that would manage the sub-projects, too.
0
 

Author Comment

by:jkavx
ID: 33507058
Thx.  I just don't see the advantage to using a single solution; since the Winform apps are not related, why group them together?  How is it easier to work this way?

The problem I see with the proposed solution containing 2 Winform apps and a library application is that if work is done on the library application that is shared by the 2 Winform apps, updating the solution source code brings the library application changes into the solution.  I want to postpone integration of the dll changes until an actual release of the dll is ready.  Am I misunderstanding how the projects would utilize the library application project?
0
 
LVL 6

Accepted Solution

by:
ryandale56 earned 250 total points
ID: 33507124
Some people will use solutions to group multiple unrelated projects that use the same custom framework libraries to make some things easier.  By framework I mean a set of custom class libraries built by you that can be used by your applications.  When you have an immature framework you have so many frequent changes that it may be beneficial to have it in the same solution as a front-end application.

However, at some point the framework should become pretty stable and I recommend it be put into its own solution.  This will allow different programs to use different versions of the library (in case of backward compatibility issues, etc).  Also, you are right, at this point there should releases of the framework to support the needs of the applications....but they should be in their own solutions (IMO).

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 33507505
Here is the layout for one of my 2010 solutions:

    Data Access (SQL Server)
    Business Logic (Rules)
    Windows Forms Presentation/UI
    Web Site Presentation/UI
        Unit Tests
        Database
        Architecture Modeling
        Setup and Installation

The solution pulls all these projects together, into one logical unit.  The projects, though, can stand on their own, and can be re-used (if need be).  The UI uses MVP (Model-View-Presenter) pattern.  We can easily switch out WinForms for WPF when the time comes, without much ripping and shredding, by substituting a WPF project for the Windows Forms project, and fixing the references.
0
 

Author Comment

by:jkavx
ID: 33507638
Thx for the example.  It does seem, though, that in your case, the projects can form one coherent whole.  But in my case, the projects are completely unrelated, except that they share some common code, basically database access.  
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33509782
A solution is a group of related projects.  If you have unrelated projects, then I agree that you are describing a multi-solution scenario.  
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now