Solved

Microsoft Visual Studio - Projects vs Solutions

Posted on 2014-11-07
7
161 Views
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.
0
Comment
Question by:kylucky
  • 4
  • 3
7 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
Comment Utility
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: http://www.sqlite.org/cvstrac/wiki?p=DocumentationSqliteNet
http://www.dreamincode.net/forums/topic/157830-using-sqlite-with-c%23/
http://www.youtube.com/watch?v=tBZA9mXLhos
http://zetcode.com/db/sqlitevb/

http://forum.codecall.net/topic/69309-writing-and-reading-xml-files-vbnet-part-i/
0
 

Author Comment

by:kylucky
Comment Utility
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.
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
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).
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:kylucky
Comment Utility
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?
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
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...
0
 

Author Comment

by:kylucky
Comment Utility
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.
0
 

Author Closing Comment

by:kylucky
Comment Utility
I very much appreciate the guidance I received from pcelba.   I'm going to follow his/her direction.    Good stuff.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A list of useful business intelligence software.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

763 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