Version Control != Dependency Management
Upcoming SlideShare
Loading in...5
×
 

Version Control != Dependency Management

on

  • 2,979 views

Are you using svn:externals, git-submodules or something similar with your Version Control System of choice for connecting third-party libraries to your PHP projects? This presentation explores ways ...

Are you using svn:externals, git-submodules or something similar with your Version Control System of choice for connecting third-party libraries to your PHP projects? This presentation explores ways to handle dependencies in PHP projects, just like projects in other programming languages have done for ages.
See http://ikoodi.nl/2011/01/25/version-control-dependency-management/ for full article.

Statistics

Views

Total Views
2,979
Views on SlideShare
2,979
Embed Views
0

Actions

Likes
0
Downloads
12
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Version Control != Dependency Management Version Control != Dependency Management Presentation Transcript

  • Version Control != Dependency Management Patrick van Dissel http://ikoodi.nl pvdissel@tricode.nl @pvdisselOctober 29, 2010
  • NoteThis presentation is focussed on and for PHP projects, but the principal can be applied on projects in other programming language
  • PHP
  • Common project structure Nice separation: ● Application ● Libraries ● Public
  • Common structure in VCS Single directory structure Libraries copied in every project; causing duplication
  • Subversion (svn)
  • With Subversion (SVN)Common structure in VCS svn:externals to tags As it should be used
  • With Subversion (SVN)Common structure in VCS svn:externals to trunk As its often used
  • Getting externals in SVN
  • External fetching on SVN checkout
  • svn:externalsPros:● svn:externals fixes duplicationCons:● Externals are hidden in SVN metadata● Externals are NOT read-only(!)● Externals can ONLY point to a SVN repository● Makes branching/tagging harder
  • svn:externalsMakes a rudimentary dependency manager from Subversion
  • How do others handledependency management?
  • *nix
  • with Make A solution the *nix way● Compile wont succeed until all required dependencies are available● Configurable to use optional dependencies when available
  • Java
  • with MavenA solution the Java way
  • with MavenA solution the Java way
  • PHP
  • Solutions available for PHP a framework and distribution system for reusable PHP components
  • Solutions available for PHPPyrus (PHP5.3.1+) is a tool to manage PEARpackages. Pyrus simplifies and improves the PEARexperience. Features include:● Standalone tool (pyrus.phar)● Can be integrated into application● Pear repository management/connection● Dependency Management● Packaging in the PHAR format (PHp Archive)
  • Solutions available for PHP PHing Is Not GNU make. A PHP project build system/tool based on Apache Ant
  • Solutions available for PHP Use a Version Control System likeSubversion to control code versions
  • Solutions available for PHP Use a build tool like Phing to "build" projects
  • Solutions available for PHP Use Pear as repository for libraries and applications
  • Solutions available for PHP Use Pyrus to integrate the Pear repository withPhing for dependency management
  • So..?
  • It isnt working yet!!Currently Phing doesnt have a plugin to work with Pyrus (October 29, 2010)
  • Resources● Phing - www.phing.info● Pear - http://pear.php.net● Pear2 / Pyrus - http://pear2.php.net Pyrus presentation: http://slidesha.re/cIAcgp● Extending Phing - http://phing.info/docs/guide/stable/chapters/ExtendingPhing.html● Phar - http://php.net/phar● Pake - http://pake-project.com● Make - http://en.wikipedia.org/wiki/Make_(software)● Apache Maven - http://maven.apache.org● Apache Ant - http://ant.apache.org● Apache Ivy - http://ant.apache.org/ivy
  • Questions?