Microsoft Visual Studio - Projects vs Solutions

Posted on 2014-11-07
Last Modified: 2014-11-07
I have developed software for animal shelter record keeping.   It's being installed in shelters housing various types of animals.    I'm having to hard code in a lot of things to make it more suitable for each type of animal.   A very simple example is that birds are weighed in gms, dogs and cats in lbs, horses in kgs, etc.   There are many more differences.   Handling all of this different code for each type of animal in one solution is becoming a nightmare.   I would like to have ASBF - Avian Edition, ASBF - Equine Edition, ASBF - Small Mammal Edition; etc.    If I had this arrangement probably 80% of the code would be the same across them all.   I'm hoping someone can tell me if multiple projects within one solution would accomplish this.   Should I even try to accomplish this?    How would I accomplish this?   I would like to hear from anyone that has had experience and knowledge in this area.   Thank you.
Question by:kylucky
  • 4
  • 3
LVL 41

Accepted Solution

pcelba earned 500 total points
ID: 40428208
You should not hardcode such things like units used for particular animals... Instead of this you should use some configuration file or database.

You can have everything in just one project after you implement the configuration file/database. Various packages will differ in the configuration the development will be at one place etc. etc.

The configuration file can be just one XML file or SQLite database with appropriate administrative access. Many such solutions exist:

Author Comment

ID: 40428271
thank you pcelba.   I will definitely 'bone up' on configuration files by going to the links you have given me.   It will be very interesting.   The database currently being used is MS Access.  I don't know if that would change your recommendation to me in any way.   Thank you and I'll be studying because I've got to get a better handle on this 'beast'.   I'm getting ready to install in a turtle hospital and their requirements are quite different than a dog and cat shelter as you might expect.   Things are getting out of control and maybe your suggestion can bring some order to the universe.  Or at least my universe.
LVL 41

Expert Comment

ID: 40428304
So the Access database itself could contain some predefined system part which will be used for the application branching and other various settings. Of course, the system part can be in different database or in XML or another configuration file. But if you have Access already you may use it.

You just have to patiently define the structure of your data hierarchy to avoid duplicate information (you may find more if you look for data normalization).
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.


Author Comment

ID: 40428840
Thanks.  I'm glad I can use Access because I know that pretty well.   I don't know XML or configuration files.   I'm an old-timer and I think what you are suggesting is what we used to call 'table driven' software.    A lot of the application is that way now but I see how a lot more of it could be.   I have an animal types table.   I could put in there the unit of measure for weight for that animal and wouldn't have to hard code something like  'if 'horse' then 'kgs'.   Is this similar to what you had in mind?
LVL 41

Expert Comment

ID: 40428904
Yes, exactly. The animal types table should contain info about the weight units. Every time users select animal type the weight units should be updated on the screen.  You may also think about additional tables which will help to make the app more flexible (but more complex to you)...

E.g. Unit of measures and Unit of measure conversions can be used to make the data independent on the location where different units are in use (I think South of Arizona or the area near Mexican border uses metric system). Another example is Time Zone info etc.

The first version should be as simple as possible, so forget about Units of Measure conversion for now :-). But everything depends on your free time...

Author Comment

ID: 40428940
Excellent pcelba.    At first the app only worked for dog and cat shelters because that is where I was volunteering and had no idea it would go beyond that.   But it did.  So, I had to take out a lot of hard coding for that one particular shelter.  Now it works for any shelter and any type animal.   That was a lot of work.   I got rid of a ton of hard coding so I know how to do it.   Now I just need to do more of it.   You've helped me a lot and I'm going to go in the direction you suggest.   And that means I don't have to learn anything more to accomplish this.   Yay!  Thank you pcelba.

Author Closing Comment

ID: 40428943
I very much appreciate the guidance I received from pcelba.   I'm going to follow his/her direction.    Good stuff.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is about my first experience with programming Arduino.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

896 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

13 Experts available now in Live!

Get 1:1 Help Now