Managing your Project Files: Using Subversion

JDeveloper ADF projects, so also JHeadstart projects, tend to create many files. A good version
control system is absolutely essential. In our experience, Subversion is a great tool for managing your file versions, and it's free!

Multiple developers can simultaneously work on the same file, it is fast, it has excellent merging capabilities, and it's easy to find the change history of every file. Also, you can create branches and releases, and easily switch your working copy to one of them. And last but not least, text-based files (like .xml and .java) are not marked as changed if only the time stamp has changed and not the contents.

TortoiseSVN Commit dialog:

As shown in the example above, when you have made changes, Subversion can give you an overview of the files that changed, and for each file show you in which lines they differ. It is useful for example when upgrading to a newer JHeadstart version, to see which changes were made in the generator templates, so you can copy it to your custom templates.

TortoiseSVN Merge:

Subversion is similar to CVS, but without the drawbacks. In 2002, Ben Collins-Sussman wrote an article about the (then new) Subversion project, also explaining which Subversion features make it an improvement on CVS.

If you are new to this type of revision control system, here is a short explanation. For a more detailed explanation see the free online book Version Control with Subversion (the image below is from that book). The main parts of Subversion are:

  1. Repository. The repository stores all revisions of the files under version control, and labels them with revision numbers and revision comments. Install it on a server accessible to all developers.
  2. Client. One or more clients can connect to the repository, and download the files of a certain revision to your personal development environment, or upload and commit changed files.
Subversion Repository and Clients

JDeveloper Subversion Client
In JDeveloper 10.1.3 you can install a Subversion extension (plug-in), which will act as a client. More information can be found in the Developer's Guide for the JDeveloper Subversion VCS extension on OTN. Note that it will use the Subversion 1.3 format for the client-side, see also Aino Andriessen's blog entry about this.

Windows-integrated Subversion Client
Personally, I prefer to use TortoiseSVN as a client tool. The images below are from that site. It is implemented as a windows
shell extension, and it's fast and easy to use. Every client action that you might want to do with the Subversion command line tool, you can do easier with TortoiseSVN.

What I like best about TortoiseSVN is the icon overlays. In Windows Explorer, you can immediately see which files are changed, which have conflicts, etc.

TortoiseSVN Icon Overlays

In addition, you get context-sensitive context menus for each file. For a versioned file, for example, it might look like this:

TortoiseSVN Context Menu

In summary, it's a best practice to use Subversion for managing the files of your JHeadstart projects. Check out the Subversion site and the book, get someone to install it on your development server, and install TortoiseSVN on every developer PC. Commit all project files to the repository, and let everyone checkout to their local working copy.
From that moment on, if developers change files, let them commit, so that the others can update their working copies. That's all you need to get started!

Update: see also the JHeadstart Blog post "Version Control for ADF-JHeadstart Applications", which discusses
  • Version control models
  • Requirements for a good version control system
  • Which files to version?
.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Java EE Consultants - JHeadstart, ADF, JSF

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today