Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Microsoft Visual Studio - Projects vs Solutions

Posted on 2014-11-07
7
Medium Priority
?
185 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 43

Accepted Solution

by:
pcelba earned 2000 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: 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
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.
0
 
LVL 43

Expert Comment

by:pcelba
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).
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:kylucky
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?
0
 
LVL 43

Expert Comment

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

Author Comment

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

Author Closing Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
While Plesk offers many potential benefits to website administrators, including compatibility with Windows Server and other leading technologies, the company has also been working to differentiate it from other control panels for content management…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

782 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