0
Version Control                             !=                   Dependency Management                   Patrick van Disse...
NoteThis presentation is focussed on and for PHP projects, but the principal can be applied on   projects in other program...
PHP
Common project structure            Nice separation:            ●   Application            ●   Libraries            ●   Pu...
Common structure in VCS          Single directory structure          Libraries copied in every project;          causing d...
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 re...
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●   Co...
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 PEARexper...
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 present...
Questions?
Upcoming SlideShare
Loading in...5
×

Version Control != Dependency Management

2,814

Published on

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.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,814
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Version Control != Dependency Management"

  1. 1. Version Control != Dependency Management Patrick van Dissel http://ikoodi.nl pvdissel@tricode.nl @pvdisselOctober 29, 2010
  2. 2. NoteThis presentation is focussed on and for PHP projects, but the principal can be applied on projects in other programming language
  3. 3. PHP
  4. 4. Common project structure Nice separation: ● Application ● Libraries ● Public
  5. 5. Common structure in VCS Single directory structure Libraries copied in every project; causing duplication
  6. 6. Subversion (svn)
  7. 7. With Subversion (SVN)Common structure in VCS svn:externals to tags As it should be used
  8. 8. With Subversion (SVN)Common structure in VCS svn:externals to trunk As its often used
  9. 9. Getting externals in SVN
  10. 10. External fetching on SVN checkout
  11. 11. 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
  12. 12. svn:externalsMakes a rudimentary dependency manager from Subversion
  13. 13. How do others handledependency management?
  14. 14. *nix
  15. 15. with Make A solution the *nix way● Compile wont succeed until all required dependencies are available● Configurable to use optional dependencies when available
  16. 16. Java
  17. 17. with MavenA solution the Java way
  18. 18. with MavenA solution the Java way
  19. 19. PHP
  20. 20. Solutions available for PHP a framework and distribution system for reusable PHP components
  21. 21. 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)
  22. 22. Solutions available for PHP PHing Is Not GNU make. A PHP project build system/tool based on Apache Ant
  23. 23. Solutions available for PHP Use a Version Control System likeSubversion to control code versions
  24. 24. Solutions available for PHP Use a build tool like Phing to "build" projects
  25. 25. Solutions available for PHP Use Pear as repository for libraries and applications
  26. 26. Solutions available for PHP Use Pyrus to integrate the Pear repository withPhing for dependency management
  27. 27. So..?
  28. 28. It isnt working yet!!Currently Phing doesnt have a plugin to work with Pyrus (October 29, 2010)
  29. 29. 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
  30. 30. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×