SlideShare a Scribd company logo
Ant vs Phing
parola chiave automatizzare
Ego slide
          • Manuel “Kea” Baldassarri
          • Senior Developer in Ideato
          • PHP developer dal 1992
          • Marito e Padre
          • mb@ideato.it
 
 twitter: k3a
          • flickr: kea42

 
 slideshare: kea42
http://phpday.it                                 #phpday   @k3a
Automate




http://phpday.it              #phpday   @k3a
?
                   Te   sto




http://phpday.it              #phpday   @k3a
Build automation
                       software
     http://en.wikipedia.org/wiki/List_of_build_automation_software




http://phpday.it                                           #phpday    @k3a
GNU make




http://phpday.it              #phpday   @k3a
Ant
    • Ant is kind of GNU make
    • Ant is a Java library and command-line tool
    • Ant is Open Source, maintained by Apache
    • Ant is cross platform and portable
    • Ant is well suited to a large number of
        automation and scripting tasks

http://phpday.it                         #phpday   @k3a
Phing


          • PHing Is Not GNU make
          • It's a PHP project build system or
              build tool based on Apache Ant



http://phpday.it                               #phpday   @k3a
Installation Ant

          • Apt-get o Yum
          • Donwload binary file and setup the env
          • SVN + Build

          • Requires JRE 1.4
http://phpday.it                              #phpday   @k3a
Installation Phing

          • PEAR
          • Donwload binary file and setup the env
          • SVN

          • Requires PHP 5.2
http://phpday.it                              #phpday   @k3a
http://phpday.it   #phpday   @k3a
Phing and Jenkins




http://phpday.it                   #phpday   @k3a
Ant and Jenkins




http://phpday.it                     #phpday   @k3a
http://phpday.it   #phpday   @k3a
Ant         Phing

                    Netbeans      Plugin        No

                     Eclipse                 Plugin wip
                                 Built-in*
                   Zend Studio               Run cmd

                    Textmate     Bundle**    Bundle**


                    phpStorm       No        Built-in***


                    Komodo       Run cmd     Run cmd

http://phpday.it                                     #phpday   @k3a
How they work


          • XML configuration file
          • Project, Target, Task, Property, Type

http://phpday.it                              #phpday   @k3a
http://phpday.it   #phpday   @k3a
project

    <?xml version="1.0" ?>
    <project name="TestProject"
             basedir="."
             default="main">

        <!-- Everything else goes here -->

    </project>




http://phpday.it                             #phpday   @k3a
target

    <target name="main">

        <!-- everything else goes here -->

    </target>




http://phpday.it                             #phpday   @k3a
target

    <target name="t1">...</target>

    <target name="t2">...</target>

    <target name="main" depends="t1,t2">
    ...
    </target>




http://phpday.it                           #phpday   @k3a
target
    <target name="t1" depends="t3">...</target>

    <target name="t2" depends="t3">...</target>

    <target name="t3">...</target>

    <target name="t4" depends="t1,t2">
    ...
    </target>




http://phpday.it                          #phpday   @k3a
Tasks
          • Archive          • Logging
          • Audit/Coverage   • Mail
          • Deployment       • Remote
          • Documentation    • Versioning
          • File             • Testing

http://phpday.it                            #phpday   @k3a
Useful tasks
          • scp
          • ssh (phing), sshexec (ant)
          • ftpdeploy (phing), ftp (ant)
          • tar (gzip, bzip2), zip
          • git*, svn*, cvs

http://phpday.it                           #phpday   @k3a
Useful Phing tasks
          • PHPUnit          • JsLint, JsMin
          • PHPDocumentor    • XMLLint
          • PHPDepend        • PHPLint
          • PHPMD            • Tidy
          • PHPCPD           • S3

http://phpday.it                           #phpday   @k3a
ExecTask
       ANT
       <exec executable="ls">
         <arg value="-l"/>
         <arg value="/tmp"/>
       </exec>

       PHING
       <exec command="ls -l /tmp" />

http://phpday.it                  #phpday   @k3a
property
    Build.xml

    <property name="db.name" value="phpday" />
    <property name="db.user" value="k3a" />
    <property name="db.port" value="3306" />

    build.properties file

    db.name = phpday
    db.user = k3a
    db.port = 3306

    <property file='build.properties' />

http://phpday.it                           #phpday   @k3a
property
    <project default="uno">
      <property name="chi_sono" value="io" />
    
 <target name="uno">
     
 <echo>Chi sono: ${chi_sono}</echo>
    
 </target>
    </project>


    $ ant
    uno:
             [echo] Chi sono: io


http://phpday.it                          #phpday   @k3a
property
    <project default="uno">
      <property name="chi_sono" value="io" />
    
 <target name="uno">
     
 <echo>Chi sono: ${chi_sono}</echo>
    
 </target>
    </project>


    $ ant -Dchi_sono=phpDay
    uno:
         [echo] Chi sono: phpDay


http://phpday.it                          #phpday   @k3a
property
    <project default="uno">
      <property name="chi_sono" value="io" />
    
 <target name="uno">
    
   <property name="chi_sono" value="voi" />
     
 <echo>Chi sono: ${chi_sono}</echo>
    
 </target>
    </project>

    $ ant
    uno:
             [echo] Chi sono: io


http://phpday.it                         #phpday   @k3a
fileset
            <project>
              <fileset dir="." id="foo">
                <include name="*.php" />
              </fileset>
              <target name="uno" >
                <copy todir="/tmp">
                   <fileset refid="foo" />
                </copy>
              </target>
            </project>

http://phpday.it                             #phpday   @k3a
fileset

           <fileset dir="/tmp" id="fileset1">
             <include name="dir1/file.txt" />
             <include name="dir2/**" />
             <exclude name="dir2/**/i*.php" />
           </fileset>




http://phpday.it                         #phpday   @k3a
fileset
  <scp todir="user:password@somehost:/home/chuck">
      <fileset dir="src_dir">
        <include name="**/*.java"/>
      </fileset>
  </scp>

  <scp file="myfile.txt"
           todir="user@somehost:/home/chuck"
           keyfile="${user.home}/.ssh/id_dsa"
           passphrase="my extremely secret passphrase" />




http://phpday.it                                     #phpday   @k3a
PHP Project Wizard
                   (PPW)
      ppw --source src 
          --tests tests 
          --name myproject

      PHP Project Wizard (PPW) 1.0.4 by Sebastian Bergmann.

      Wrote build script for Apache Ant to ./build.xml
      Wrote configuration for PHPUnit to ./phpunit.xml.dist




http://phpday.it                                #phpday   @k3a
build.xml
      <target name="parallelTasks">
       <parallel threadCount="2">
        <sequential>
         <antcall target="pdepend"/>
         <antcall target="phpmd"/>
        </sequential>
        <antcall target="phpcpd"/>
        <antcall target="phpcs"/>
        <antcall target="phpdoc"/>
        <antcall target="phploc"/>
       </parallel>
      </target>




http://phpday.it                       #phpday   @k3a
build.xml

  <target name="phpmd" description="Generate pmd.xml PHPMD">
    <exec executable="phpmd">
     <arg line="${source}
                xml
                codesize,design,naming,unusedcode
                --reportfile ${basedir}/build/logs/pmd.xml" />
    </exec>
   </target>




http://phpday.it                                  #phpday   @k3a
Conclusions



                       42
http://phpday.it                 #phpday   @k3a
?
                   Te   sto




http://phpday.it              #phpday   @k3a
Lasciate un feedback!

           http://joind.in/2999

http://phpday.it            #phpday   @k3a
Riferimenti
          •   Apache Ant: http://ant.apache.org/
          •   Phing: http://www.phing.info/trac/
          •   phpunit, ppw, phpcpd, phploc...
              https://github.com/sebastianbergmann
          •   phpmd: http://phpmd.org
          •   phpdepend: http://pdepend.org/
          •   Extending phing: http://www.phing.info/docs/guide/
              current/chapters/ExtendingPhing.html

http://phpday.it                                        #phpday    @k3a

More Related Content

What's hot

Putting Phing to Work for You
Putting Phing to Work for YouPutting Phing to Work for You
Putting Phing to Work for You
hozn
 
Automated Deployment With Phing
Automated Deployment With PhingAutomated Deployment With Phing
Automated Deployment With Phing
Daniel Cousineau
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
Shahar Evron
 
Propel Your PHP Applications
Propel Your PHP ApplicationsPropel Your PHP Applications
Propel Your PHP Applications
hozn
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
Adam Culp
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
Clark Everetts
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshop
Nick Belhomme
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
Adam Englander
 
PHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBeneluxPHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBenelux
Nick Belhomme
 
11 tools for your PHP devops stack
11 tools for your PHP devops stack11 tools for your PHP devops stack
11 tools for your PHP devops stack
Kris Buytaert
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
Nick Belhomme
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
Puppet
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using Django
Nathan Eror
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Puppet
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
Tihomir Opačić
 
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet
 
Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020
Puppet
 
Getting started with Django 1.8
Getting started with Django 1.8Getting started with Django 1.8
Getting started with Django 1.8
rajkumar2011
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Cristopher Ewing
 

What's hot (20)

Putting Phing to Work for You
Putting Phing to Work for YouPutting Phing to Work for You
Putting Phing to Work for You
 
Automated Deployment With Phing
Automated Deployment With PhingAutomated Deployment With Phing
Automated Deployment With Phing
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
 
Propel Your PHP Applications
Propel Your PHP ApplicationsPropel Your PHP Applications
Propel Your PHP Applications
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshop
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
PHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBeneluxPHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBenelux
 
11 tools for your PHP devops stack
11 tools for your PHP devops stack11 tools for your PHP devops stack
11 tools for your PHP devops stack
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using Django
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
 
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
 
Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020
 
Getting started with Django 1.8
Getting started with Django 1.8Getting started with Django 1.8
Getting started with Django 1.8
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
 

Similar to Ant vs Phing

2019 11-bgphp
2019 11-bgphp2019 11-bgphp
2019 11-bgphp
dantleech
 
Improving QA on PHP projects - confoo 2011
Improving QA on PHP projects - confoo 2011Improving QA on PHP projects - confoo 2011
Improving QA on PHP projects - confoo 2011
Michelangelo van Dam
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
dantleech
 
PHP Development Tools
PHP  Development ToolsPHP  Development Tools
PHP Development Tools
Antony Abramchenko
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
Michelangelo van Dam
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Bastian Feder
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
Alan Pinstein
 
Php Power Tools
Php Power ToolsPhp Power Tools
Php Power Tools
Michelangelo van Dam
 
Improving qa on php projects
Improving qa on php projectsImproving qa on php projects
Improving qa on php projects
Michelangelo van Dam
 
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHPBuilding com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
iMasters
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
Rowan Merewood
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
Bastian Feder
 
"I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
Fabio Milano
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010
Bastian Feder
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Jérémy Derussé
 
What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24
Jim Jagielski
 
Php on the Web and Desktop
Php on the Web and DesktopPhp on the Web and Desktop
Php on the Web and Desktop
Elizabeth Smith
 

Similar to Ant vs Phing (20)

2019 11-bgphp
2019 11-bgphp2019 11-bgphp
2019 11-bgphp
 
Improving QA on PHP projects - confoo 2011
Improving QA on PHP projects - confoo 2011Improving QA on PHP projects - confoo 2011
Improving QA on PHP projects - confoo 2011
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
 
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
 
PHP Development Tools
PHP  Development ToolsPHP  Development Tools
PHP Development Tools
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Php Power Tools
Php Power ToolsPhp Power Tools
Php Power Tools
 
Improving qa on php projects
Improving qa on php projectsImproving qa on php projects
Improving qa on php projects
 
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHPBuilding com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
"I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
 
What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24
 
Php on the Web and Desktop
Php on the Web and DesktopPhp on the Web and Desktop
Php on the Web and Desktop
 

More from Manuel Baldassarri

Swoole Overview
Swoole OverviewSwoole Overview
Swoole Overview
Manuel Baldassarri
 
Videogiochi in PHP 👾
Videogiochi in PHP 👾Videogiochi in PHP 👾
Videogiochi in PHP 👾
Manuel Baldassarri
 
From * to Symfony2
From * to Symfony2From * to Symfony2
From * to Symfony2
Manuel Baldassarri
 
Un CMS in 25min con Symfony CMF
Un CMS in 25min con Symfony CMFUn CMS in 25min con Symfony CMF
Un CMS in 25min con Symfony CMF
Manuel Baldassarri
 
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiSymfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Manuel Baldassarri
 

More from Manuel Baldassarri (8)

Swoole Overview
Swoole OverviewSwoole Overview
Swoole Overview
 
Videogiochi in PHP 👾
Videogiochi in PHP 👾Videogiochi in PHP 👾
Videogiochi in PHP 👾
 
From * to Symfony2
From * to Symfony2From * to Symfony2
From * to Symfony2
 
Un CMS in 25min con Symfony CMF
Un CMS in 25min con Symfony CMFUn CMS in 25min con Symfony CMF
Un CMS in 25min con Symfony CMF
 
Automazione quotidiana in php
Automazione quotidiana in phpAutomazione quotidiana in php
Automazione quotidiana in php
 
Symfony2 security layer
Symfony2 security layerSymfony2 security layer
Symfony2 security layer
 
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenutiSymfony CMF: un nuovo paradigma per la gestione dei contenuti
Symfony CMF: un nuovo paradigma per la gestione dei contenuti
 
Form refactoring
Form refactoringForm refactoring
Form refactoring
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

Ant vs Phing

  • 1. Ant vs Phing parola chiave automatizzare
  • 2. Ego slide • Manuel “Kea” Baldassarri • Senior Developer in Ideato • PHP developer dal 1992 • Marito e Padre • mb@ideato.it twitter: k3a • flickr: kea42 slideshare: kea42 http://phpday.it #phpday @k3a
  • 4. ? Te sto http://phpday.it #phpday @k3a
  • 5. Build automation software http://en.wikipedia.org/wiki/List_of_build_automation_software http://phpday.it #phpday @k3a
  • 7. Ant • Ant is kind of GNU make • Ant is a Java library and command-line tool • Ant is Open Source, maintained by Apache • Ant is cross platform and portable • Ant is well suited to a large number of automation and scripting tasks http://phpday.it #phpday @k3a
  • 8. Phing • PHing Is Not GNU make • It's a PHP project build system or build tool based on Apache Ant http://phpday.it #phpday @k3a
  • 9. Installation Ant • Apt-get o Yum • Donwload binary file and setup the env • SVN + Build • Requires JRE 1.4 http://phpday.it #phpday @k3a
  • 10. Installation Phing • PEAR • Donwload binary file and setup the env • SVN • Requires PHP 5.2 http://phpday.it #phpday @k3a
  • 11. http://phpday.it #phpday @k3a
  • 14. http://phpday.it #phpday @k3a
  • 15. Ant Phing Netbeans Plugin No Eclipse Plugin wip Built-in* Zend Studio Run cmd Textmate Bundle** Bundle** phpStorm No Built-in*** Komodo Run cmd Run cmd http://phpday.it #phpday @k3a
  • 16. How they work • XML configuration file • Project, Target, Task, Property, Type http://phpday.it #phpday @k3a
  • 17. http://phpday.it #phpday @k3a
  • 18. project <?xml version="1.0" ?> <project name="TestProject" basedir="." default="main"> <!-- Everything else goes here --> </project> http://phpday.it #phpday @k3a
  • 19. target <target name="main"> <!-- everything else goes here --> </target> http://phpday.it #phpday @k3a
  • 20. target <target name="t1">...</target> <target name="t2">...</target> <target name="main" depends="t1,t2"> ... </target> http://phpday.it #phpday @k3a
  • 21. target <target name="t1" depends="t3">...</target> <target name="t2" depends="t3">...</target> <target name="t3">...</target> <target name="t4" depends="t1,t2"> ... </target> http://phpday.it #phpday @k3a
  • 22. Tasks • Archive • Logging • Audit/Coverage • Mail • Deployment • Remote • Documentation • Versioning • File • Testing http://phpday.it #phpday @k3a
  • 23. Useful tasks • scp • ssh (phing), sshexec (ant) • ftpdeploy (phing), ftp (ant) • tar (gzip, bzip2), zip • git*, svn*, cvs http://phpday.it #phpday @k3a
  • 24. Useful Phing tasks • PHPUnit • JsLint, JsMin • PHPDocumentor • XMLLint • PHPDepend • PHPLint • PHPMD • Tidy • PHPCPD • S3 http://phpday.it #phpday @k3a
  • 25. ExecTask ANT <exec executable="ls"> <arg value="-l"/> <arg value="/tmp"/> </exec> PHING <exec command="ls -l /tmp" /> http://phpday.it #phpday @k3a
  • 26. property Build.xml <property name="db.name" value="phpday" /> <property name="db.user" value="k3a" /> <property name="db.port" value="3306" /> build.properties file db.name = phpday db.user = k3a db.port = 3306 <property file='build.properties' /> http://phpday.it #phpday @k3a
  • 27. property <project default="uno"> <property name="chi_sono" value="io" /> <target name="uno"> <echo>Chi sono: ${chi_sono}</echo> </target> </project> $ ant uno: [echo] Chi sono: io http://phpday.it #phpday @k3a
  • 28. property <project default="uno"> <property name="chi_sono" value="io" /> <target name="uno"> <echo>Chi sono: ${chi_sono}</echo> </target> </project> $ ant -Dchi_sono=phpDay uno: [echo] Chi sono: phpDay http://phpday.it #phpday @k3a
  • 29. property <project default="uno"> <property name="chi_sono" value="io" /> <target name="uno"> <property name="chi_sono" value="voi" /> <echo>Chi sono: ${chi_sono}</echo> </target> </project> $ ant uno: [echo] Chi sono: io http://phpday.it #phpday @k3a
  • 30. fileset <project> <fileset dir="." id="foo"> <include name="*.php" /> </fileset> <target name="uno" > <copy todir="/tmp"> <fileset refid="foo" /> </copy> </target> </project> http://phpday.it #phpday @k3a
  • 31. fileset <fileset dir="/tmp" id="fileset1"> <include name="dir1/file.txt" /> <include name="dir2/**" /> <exclude name="dir2/**/i*.php" /> </fileset> http://phpday.it #phpday @k3a
  • 32. fileset <scp todir="user:password@somehost:/home/chuck"> <fileset dir="src_dir"> <include name="**/*.java"/> </fileset> </scp> <scp file="myfile.txt" todir="user@somehost:/home/chuck" keyfile="${user.home}/.ssh/id_dsa" passphrase="my extremely secret passphrase" /> http://phpday.it #phpday @k3a
  • 33. PHP Project Wizard (PPW) ppw --source src --tests tests --name myproject PHP Project Wizard (PPW) 1.0.4 by Sebastian Bergmann. Wrote build script for Apache Ant to ./build.xml Wrote configuration for PHPUnit to ./phpunit.xml.dist http://phpday.it #phpday @k3a
  • 34. build.xml <target name="parallelTasks"> <parallel threadCount="2"> <sequential> <antcall target="pdepend"/> <antcall target="phpmd"/> </sequential> <antcall target="phpcpd"/> <antcall target="phpcs"/> <antcall target="phpdoc"/> <antcall target="phploc"/> </parallel> </target> http://phpday.it #phpday @k3a
  • 35. build.xml <target name="phpmd" description="Generate pmd.xml PHPMD"> <exec executable="phpmd"> <arg line="${source} xml codesize,design,naming,unusedcode --reportfile ${basedir}/build/logs/pmd.xml" /> </exec> </target> http://phpday.it #phpday @k3a
  • 36. Conclusions 42 http://phpday.it #phpday @k3a
  • 37. ? Te sto http://phpday.it #phpday @k3a
  • 38. Lasciate un feedback! http://joind.in/2999 http://phpday.it #phpday @k3a
  • 39. Riferimenti • Apache Ant: http://ant.apache.org/ • Phing: http://www.phing.info/trac/ • phpunit, ppw, phpcpd, phploc... https://github.com/sebastianbergmann • phpmd: http://phpmd.org • phpdepend: http://pdepend.org/ • Extending phing: http://www.phing.info/docs/guide/ current/chapters/ExtendingPhing.html http://phpday.it #phpday @k3a

Editor's Notes

  1. Cos&amp;#x2019;&amp;#xE8; Ant\nCos&amp;#x2019;&amp;#xE8; Phing\nCosa possiamo automatizzare\nCosa possiamo automatizzare con Ant/Phing\nPrincipali gruppi di task\nTarget -&gt; Target chain\n\n
  2. \n
  3. Quotidianamente, Compiti ripetitivi (e noiosi): fare i backup, lavare la macchina, trasformare immagini in serie, cambiare i pannolini, deploy di siti web, test del codice, verifica delle performance, lavare i denti, minimizzare js e css\nPer fortuna ci sono molte cose che si possono automatizzare con i sistemi di build automation\nutilizzare software BA &amp;#xE8; una best practice perch&amp;#xE8; procedure manuali sono passive di errori, BA sono autodocumentate, aumentano la nostra produttivit&amp;#xE0;, le BA possono essere lanciate da altri sistemi, cron, CI\n\n
  4. Quanti utilizzano software di build automation?\nAnt/Phing/Altro\n\n
  5. \n
  6. in principio\n
  7. luglio 2000 1.1\nben si adatta\n
  8. tracce nel 2001\n2004 porting su PHP5\n
  9. Consigliato JDK 1.4, sconsigliato perch&amp;#xE8; non funzionano diversi task (dal sito non &amp;#xE8; dato sapere quali)\n
  10. PHPUnit 3.4\nSimpletest\nXdebug 2\nPhpdocumentor\n
  11. Jenkins, Cruise control, Bamboo: entrambi, bamboo con symlink\n\n
  12. Template for Jenkins jobs for PHP project\n
  13. Template for Jenkins jobs for PHP project\n
  14. I maggiori programmi utilizzati (a parte Vi ed Emacs), Cross platform (tranne Textmate)\nNe utilizzate altri?\n
  15. * Eclipse si, ZS version &lt;8\n** Bundle non in rete ma da creare a mano\n*** Presente ad oggi solo in Early Access Program (probabilmente dalla 2.1)\n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. per ant, git e svn non sono nel ramo ufficiale ma si trovano dei plugin/macro\n
  24. Mess Detector, analizza il codice e fornisce un report su possibli bug, espressioni complicate, parametri metodi e propriet&amp;#xE0; non utilizzati\n\n
  25. In realt&amp;#xE0; originariamente Ant supportava l&amp;#x2019;attributo &amp;#x201C;command&amp;#x201D; ma ora &amp;#xE8; deprecato\n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. oltre ad include/exclude, dimensione, created at, dir/file, quale livello del fs\nricrea la struttura\noltre al fileset esistono altri type, filelist, mapper, filter\n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n\n
  38. \n\n
  39. \n