Upload
brilliant
View
48
Download
2
Embed Size (px)
DESCRIPTION
Deel III: Paradigma’s Software Ontwikkeling 1. Concurrent Versions System (CVS). Prof.Dr.Ir. Filip De Turck. Structuur Deel III. Concurrent Versions System (CVS) Make-bestanden versus Ant Recente talen en gedistribueerde applicaties: Ruby Web services Ontwerp van Telecom-diensten - PowerPoint PPT Presentation
Citation preview
Vakgroep Informatietechnologie
Deel III: Paradigma’s Software Ontwikkeling
1. Concurrent Versions System (CVS)
Prof.Dr.Ir. Filip De Turck
Software Ontwikkeling I
Structuur Deel III
Concurrent Versions System (CVS) Make-bestanden versus Ant Recente talen en gedistribueerde
applicaties: Ruby Web services
Ontwerp van Telecom-diensten Video-conferentie applicaties Software voor mobiele toestellen Andere voorbeelden
Software Ontwikkeling I
Outline
CVS - Concurrent Versions System What’s CVS Proper usage Tagging, branching, merging Sample File Header CVS implementation and alternatives
Software Ontwikkeling I
CVS - What’s CVS
CVS … … is a server system, that stores files in a general
place … allows several people to access these files, and
elaborate them at the same time … keeps “track changes” you’ve made to the file … allows to see the differences through time
CVS often is misused … … as a simple backup system … without a proper structure
Software Ontwikkeling I
CVS - What’s CVS - checkout
The server contains the data All data are called “the repository”
You get the files by checking out a copy from the server to your local PC
Everybody can access the data If you don’t care, everybody can
access You can create a list of “only-allowed”
CVS Server
Another desktopYour desktop
checkout
Operating Systems: Linux, Windows, FreeBSD, Mac OS X
License: GNU General Public License
Software Ontwikkeling I
CVS - What’s CVS - modules
When checking out, you get a “module” A module is a grouping of data A module contains files, directories, …
Software Ontwikkeling I
CVS - What’s CVS – commit
Checkout and commit After checking out a module, you can locally edit
your files After editing, your local copy differs
from the one on the server You synchronize your local copy
with the server by committing your changes
CVS Server
Your desktop
commit
Local
edit
Software Ontwikkeling I
CVS - What’s CVS – diff
Only a diff is stored When committing a new file, the old file is not
simply overwritten. A diff is made with the previous file, and this is
stored. Your file gets a new version number,
a log message is attached. The log contains a brief description
of the changes you’ve made Yes, you have to do this yourself
CVS Server
1.2
1.1
Foo.c
Log Msg
Software Ontwikkeling I
CVS - What’s CVS – diff (2)
Since a diff is stored… the server contains all versions you can browse through the history and changes
Software Ontwikkeling I
CVS - What’s CVS – first checkout
After a commit Your PC contains the latest version The repository contains all version,
including the last Another user still has the previous
version He needs to update before he starts
working
Always first checkout / update before you start working on a module
Another desktopYour desktop
CVS Server
update
Software Ontwikkeling I
Several people can work at the same time on different files:
I’m working on file A You’re working on file B We both commit Every one checks out again,
and has the most recent versions– Always update first!
on the same file: When both working on a
different section, it’s merged When there’s a conflict
it’s reported
commit commitupdateupdate
CVS - What’s CVS – different people
Your desktop
CVS Server
Another desktop
Software Ontwikkeling I
CVS - Proper usage – do’s
Do’s Working on an existing module:
Check out before working on files Commit after you’ve finished Add a comment, indicating your changes
Creating a new module / new file: Plan your directory structure:
– setup notes don’t belong in between software– a separate directory for figures might be handy
Think of a proper name– E.g. practicum.tex doesn’t say a lot
A new module is normally only committed, once a “stable version” is created
Software Ontwikkeling I
CVS - Proper usage – don’ts
Don’ts Don’t commit changes without a Message Log.
Even “typo fixed” is valid
CVS is designed for text based files, not for binaries:
Don’t commit the compiled versions of source code Don’t commit the pdf’d version of a tex file Don’t commit every tiny change of a jpeg file
Don’t put everything in one directory, and afterwards try to sort it out:
Moving a file or a directory isn’t possible Removing files actually doesn’t happen
Software Ontwikkeling I
CVS - Proper usage – don’ts in practice
Geen log message !
Software Ontwikkeling I
CVS - Proper usage – don’ts in practice
Geen structuur !
Software Ontwikkeling I
Outline
CVS - Concurrent Versions System What’s CVS Proper usage Tagging, branching, merging Sample File Header CVS implementations and alternatives
Software Ontwikkeling I
CVS - Tagging
After working for a while… Some files needed a lot of changes, others didn’t Each file has different revisions, e.g. 5
+-----+ +-----+ +-----+ +-----+ +-----+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !+-----+ +-----+ +-----+ +-----+ +-----+
At a certain moment, you can put a tag on your current version
E.g. rel-1-1 E.g. version2006
The revision numbers don’t change, you add an extra label as a human understandable reference
Software Ontwikkeling I
file1 file2 file3 file4 file5
1.1 1.2 1.1 1.3 _1.1 1.2 1.4 1.1 /1.2*----1.3*----1.5*----1.2*----1.1* (--- <--- Look here1.3 1.6 1.3 \_1.4 1.4 1.5
CVS - Tagging
A bunch of files for example After tagging, some files are further developed You can now easily get back to the different
revisions of that moment by “pulling the tag”
file1 file2 file3 file4 file5
1.1 1.1 1.1 1.1 /--1.1* <-*- TAG1.2*- 1.2 1.2 -1.2*-1.3 \- 1.3*- 1.3 / 1.31.4 \ 1.4 / 1.4 \-1.5*- 1.5 1.6
Software Ontwikkeling I
CVS - Branching
Usage You have a huge bug since v1.2, and you need to fix it to
release a patch to people using v1.2 You want to try something out based on 1.2, but leave
version 1.5 alone +-------------+ Branch 1.2.2.3.2 -> ! 1.2.2.3.2.1 ! / +-------------+ / / +---------+ +---------+ +---------+Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! / +---------+ +---------+ +---------+ / /+-----+ +-----+ +-----+ +-----+ +-----+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk+-----+ +-----+ +-----+ +-----+ +-----+ ! ! ! +---------+ +---------+ +---------+Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 ! +---------+ +---------+ +---------+
Software Ontwikkeling I
CVS - Merging
Usage You have a huge bug since v1.2, and you need to fix it to
release a patch to people using v1.2 The bug is still in v1.4, and you want to apply the same
changes– Go back to the trunk– Join the changes of v1.2.2.2 into a new v1.5
+-----+ +-----+ +-----+ +-----+ +-----+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk+-----+ +-----+ +-----+ +-----+ +-----+ ! * ! * ! +---------+ +---------+Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 ! +---------+ +---------+
Software Ontwikkeling I
Outline
CVS - Concurrent Versions System What’s CVS Proper usage Tagging, branching, merging Sample File Header CVS implementations and alternatives
Software Ontwikkeling I
CVS - Sample File Header
/**************************************************
Filename: $Id$
Author: $Author$
Last Changed: $Date$
Log: $Log$
***************************************************/
…
(further contents of file)
…
Software Ontwikkeling I
CVS - Keywords in file header
$Author$ The user name
$Date$ The date and time of the revision was checked in.
$Header$ A standard header containing the full pathname of the file,
the revision number, the date, the author $Id$
Same as Header: but file name doesn't have path. $Name$
Tag name used to check out this file. $Log$
Stores log message. $Revision$
The revision number assigned to the revision
Software Ontwikkeling I
Outline
CVS - Concurrent Versions System What’s CVS Proper usage Tagging, branching, merging Sample File Header CVS implementations and alternatives
Software Ontwikkeling I
CVS - Implementations
Tortoise CVS: a shell-integrated CVS client for Windows
Subversion: an open-source revision control system
DCVS: a distributed revision control system based on
CVS Bonsai CVS code management system:
a tool to reports on files, directories, and branches under CVS management.
Commercial: IBM Rational Clear case, etc.
Vakgroep Informatietechnologie
Deel III: Paradigma’s Software Ontwikkeling
2. Make-bestanden versus Ant
Prof.Dr.Ir. Filip De Turck
Software Ontwikkeling I
Make files
to automate the build process
cfr overview in Minerva folder Extra_Notes/unix_makefiles.pdf
Java alternative: Anthttp://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/ant/ant.pdf
(ook beschikbaar op Minerva : Extra_Notes/ant.pdf)
Software Ontwikkeling I
Maven
Maven is a software tool for Java programming language project management and automated software build.
Similar in functionality to the Apache Ant tool but has a simpler build configuration model, based on an XML format.
Maven is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.
Maven uses a construct known as a Project Object Model (POM) to describe the software project being built, its dependencies on other external modules and components, and the build order.
It comes with pre-defined targets for performing certain well defined tasks such as compilation of code and its packaging.
Support for download plugins on network repositories and upload completed builds
http://maven.apache.org/