home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / srcsafe.zip / PROJEC.ZIP / PROJECTS.TXT < prev   
Text File  |  1993-11-15  |  11KB  |  187 lines

  1. Version Control the SourceSafe Way
  2.  
  3. SourceSafe by One Tree Software is generally described as a "Project Oriented
  4. Version Control System."
  5.  
  6. The phrase "Version Control System" describes many of the benefits that
  7. SourceSafe shares with other such programs.  It stores and organizes your
  8. source code and other files; it mediates between different developers,
  9. preventing them from overwriting each other's code; it tracks old versions of
  10. your files; and it provides easy access to the latest version of all your
  11. source code.
  12.  
  13. But although it is built around well-established functionality and concepts,
  14. SourceSafe is not a carbon copy of other version control systems.  The phrase
  15. "Project oriented" means that SourceSafe's internal architecture, the way it
  16. stores and organizes data files, is a completely new design that builds
  17. project management into the version control from the ground up.  The most
  18. direct way to understand SourceSafe is therefore to understand its unique
  19. architecture on a technical level first, and then to extrapolate the powerful
  20. benefits which result from that model.
  21.  
  22. ** The SourceSafe Model **
  23.  
  24. A standard version control system (such as the UNIX utility RCS) is file
  25. oriented.  Such a system is essentially a collection of tools that operate on
  26. an individual file, controlling checkouts and updates and tracking old
  27. versions.  To operate on a group of files, you write a batch file or specify
  28. wildcards on the command-line.  Such a system has the advantage of being
  29. simple to implement and understand.  But because it is based on individual
  30. files, it cannot track the relationships between those files: such tracking
  31. is left to the user.
  32.  
  33. SourceSafe follows a different pattern.  In a SourceSafe installation, all
  34. your code files are stored in a centralized database on the network.  This
  35. database is an unintelligible "black box" to the user--but when accessed
  36. through SourceSafe, it is seen to contain all your source files and their
  37. histories, organized into projects.  Each project, like a DOS directory, is a
  38. container for a group of files.  And each project, like a DOS directory, can
  39. be further organized into subprojects, creating a hierarchical tree for
  40. flexible organization.
  41.  
  42. Although the two models are very different, the way you use them is actually
  43. very similar.  With a conventional version control system, you generally
  44. store your code in a directory tree on the network.  A programmer checks out
  45. a file from the network to his hard drive, modifies and compiles there, and
  46. then updates it back to the network.  SourceSafe is used the same way, except
  47. that you define a project tree inside the SourceSafe database instead of a
  48. directory tree on the network.  Working with SourceSafe projects in this way
  49. is exactly like working with directories.  In fact, the entire process is so
  50. easy, and so familiar, that you may begin to wonder where the advantage is. 
  51. Are projects simply directories with a fancy name?
  52.  
  53. In fact, there is one critical difference: because of its centralized
  54. database, SourceSafe knows exactly where all its files are at all times. 
  55. This gives SourceSafe the ability to track relationships on the project and
  56. system level as well as on the individual file level.  This may seem like a
  57. minor point--but in fact, SourceSafe's detailed knowledge of its own projects
  58. brings version control to an entirely new level, useful for any development
  59. and critical to large-scale projects.  The following three examples, moving
  60. from the simple to the highly sophisticated, illustrate how SourceSafe
  61. combines version control with project management to provide truly global
  62. single-point control over your entire development system.
  63.  
  64. ** Preparing for a Build **
  65.  
  66. Suppose you are about to do a complete build of a major system, consisting of
  67. many different programs.  Before you do your build, you want to make sure
  68. nobody is revising the code at the last minute: or, in version control terms,
  69. that no files in the entire system are checked out.
  70.  
  71. A standard version control system provides you with a tool for asking if a
  72. file is checked out.  Your job is to run this utility on every file in every
  73. directory that is being used for the build.  Batch files and wildcards can
  74. make the task easier, but in a complicated system, it can still be quite a
  75. chore.
  76.  
  77. SourceSafe, like other systems, can determine if a file is checked out.  But
  78. it can also provide, as a higher-level report, a list of all the checked-out
  79. files in a project.  This feature becomes even more powerful if you use it
  80. recursively; that is, if you look into all the subprojects under the current
  81. project as well.  SourceSafe looks through every file in every relevant
  82. project, and generates a list of every checked-out file--and immediately, you
  83. know whether you can do the build (or who to talk to if you can't!).  So
  84. simply by executing a simple command on an organized collection of files,
  85. SourceSafe can automate a previously tedious, manual task.
  86.  
  87. ** History of a Project **
  88.  
  89. A "file history" is a common report available in all version control systems
  90. (including SourceSafe).  It lists each version of a file, from the most
  91. recent to the oldest, with information such as what happened to the file, who
  92. did it, when it was done, and what comment was left.
  93.  
  94. But despite their enormous usefulness, file histories have severe
  95. limitations.  For instance, suppose a bug crept into your program last week,
  96. and you need to find the change that caused it.  So you generate a history
  97. report on a likely-looking file, see if it changed recently, and look through
  98. the changes.  If you don't find your bug, you pick another file to
  99. check...and so on.  And you may go through every file in the system this way
  100. and never find the critical change--because the change was actually adding or
  101. deleting a file, which standard version control systems don't track at all!
  102.  
  103. SourceSafe, on the other hand, can generate a history report on the project
  104. itself.  For instance, it might report that file 1 was just modified; before
  105. that, file 2 changed; before that, file 3 was added to the project; before
  106. that, another change was made to file 1; and so on.  SourceSafe is doing the
  107. collating work you would otherwise have to do, enabling you to see what
  108. changed in the past week and when.  This simple feature can save you hours,
  109. freeing you to immediately start hunting for the bug!
  110.  
  111. Another major advantage of project history tracking is that it enables
  112. SourceSafe to rebuild any past version of an entire program.  For instance,
  113. suppose a client has version 2.03 of your program.  That particular moment in
  114. the life of the project may have included version 10 of one file, version 15
  115. of another, and so on; but you don't need to keep track of all that, because
  116. SourceSafe does so automatically.  Ask SourceSafe for 2.03 and it reverses
  117. every change--every file you have updated, added, deleted, or renamed--to
  118. rebuild exactly what was in the project at that time.
  119.  
  120. ** Shared Code **
  121.  
  122. If you write a number of programs around a common base of "core code"; if you
  123. customize one program for different customers' needs; or if you write in an
  124. object-oriented language such as C++; then you know the power of reusable
  125. code.  You can add a feature to one shared module, and immediately get the
  126. benefit in five different programs.  But you also know the organizational
  127. issues: you have to remember what programs are using this file, and propagate
  128. every change to all the necessary places!  When five programs are using one
  129. reusable file, this may be a minor annoyance.  But when twenty programs are
  130. mix-and-match sharing fifty reusable files in different combinations, keeping
  131. track of which programs use which modules can be virtually impossible!
  132.  
  133. A traditional version control system, which tracks only the contents of
  134. individual files, cannot help at all with this task.  But SourceSafe, which
  135. tracks project relationships, can automate it completely with a single,
  136. simple feature: one file can exist simultaneously in many different projects.
  137.  (As an implementation detail: inside SourceSafe's database, each file is
  138. stored only once.  Each project that the file is "in" actually has a pointer
  139. to the file.)
  140.  
  141. To take a common example, suppose you have an error handling module which is
  142. common to many programs.  In SourceSafe, every project that needs those
  143. routines would Share that file.  If you find a bug, you update the file from
  144. any project--and the update is instantly propagated to every project that the
  145. file is in.  Of course, you can always ask SourceSafe for a report of which
  146. projects the file is shared in, so you know which programs to recompile.
  147.  
  148. To take a very different scenario: suppose you have several different
  149. customized versions of the same program.  Essentially, you have many
  150. different programs that share almost all their files between them.  Using
  151. standard tools, tracking this situation can be a nightmare, requiring more
  152. time than the programming itself.  Using SourceSafe, you can quickly and
  153. easily set up each customized program as its own project, indicating which
  154. files it shares with the other versions and which files are unique to this
  155. program.  When you update a file, the change is reflected in all the
  156. appropriate programs, but not in the ones with their own specialized versions
  157. of that file!
  158.  
  159. The bottom line, as always, is that SourceSafe tracks exactly what files are
  160. used where--and can report the usage of any file to you on demand.
  161.  
  162. ** Beyond the Technical Report **
  163.  
  164. This document is technical, specific, and detailed.  It was written for
  165. people who appreciate a well-structured system, who understand a
  166. sophisticated methodology, and who enjoy an elegant solution to a complicated
  167. problem.
  168.  
  169. But to make a decision, you have to take your technical hat off and put your
  170. practical hat on.  You have to ask yourself--now that you understand the
  171. system--what would it do for you?  How would it fit into the way you do
  172. development?  What benefits would it offer you immediately?  In the long run,
  173. how much actual time and trouble could you save with SourceSafe?
  174.  
  175. These are not easy questions, and they can rarely be answered by simply
  176. reading a white paper.  In order to fully evaluate SourceSafe, you may want
  177. to discuss your particular situation with a sales representative at One Tree
  178. Software.  Or you may want to talk to other SourceSafe users, and find out
  179. how the program is used in other real-world environments.  In the end, you
  180. will almost certainly want to try SourceSafe yourself, and experiment to find
  181. what the product has to offer you, and your work, today.
  182.  
  183.  
  184.  
  185.  
  186.  
  187.