?
Solved

TFS Organization Opinions

Posted on 2012-09-17
6
Medium Priority
?
833 Views
Last Modified: 2012-09-24
Hello,

I wanted to see other people's opinion of how to organize your source code in TFS.

So, a simple breakdown.  We have the organize the following code:

1. ASP.NET project
2. SQL Server Database Project
3. SQL files: Stored procedures, scripts, functions
4. SQL Server Reporting Services reports

Do you organize your sql files with your database project in TFS?

Do you organize your sql files with your reports project in TFS?

Or do you organize you sql files with your ASP.NET C# project (considering those sql files are only called from that ASP.NET C# project)?

Thanks for any opinions...
0
Comment
Question by:michael1174
6 Comments
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 38408433
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1000 total points
ID: 38411206
We use the following structure in TFS:

Common
      Source Code
           OracleDataAccess
           DocumentGeneration
      Binaries
           iTextSharp
           log4net

Solution #1
     Development
         Sandbox
     Main
         Shared Source
             DocumentGeneration
         Shared Binaries
             log4net
         Source
     Release
          Production
             v1.0.10.0
     
Solution #2
     Development
         NewMenu
     Main
         Shared Source
             OracleDataAccess
         Shared Binaries
             iTextSharp
         Source
     Release
          Production
              v2.9.0.0
     
All shared projects are under the Common, and then branched out to each Solution, under the Main\Shared Source folder.  

When a solution is deployed, branch to the Release folder, under the matching environment (UAT, Production, etc.).  Always keep the Main trunk functional.  If you need to experiment, branch to Development.  

Since assembly references are relative to the solution path, having references point to Shared Binaries, rather than the Common folder, makes it easier to branch.  Also, you create a separation between the source and the target.  This means that you need to spend more time managing merging and branching, but it's worth it in my opinion.
0
 
LVL 23

Assisted Solution

by:Mohamed Osama
Mohamed Osama earned 1000 total points
ID: 38421788
Let's see

- Do you organize your sql files with your database project in TFS?
YES, DB Projects contain all DB related content , scripts,models, artifacts,documentation,etc..


- Do you organize your sql files with your reports project in TFS?

Not currently  , but it can be done if needed

what the learned one described above is an environment very similar to ours

 Main Code branch that branches to DEV, UAT or QA , and Production which is the final release source that gets tested and Approved by QA testers.

we do have a common Folder for 3rd party libraries and shared code also.

your main question's answer  is relative, where you store the SQL files depends on the nature of your Projects, and is pretty much your own decision.

in some organizations the .SQL scripts have their own section in the repository , and in others, SQL files are stored alongside other projects depending on Certain releases , builds, labels, or tasks for example.
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 2

Author Comment

by:michael1174
ID: 38421839
In storing sql files in with the db vs. a visual studio project, what happens if you want to rebuild the db from all your source control files? You would need to hunt for all  those files scattered in all different projects to build the db accurately.

If you keep the sql files with the db project, you wont have that problem.

I guess I'm looking for pro's & con's, but as you mention, it may be preference.

Another example would be, what happens if you need rename a column in your database or change its datatype.  If you stored your sql scripts with projects you would need to then search for all scripts/sp's that use that field in the projects, whereas if you keep the sql files with the db, they are all in 1 easy to find project.

I'm looking for other scenario's, like these if possible.

Thanks...
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 38421877
When I was using SQL Server Database Projects, those would go in a top-level folder, since they really don't need to be in a project-specific folder, buried somewhere deep in the hierarchy (as you described).  You are right, that there are a lot of script files generated for a database, and being able to find those easily is usually paramount in our jobs.

Do you generate test data, and use database unit tests?  Those usually need to go with the project, but that would be personal preference.
0
 
LVL 2

Author Closing Comment

by:michael1174
ID: 38428455
Thanks for the opinions...
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

850 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