v Simplify your externaldependency management
Simplify your ext. dependency management About me  Stephan Hochdörfer, bitExpert AG  Department Manager Research Labs  ...
Simplify your ext. dependency management Dependencies?
Simplify your ext. dependency management Dependencies? internal                                   external Dependencies   ...
Simplify your ext. dependency management Dependencies?                                            external                ...
Simplify your ext. dependency management Our first project....
Simplify your ext. dependency management Our first project....                             +
Simplify your ext. dependency management Our first project – the structure yourpoject    |-application    |-library    |--...
Simplify your ext. dependency management Maintenance nightmare!
Simplify your ext. dependency management Version control, anyone?
Simplify your ext. dependency management Subversion – svn:externals
Simplify your ext. dependency management Git - Submodules
Simplify your ext. dependency management Git - Subtree
Simplify your ext. dependency management Recap          No overview of dependency                 configuration
Simplify your ext. dependency management Recap    Externals must be of the same type             as the repository!
Simplify your ext. dependency management Recap     Commiting to Externals is possible!
Simplify your ext. dependency management Insight              You cannot control           dependencies with a VCS!
Simplify your ext. dependency management Insight             A VCS is not made for           dependency management!
Simplify your ext. dependency management Requirements first!
Simplify your ext. dependency management Do not hide dependency metadata!
Simplify your ext. dependency management Transitive dependencies
Simplify your ext. dependency management Do not reinvent the wheel                               v
Simplify your ext. dependency management Separation from VCS
Simplify your ext. dependency management Mind change: Build process needed!
Simplify your ext. dependency management Step 1: Building the build
Simplify your ext. dependency management Step 2: Package the software
Simplify your ext. dependency management Step 3: Deliver the software
Simplify your ext. dependency management Build automation
Simplify your ext. dependency management Build automation
Simplify your ext. dependency management Build automation with Phing <?xml version="1.0" encoding="UTF-8"?> <project name=...
Simplify your ext. dependency management Build automation with pear
Simplify your ext. dependency management Build automation with pear pantr    pantr = project-based PEAR installer
Simplify your ext. dependency management Build automation with pantr                1. pantr pear:init lib
Simplify your ext. dependency management Build automation with pantr        2. pantr pear:channel-discover              pe...
Simplify your ext. dependency management Build automation with pantr        3. pantr pear:install pgs/parser
Simplify your ext. dependency management Packaging
Simplify your ext. dependency management *nix packages – 4 steps to enlightenment
Simplify your ext. dependency management *nix packages – 4 steps to enlightenment    1. Create directory yourproject-0.0.1
Simplify your ext. dependency management *nix packages – 4 steps to enlightenment            2. dh_make –createorig -s
Simplify your ext. dependency management *nix packages – 4 steps to enlightenment                  3. Add a Makefile
Simplify your ext. dependency management *nix packages – 4 steps to enlightenment      BINDIR = $(DESTDIR)/usr/bin      cl...
Simplify your ext. dependency management *nix packages – 4 steps to enlightenment        4. fakeroot debian/rules binary
Simplify your ext. dependency management *nix packages – Dependencies?
Simplify your ext. dependency management *nix packages – Dependencies?        Add them to debian/control file
Simplify your ext. dependency management *nix packages – Dependencies? Source: yourproject Section: unknown Priority: extr...
Simplify your ext. dependency management PEAR package – 3 steps to enlightenment
Simplify your ext. dependency management PEAR package – 3 steps to enlightenment    1. Create directory yourproject-0.0.1
Simplify your ext. dependency management PEAR package – 3 steps to enlightenment              2. Create package.xml
Simplify your ext. dependency management PEAR package – 3 steps to enlightenment <?xml version="1.0" encoding="UTF-8"?> <p...
Simplify your ext. dependency management PEAR package – 3 steps to enlightenment <dependencies>  <required>   <php>    <mi...
Simplify your ext. dependency management PEAR package – 3 steps to enlightenment                   3. pear package
Simplify your ext. dependency management How to deliver the packages?
Simplify your ext. dependency management How to deliver the packages?        *nix repository vs. PEAR server
Simplify your ext. dependency management How to deliver the packages?         pearhub, pearfarm, openPear
Simplify your ext. dependency management How to deliver the packages?               PEAR Proxy needed?
Simplify your ext. dependency management Missing the glue!
Simplify your ext. dependency management Java anyone?
Simplify your ext. dependency management Maven – a project management tool
Simplify your ext. dependency management Maven               Goal: Standardization
Simplify your ext. dependency management Maven Lifecycle                       archetype
Simplify your ext. dependency management Maven Lifecycle                       archetype                                  ...
Simplify your ext. dependency management Maven Lifecycle                       archetype                                  ...
Simplify your ext. dependency management Maven Lifecycle                       archetype                                  ...
Simplify your ext. dependency management Maven Lifecycle                       archetype                                  ...
Simplify your ext. dependency management Maven Lifecycle                       archetype                                  ...
Simplify your ext. dependency management Maven Lifecycle                       archetype                                  ...
Simplify your ext. dependency management Maven Lifecycle                         archetype                                ...
Simplify your ext. dependency management Maven Lifecycle                           archetype                 deploy       ...
Simplify your ext. dependency management Maven - Project Object Model <project xmlns="http://maven.apache.org/POM/4.0.0" x...
Simplify your ext. dependency management Maven - Dependencies <dependencies>    <dependency>       <groupId>com.zend</grou...
Simplify your ext. dependency management Maven Beginners guide                   Maven for PHP?
Simplify your ext. dependency management Maven Beginners guide          1. Download & install Maven
Simplify your ext. dependency management Maven Beginners guide           2. Edit settings.xml to add            PHP for Ma...
Simplify your ext. dependency management Maven Beginners guide <pluginRepository>    <id>release-repo1.php-maven.org</id> ...
Simplify your ext. dependency management Maven Beginners guide         3. Create new Maven project
Simplify your ext. dependency management Maven Beginners guide          mvn archetype:generate           -DarchetypeGroupI...
Simplify your ext. dependency management Maven Beginners guide              2. Deploy your project
Simplify your ext. dependency management Maven Beginners guide                    mvn deploy
Simplify your ext. dependency management Maven Bonus points                Can act as a proxy!
Simplify your ext. dependency management Maven Bonus points           Plugins, Plugins, Plugins,...
Simplify your ext. dependency management Maven Bonus points       Automatic release management
Simplify your ext. dependency management Maven Bonus points              Automatic deployment
Simplify your ext. dependency management Maven Bonus points                     Build profiles
Simplify your ext. dependency management Maven Bonus points            IDE support, e.g. Eclipse,                  Netbean...
http://joind.in/3232
Simplify your ext. dependency management Image Credits http://www.sxc.hu/photo/1092493 http://www.sxc.hu/photo/910278 http...
Upcoming SlideShare
Loading in...5
×

Simplify your external dependency management - DPC11

9,804

Published on

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
9,804
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
39
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Simplify your external dependency management - DPC11

  1. 1. v Simplify your externaldependency management
  2. 2. Simplify your ext. dependency management About me  Stephan Hochdörfer, bitExpert AG  Department Manager Research Labs  enjoying PHP since 1999  S.Hochdoerfer@bitExpert.de  @shochdoerfer
  3. 3. Simplify your ext. dependency management Dependencies?
  4. 4. Simplify your ext. dependency management Dependencies? internal external Dependencies Dependencies
  5. 5. Simplify your ext. dependency management Dependencies? external Dependencies Extensions Systemtools Frameworks Libs
  6. 6. Simplify your ext. dependency management Our first project....
  7. 7. Simplify your ext. dependency management Our first project.... +
  8. 8. Simplify your ext. dependency management Our first project – the structure yourpoject |-application |-library |---Facebook |---Zend |-public |---js |---css |-tests
  9. 9. Simplify your ext. dependency management Maintenance nightmare!
  10. 10. Simplify your ext. dependency management Version control, anyone?
  11. 11. Simplify your ext. dependency management Subversion – svn:externals
  12. 12. Simplify your ext. dependency management Git - Submodules
  13. 13. Simplify your ext. dependency management Git - Subtree
  14. 14. Simplify your ext. dependency management Recap No overview of dependency configuration
  15. 15. Simplify your ext. dependency management Recap Externals must be of the same type as the repository!
  16. 16. Simplify your ext. dependency management Recap Commiting to Externals is possible!
  17. 17. Simplify your ext. dependency management Insight You cannot control dependencies with a VCS!
  18. 18. Simplify your ext. dependency management Insight A VCS is not made for dependency management!
  19. 19. Simplify your ext. dependency management Requirements first!
  20. 20. Simplify your ext. dependency management Do not hide dependency metadata!
  21. 21. Simplify your ext. dependency management Transitive dependencies
  22. 22. Simplify your ext. dependency management Do not reinvent the wheel v
  23. 23. Simplify your ext. dependency management Separation from VCS
  24. 24. Simplify your ext. dependency management Mind change: Build process needed!
  25. 25. Simplify your ext. dependency management Step 1: Building the build
  26. 26. Simplify your ext. dependency management Step 2: Package the software
  27. 27. Simplify your ext. dependency management Step 3: Deliver the software
  28. 28. Simplify your ext. dependency management Build automation
  29. 29. Simplify your ext. dependency management Build automation
  30. 30. Simplify your ext. dependency management Build automation with Phing <?xml version="1.0" encoding="UTF-8"?> <project name="MyProject" default="build"> <target name="prepare"> <echo msg="Creating dir ./build" /> <mkdir dir="./build" /> </target> <target name="build" depends="prepare"> <echo msg="Copying files..." /> <copy file="./info.php" tofile="./build/info.php" /> </target> </project>
  31. 31. Simplify your ext. dependency management Build automation with pear
  32. 32. Simplify your ext. dependency management Build automation with pear pantr pantr = project-based PEAR installer
  33. 33. Simplify your ext. dependency management Build automation with pantr 1. pantr pear:init lib
  34. 34. Simplify your ext. dependency management Build automation with pantr 2. pantr pear:channel-discover pear.pagosoft.com
  35. 35. Simplify your ext. dependency management Build automation with pantr 3. pantr pear:install pgs/parser
  36. 36. Simplify your ext. dependency management Packaging
  37. 37. Simplify your ext. dependency management *nix packages – 4 steps to enlightenment
  38. 38. Simplify your ext. dependency management *nix packages – 4 steps to enlightenment 1. Create directory yourproject-0.0.1
  39. 39. Simplify your ext. dependency management *nix packages – 4 steps to enlightenment 2. dh_make –createorig -s
  40. 40. Simplify your ext. dependency management *nix packages – 4 steps to enlightenment 3. Add a Makefile
  41. 41. Simplify your ext. dependency management *nix packages – 4 steps to enlightenment BINDIR = $(DESTDIR)/usr/bin clean: install: mkdir -p $(BINDIR) cp info.php $(BINDIR) uninstall: rm -f $(BINDIR)/info.php
  42. 42. Simplify your ext. dependency management *nix packages – 4 steps to enlightenment 4. fakeroot debian/rules binary
  43. 43. Simplify your ext. dependency management *nix packages – Dependencies?
  44. 44. Simplify your ext. dependency management *nix packages – Dependencies? Add them to debian/control file
  45. 45. Simplify your ext. dependency management *nix packages – Dependencies? Source: yourproject Section: unknown Priority: extra Maintainer: Stephan Hochdoerfer Build-Depends: debhelper (>= 7.0.50~) Standards-Version: 3.8.4 Package: yourproject Architecture: any Depends: php5-cgi php5-mysql Description: yourproject short description long description...
  46. 46. Simplify your ext. dependency management PEAR package – 3 steps to enlightenment
  47. 47. Simplify your ext. dependency management PEAR package – 3 steps to enlightenment 1. Create directory yourproject-0.0.1
  48. 48. Simplify your ext. dependency management PEAR package – 3 steps to enlightenment 2. Create package.xml
  49. 49. Simplify your ext. dependency management PEAR package – 3 steps to enlightenment <?xml version="1.0" encoding="UTF-8"?> <package packagerversion="1.8.0" version="2.0"> <name>Yourapp</name> <channel>pear.yourapp.com</channel> <summary>Yourapp summary</summary> <description>Yourapp description.</description> <lead> <name>Stephan Hochdoerfer</name> <user>sh</user> <email>S.Hochdoerfer@bitExpert.de</email> <active>yes</active> </lead> <date>2009-10-18</date> <time>16:00:00</time> <version> <release>0.9.0</release>
  50. 50. Simplify your ext. dependency management PEAR package – 3 steps to enlightenment <dependencies> <required> <php> <min>5.0.0</min> </php> <pearinstaller> <min>1.4.0</min> </pearinstaller> </required> </dependencies> <phprelease /></package>
  51. 51. Simplify your ext. dependency management PEAR package – 3 steps to enlightenment 3. pear package
  52. 52. Simplify your ext. dependency management How to deliver the packages?
  53. 53. Simplify your ext. dependency management How to deliver the packages? *nix repository vs. PEAR server
  54. 54. Simplify your ext. dependency management How to deliver the packages? pearhub, pearfarm, openPear
  55. 55. Simplify your ext. dependency management How to deliver the packages? PEAR Proxy needed?
  56. 56. Simplify your ext. dependency management Missing the glue!
  57. 57. Simplify your ext. dependency management Java anyone?
  58. 58. Simplify your ext. dependency management Maven – a project management tool
  59. 59. Simplify your ext. dependency management Maven Goal: Standardization
  60. 60. Simplify your ext. dependency management Maven Lifecycle archetype
  61. 61. Simplify your ext. dependency management Maven Lifecycle archetype validate
  62. 62. Simplify your ext. dependency management Maven Lifecycle archetype validate compile
  63. 63. Simplify your ext. dependency management Maven Lifecycle archetype validate compile test
  64. 64. Simplify your ext. dependency management Maven Lifecycle archetype validate compile test package
  65. 65. Simplify your ext. dependency management Maven Lifecycle archetype validate compile test integration-test package
  66. 66. Simplify your ext. dependency management Maven Lifecycle archetype validate compile verify test integration-test package
  67. 67. Simplify your ext. dependency management Maven Lifecycle archetype validate install compile verify test integration-test package
  68. 68. Simplify your ext. dependency management Maven Lifecycle archetype deploy validate install compile verify test integration-test package
  69. 69. Simplify your ext. dependency management Maven - Project Object Model <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <groupId>com.acme</groupId> <artifactId>myproject</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version> <name>My project</name> </project>
  70. 70. Simplify your ext. dependency management Maven - Dependencies <dependencies> <dependency> <groupId>com.zend</groupId> <artifactId>framework</artifactId> <version>1.11.6-SNAPSHOT</version> <type>jar</type> <scope>compile</scope> </dependency> </dependencies>
  71. 71. Simplify your ext. dependency management Maven Beginners guide Maven for PHP?
  72. 72. Simplify your ext. dependency management Maven Beginners guide 1. Download & install Maven
  73. 73. Simplify your ext. dependency management Maven Beginners guide 2. Edit settings.xml to add PHP for Maven repository
  74. 74. Simplify your ext. dependency management Maven Beginners guide <pluginRepository> <id>release-repo1.php-maven.org</id> <name>PHP-Maven 2 Release Repository</name> <url>http://repo1.php-maven.org/release</url> <releases> <enabled>true</enabled> </releases> </pluginRepository>
  75. 75. Simplify your ext. dependency management Maven Beginners guide 3. Create new Maven project
  76. 76. Simplify your ext. dependency management Maven Beginners guide mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-lib-archetype -DarchetypeVersion=1.1 -DgroupId=org.yourproject -DartifactId=appname
  77. 77. Simplify your ext. dependency management Maven Beginners guide 2. Deploy your project
  78. 78. Simplify your ext. dependency management Maven Beginners guide mvn deploy
  79. 79. Simplify your ext. dependency management Maven Bonus points Can act as a proxy!
  80. 80. Simplify your ext. dependency management Maven Bonus points Plugins, Plugins, Plugins,...
  81. 81. Simplify your ext. dependency management Maven Bonus points Automatic release management
  82. 82. Simplify your ext. dependency management Maven Bonus points Automatic deployment
  83. 83. Simplify your ext. dependency management Maven Bonus points Build profiles
  84. 84. Simplify your ext. dependency management Maven Bonus points IDE support, e.g. Eclipse, Netbeans,...
  85. 85. http://joind.in/3232
  86. 86. Simplify your ext. dependency management Image Credits http://www.sxc.hu/photo/1092493 http://www.sxc.hu/photo/910278 http://www.sxc.hu/photo/766748
  1. A particular slide catching your eye?

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

×