14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• The files that most often are modified simultaneously by multiple developers are<br />

XML files, which by its structured nature are very well suited for automatic<br />

merging by version control systems. It is our experience that a version control<br />

system like SubVersion is also very good at merging Java files, the other most<br />

used type of file in this development environment.<br />

• When generating your application using <strong>JHeadstart</strong>, many files are modified<br />

during a generation run. When using the file locking approach, you need to<br />

know upfront which files will be modified by the <strong>JHeadstart</strong> Application<br />

Generator: all these files need to be checked out prior to generation, otherwise<br />

they remain read only and will not be modified by <strong>JHeadstart</strong>. It requires in<br />

depth knowledge of <strong>JHeadstart</strong> and ADF to be able to correctly “predict” which<br />

files will be modified in a specific generation run. With the version merging<br />

approach this is not an issue, once you have finished a development task, the<br />

version control system will tell you which files have been modified and need to<br />

be committed to the version control repository.<br />

2.1.2. Requirements for a GoodVersion Control System<br />

When selecting a version control system, make sure the system provides functionality to<br />

address the following requirements<br />

• It supports the Version Merging model (see previous section).<br />

• It provides a so-called Atomic Commit. With this we mean that when you have<br />

modified a number of files that you want to commit to the version control<br />

repository, you want either the entire transaction to be committed, or the entire<br />

transaction to be rolled backed when a version conflict is detected which cannot<br />

be solved by an automatic merge. In other words, either all files are committed<br />

succesfully, or none of the files are committed. A version control system like CVS<br />

does not support an atomic commit. This means that some files might be<br />

committed to the repository, and then a version conflict is detected and the rest<br />

of the files cannot be committed. When this happens, you end up with an<br />

inconsistent situation in your version control repository since there are many<br />

interdependencies between files in an ADF environment. Obviously, when other<br />

developers update their local copies with this inconsistent set of files, they are<br />

likely to run into all sorts of problems and error messages.<br />

• It detects file changes by comparing file content rather than the timestamp of the<br />

file. This requirement is particularly important when using <strong>JHeadstart</strong>: when<br />

you regenerate your application using the <strong>JHeadstart</strong> Application Generator, the<br />

content of many files might remain the same, although the file is recreated with a<br />

new timestamp. When you commit your work after you completed a<br />

development task, you do not want a new version of all these unmodified files to<br />

be committed to the repository. Otherwise, it will be really hard to find back<br />

versions that contained a real change, being a version you might want to revert<br />

to when you want to undo some work.<br />

• An efficient and easy to use user interface to perform common versioning tasks.<br />

Developers should spend as little time as possible with version control tasks. An<br />

intuitive user interface for common tasks like updating their local copy,<br />

commiting changes, reverting to previous versions, resolving merge conflicts,<br />

and creating application releases is essential to meet this requirement. Ideally,<br />

the versioning user interface is integrated with JDeveloper, although in our<br />

experience it is not a big deal to switch with Alt-Tab to a stand-alone GUI for<br />

versioning when JDeveloper integration is not available, or less feature-rich.<br />

<strong>JHeadstart</strong> <strong>Developer's</strong> <strong>Guide</strong> Getting Started 2 - 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!