SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
PHP development with Eclipse PDT 2.0




Bastian Feder                                IPC 2009
papaya Software GmbH                        26.05.2009
Me, myself & I
           Application developer
           PHP since 2001
           @papaya since
            01.2008
           OpenSource addict
Agenda
   Installation
   Views & Perspectives
   Projects
   Templates
   Code completion
   What's new?
   Tips & Tricks
   External Tools Framework
   xDebug integration
   Plugins
Installation
   Download latest revision from Eclipse website
    (http://www.eclipse.org/pdt/downloads)
    ▹   All in one (recommended):
        provides everything you need to run PDT
    ▹   PDT Feature / Update Manager:
        extends an existing Eclipse, but all dependencies PDT
        relies on needs to be installed first.
   Extract archive
   Copy to favorized location
    (e.g. /usr/local/bin/ or another location in your application path)
Views & Perspectives
   Perspective
    (Window > Open Perspektive)
    ▹   Arrangement of Views:
        PHP Perspektive contains e.g. 'PHP Explorer',
        'Outline' and 'Project Outline'
   Views or Tabs
    (Window > Show View)
    ▹   Viewport providing specific information and/or
        functionality
Views & Perspectives (II)
Projects
        Organizational untis
        Customizable
         configuration
        PHP include path
           ▹   Validation
        Build rules
           ▹   included resources
           ▹   excluded resources
Templates
   Contextual predefined
    code snippets
   Configure at
    Preferences > PHP >
    Templates
Code templates
   Activation key:
    <CTRL> + space
   Code templates
    ▹   Eases typing of complex code structures
        (e.g. switch – statement)
    ▹   Minimize errors
                                           switch ($action) {
    ▹   Act like a form                    case 'read':
                                            ;
                                            break;

                                           default:
                                             ;
                                             break;
                                           }
Code templates (II)
   Capable of code completion
   Set cursor positioning (${cursor}, ${})
   Dynamic content by use of variables
    ▹   ${class}                  switch (${dollar}${variable}) {
    ▹   ${function}               case ${value}:
                                   ${cursor};
    ▹   ${variable}                break;
    ▹   ${value}
                                  default:
                                  ;
                                  break;
                                  }
File templates
   File templates
    ▹   Create new files with
        standardized
        structures
    ▹   Easy to create or
        adapt
Code completion
                     (Code Assist)
   Configuration via
    Preferences > PHP > Editor > Code Assist
Code completion (II)
                         (Code Assist)
   Activation key
    <CTRL> + space
   Completes
    ▹   PHP functions
    ▹   Classes & functions
    ▹   Constants
    ▹   Code templates
   Evolves with every plugin supporting this
    feature (e.g. JSEclipse)
Code completion (III)
     (Code Assist)
Code completion (IV)
                                                  (Code Assist)
   Documentation hint
          ▪   declaring the name of a class to be instantiated as the
              type of the 'local' class var will enable Eclipse to resolve
              the methods of the instantiated class:


      class docuDb {                                          class docuHint {

          private function connect() {                            /**
            return $this->dbHandler->connect();                   * @var docuDb Database handling
          }                                                       */
      }                                                           private $dbHandler = NULL;

                                                                  private function connectToDB() {
                                                                    $this->dbHandler = &new docuDb();
                                                                    $dbh = $this->dbHandler->connect();
                                                                  }
                                                              }
What's new in PDT 2.0?
   Less dependencies
   Improved indexing and caching
    ▹ cleanup of unnecessary depedencies to Java
   Mark occurrences
   Configurable Buildpathes
   Improved code completion
    ▹   Camelcase matching
What's new in PDT 2.0? (II)
   Enhanced features to support OOP in PHP
    ▹   Overwrite Indicators
What's new in PDT 2.0? (III)
   Enhanced features to support OOP in PHP
    ▹   Type & name
        hierarchies
External Tools Framework
   Enables Eclipse to run ,stand-alone'
    applications
   Two broad classes of external tools are
    available:
    ▹   Ant build files
    ▹   Everything else
External Tools Framework (II)
External Tools Framework (III)
   Loaction
    Linux / Mac OsX: points to the
    phpDocumentor installation

    Windows: points to the PHP executable

   Working directory
    directory to store temporary data

   Arguments
    Linux/ Mac OsX: command line parameters
    to be passed to phpDocumentor.

    Windows: path to the phpDocumentor
    installation and command line parameters
    (e.g.: quot;D:xamppphpphpdocquot; -c quot;$
    {project_loc}/doc/tech/config/phpdoc.iniquot;)
External Tools Framework (III)
   Display in favorits
    menu

   Standard input &
    output
xDebug
   Debugging for PHP by Derick Rethans
    (http://www.xdebug.org)
   Provides profiling, tracing, code coverage, …
   Cross platform
xDebug configuration
   Add to php.ini (e.g. on Mac)
 [XDebug]
 ;; Only Zend OR (!) XDebug
 zend_extension=quot;/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/xdebug.soquot;
 xdebug.remote_enable=true
 xdebug.remote_host=127.0.0.1 ;if debugging on remote server, put client IP here
 xdebug.remote_port=9000
 xdebug.remote_handler=dbgp
 ;; profiler
 xdebug.profiler_enable=Off
 xdebug.profiler_enable_trigger=On
 xdebug.profiler_output_dir=/data_lokal/temp/xdebug/profiling
   or .htaccess - file
  #-------------------------------#
  # xDebug section                #
  #-------------------------------#
  php_value xdebug.remote_enable 1
  php_value xdebug.remote_handler bdgp
  php_value xdebug.remote_host 127.0.0.1 ;if debugging on remote server, put client IP here
;; php_value xdebug.allowed_clients <client IP address>
  php_value xdebug.remote_port 9000
  # profiler
  php_value xdebug.profiler_enable_trigger 1
  php_value xdebug.profiler_enable 0
  php_value xdebug.profiler_output_dir quot;/data_lokal/temp/xdebug/profilingquot;
xDebug (III)
   Debug dialog
xDebug (IV)
   Configure PDT to talk to xDebug
xDebug (IV)
   Configure the 'Server' handling the debugging
    session
Tips and Tricks (Configuration)
   Heap space (memory allocated by JVM)
    size depends on system memory capacity
    ▹   Xms, Xmx
    ▹   XXMaxPermSize, XXPermSize
   Eclipse PDT settings
    ▹   validation / build settings
    ▹   disable automatic updates
    ▹   disable code folding
Plugins
   Subclipse
    managing SVN repositories from inside Eclipse
   JSEclipse
    Provides additional features supporting JavaScript
   Data Tools Platform
    managing databases from inside Eclipse
Subclipse (installation)
   Eclipse update site:
    http://subclipse.tigris.org/update
Subclipse (configuration)
      Set „auto-properties“
        ▹   WinXp:
            C:Dokumente und Einstellungen<USER>AnwendungsdatenSubversionconfig

        ▹   MacOs / Linux: ~/.subversion/config
[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .project .cache .settings
enable-auto-props = yes

[auto-props]
*.js = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL
*.css = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL
*.php = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL
*.html = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL
*.htm = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL
*.xsl = svn:eol-style=LF
*.xml = svn:eol-style=LF
*.xsd = svn:eol-style=LF
Subclipse (conflict handling)
   Integrated (diff-) editor to resolve conflicts
   Support for merging changes which do not
    conflict
   Preview on the checkout to find conflicts before
    updating the sources
Questions?




             Further questions? Ask me at:

             lapistano@php.net
References
   Eclipse PDT
    (http://www.eclipse.org/pdt)

   Eclipse plugins
     ▹   Subclipse (http://subclipse.tigris.org)
     ▹   JSEclipse (http://www.interaktonline.com/products/eclipse/jseclipse/overview)
   xDebug
    (http://www.xdebug.org)

   PhpDocumentor @ pear.php.net
    (http://pear.php.net/package/PhpDocumentor/docs/1.4.2)

   SVN keyword substitution
    (http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.props.special.keywords)
License
   This set of slides and the source code included
    in the download package is licensed under the

        Creative Commons Attribution-
     Noncommercial-Share Alike 2.0 Generic
                   License


      http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en

Contenu connexe

Tendances

Scala4sling
Scala4slingScala4sling
Scala4slingday
 
Tips
TipsTips
Tipsmclee
 
Symfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friendSymfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friendKirill Chebunin
 
Scala for scripting
Scala for scriptingScala for scripting
Scala for scriptingday
 
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)ZFConf Conference
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010isnull
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015Fernando Hamasaki de Amorim
 
Migrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain PointsMigrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain PointsSteven Evatt
 
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppet
 
Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3guestcc91d4
 
Understanding PHP objects
Understanding PHP objectsUnderstanding PHP objects
Understanding PHP objectsjulien pauli
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统yiditushe
 
Mastering Namespaces in PHP
Mastering Namespaces in PHPMastering Namespaces in PHP
Mastering Namespaces in PHPNick Belhomme
 
Introduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectIntroduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectLaurence Svekis ✔
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebookguoqing75
 
Dependency Injection in PHP
Dependency Injection in PHPDependency Injection in PHP
Dependency Injection in PHPKacper Gunia
 
PHP traits, treat or threat?
PHP traits, treat or threat?PHP traits, treat or threat?
PHP traits, treat or threat?Nick Belhomme
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsMark Baker
 

Tendances (20)

Scala4sling
Scala4slingScala4sling
Scala4sling
 
Tips
TipsTips
Tips
 
Symfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friendSymfony2 Service Container: Inject me, my friend
Symfony2 Service Container: Inject me, my friend
 
Scala for scripting
Scala for scriptingScala for scripting
Scala for scripting
 
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
 
Debugging on rails
Debugging on railsDebugging on rails
Debugging on rails
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
 
Migrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain PointsMigrating PriceChirp to Rails 3.0: The Pain Points
Migrating PriceChirp to Rails 3.0: The Pain Points
 
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, PuppetPuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
PuppetConf. 2016: Puppet Best Practices: Roles & Profiles – Gary Larizza, Puppet
 
Continuous Quality Assurance
Continuous Quality AssuranceContinuous Quality Assurance
Continuous Quality Assurance
 
Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3
 
Understanding PHP objects
Understanding PHP objectsUnderstanding PHP objects
Understanding PHP objects
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Mastering Namespaces in PHP
Mastering Namespaces in PHPMastering Namespaces in PHP
Mastering Namespaces in PHP
 
Introduction to Node js for beginners + game project
Introduction to Node js for beginners + game projectIntroduction to Node js for beginners + game project
Introduction to Node js for beginners + game project
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
Dependency Injection in PHP
Dependency Injection in PHPDependency Injection in PHP
Dependency Injection in PHP
 
PHP traits, treat or threat?
PHP traits, treat or threat?PHP traits, treat or threat?
PHP traits, treat or threat?
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
 

En vedette

En vedette (6)

Financial Express July 20 2009
Financial Express July 20 2009Financial Express July 20 2009
Financial Express July 20 2009
 
Vermell4
Vermell4Vermell4
Vermell4
 
Grana10
Grana10Grana10
Grana10
 
Taronja7
Taronja7Taronja7
Taronja7
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn Workshop
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 

Similaire à Eclipse Pdt2.0 26.05.2009

Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastBastian Feder
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
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
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2portBenny Siegert
 
The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010Bastian Feder
 
Developing with-devstack
Developing with-devstackDeveloping with-devstack
Developing with-devstackDeepak Garg
 
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 W09Bastian Feder
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerOrtus Solutions, Corp
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Ortus Solutions, Corp
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Jeff Jones
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008phpbarcelona
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 

Similaire à Eclipse Pdt2.0 26.05.2009 (20)

Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The Beast
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
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-)
 
Api Design
Api DesignApi Design
Api Design
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2port
 
The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010
 
Developing with-devstack
Developing with-devstackDeveloping with-devstack
Developing with-devstack
 
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
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Pecl Picks
Pecl PicksPecl Picks
Pecl Picks
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!
 
Ext 0523
Ext 0523Ext 0523
Ext 0523
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 

Plus de Bastian Feder

JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentalsBastian Feder
 
Why documentation osidays
Why documentation osidaysWhy documentation osidays
Why documentation osidaysBastian Feder
 
PhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsPhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsBastian Feder
 
Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your projectBastian Feder
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Bastian Feder
 
Bubbles & Trees with jQuery
Bubbles & Trees with jQueryBubbles & Trees with jQuery
Bubbles & Trees with jQueryBastian Feder
 
Ajax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google SuggestAjax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google SuggestBastian Feder
 

Plus de Bastian Feder (11)

JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
 
Why documentation osidays
Why documentation osidaysWhy documentation osidays
Why documentation osidays
 
Solid principles
Solid principlesSolid principles
Solid principles
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
PhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsPhpUnit - The most unknown Parts
PhpUnit - The most unknown Parts
 
Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your project
 
jQuery's Secrets
jQuery's SecretsjQuery's Secrets
jQuery's Secrets
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
 
Bubbles & Trees with jQuery
Bubbles & Trees with jQueryBubbles & Trees with jQuery
Bubbles & Trees with jQuery
 
Ajax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google SuggestAjax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google Suggest
 

Dernier

西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做j5bzwet6
 
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In DelhiCall Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In DelhiSoniyaSingh
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxJackieSparrow3
 
Inspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxInspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxShubham Rawat
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilabledollysharma2066
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)oannq
 
办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭o8wvnojp
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证kbdhl05e
 

Dernier (12)

西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做
 
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In DelhiCall Girls In Dwarka Sub City  ☎️7838079806 ✅ 💯Call Girls In Delhi
Call Girls In Dwarka Sub City ☎️7838079806 ✅ 💯Call Girls In Delhi
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptx
 
Inspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxInspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptx
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)
 
办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证
 

Eclipse Pdt2.0 26.05.2009

  • 1. PHP development with Eclipse PDT 2.0 Bastian Feder IPC 2009 papaya Software GmbH 26.05.2009
  • 2. Me, myself & I  Application developer  PHP since 2001  @papaya since 01.2008  OpenSource addict
  • 3. Agenda  Installation  Views & Perspectives  Projects  Templates  Code completion  What's new?  Tips & Tricks  External Tools Framework  xDebug integration  Plugins
  • 4. Installation  Download latest revision from Eclipse website (http://www.eclipse.org/pdt/downloads) ▹ All in one (recommended): provides everything you need to run PDT ▹ PDT Feature / Update Manager: extends an existing Eclipse, but all dependencies PDT relies on needs to be installed first.  Extract archive  Copy to favorized location (e.g. /usr/local/bin/ or another location in your application path)
  • 5. Views & Perspectives  Perspective (Window > Open Perspektive) ▹ Arrangement of Views: PHP Perspektive contains e.g. 'PHP Explorer', 'Outline' and 'Project Outline'  Views or Tabs (Window > Show View) ▹ Viewport providing specific information and/or functionality
  • 7. Projects  Organizational untis  Customizable configuration  PHP include path ▹ Validation  Build rules ▹ included resources ▹ excluded resources
  • 8. Templates  Contextual predefined code snippets  Configure at Preferences > PHP > Templates
  • 9. Code templates  Activation key: <CTRL> + space  Code templates ▹ Eases typing of complex code structures (e.g. switch – statement) ▹ Minimize errors switch ($action) { ▹ Act like a form case 'read': ; break; default: ; break; }
  • 10. Code templates (II)  Capable of code completion  Set cursor positioning (${cursor}, ${})  Dynamic content by use of variables ▹ ${class} switch (${dollar}${variable}) { ▹ ${function} case ${value}: ${cursor}; ▹ ${variable} break; ▹ ${value} default: ; break; }
  • 11. File templates  File templates ▹ Create new files with standardized structures ▹ Easy to create or adapt
  • 12. Code completion (Code Assist)  Configuration via Preferences > PHP > Editor > Code Assist
  • 13. Code completion (II) (Code Assist)  Activation key <CTRL> + space  Completes ▹ PHP functions ▹ Classes & functions ▹ Constants ▹ Code templates  Evolves with every plugin supporting this feature (e.g. JSEclipse)
  • 14. Code completion (III) (Code Assist)
  • 15. Code completion (IV) (Code Assist)  Documentation hint ▪ declaring the name of a class to be instantiated as the type of the 'local' class var will enable Eclipse to resolve the methods of the instantiated class: class docuDb { class docuHint { private function connect() { /** return $this->dbHandler->connect(); * @var docuDb Database handling } */ } private $dbHandler = NULL; private function connectToDB() { $this->dbHandler = &new docuDb(); $dbh = $this->dbHandler->connect(); } }
  • 16. What's new in PDT 2.0?  Less dependencies  Improved indexing and caching ▹ cleanup of unnecessary depedencies to Java  Mark occurrences  Configurable Buildpathes  Improved code completion ▹ Camelcase matching
  • 17. What's new in PDT 2.0? (II)  Enhanced features to support OOP in PHP ▹ Overwrite Indicators
  • 18. What's new in PDT 2.0? (III)  Enhanced features to support OOP in PHP ▹ Type & name hierarchies
  • 19. External Tools Framework  Enables Eclipse to run ,stand-alone' applications  Two broad classes of external tools are available: ▹ Ant build files ▹ Everything else
  • 21. External Tools Framework (III)  Loaction Linux / Mac OsX: points to the phpDocumentor installation Windows: points to the PHP executable  Working directory directory to store temporary data  Arguments Linux/ Mac OsX: command line parameters to be passed to phpDocumentor. Windows: path to the phpDocumentor installation and command line parameters (e.g.: quot;D:xamppphpphpdocquot; -c quot;$ {project_loc}/doc/tech/config/phpdoc.iniquot;)
  • 22. External Tools Framework (III)  Display in favorits menu  Standard input & output
  • 23. xDebug  Debugging for PHP by Derick Rethans (http://www.xdebug.org)  Provides profiling, tracing, code coverage, …  Cross platform
  • 24. xDebug configuration  Add to php.ini (e.g. on Mac) [XDebug] ;; Only Zend OR (!) XDebug zend_extension=quot;/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/xdebug.soquot; xdebug.remote_enable=true xdebug.remote_host=127.0.0.1 ;if debugging on remote server, put client IP here xdebug.remote_port=9000 xdebug.remote_handler=dbgp ;; profiler xdebug.profiler_enable=Off xdebug.profiler_enable_trigger=On xdebug.profiler_output_dir=/data_lokal/temp/xdebug/profiling  or .htaccess - file #-------------------------------# # xDebug section # #-------------------------------# php_value xdebug.remote_enable 1 php_value xdebug.remote_handler bdgp php_value xdebug.remote_host 127.0.0.1 ;if debugging on remote server, put client IP here ;; php_value xdebug.allowed_clients <client IP address> php_value xdebug.remote_port 9000 # profiler php_value xdebug.profiler_enable_trigger 1 php_value xdebug.profiler_enable 0 php_value xdebug.profiler_output_dir quot;/data_lokal/temp/xdebug/profilingquot;
  • 25. xDebug (III)  Debug dialog
  • 26. xDebug (IV)  Configure PDT to talk to xDebug
  • 27. xDebug (IV)  Configure the 'Server' handling the debugging session
  • 28. Tips and Tricks (Configuration)  Heap space (memory allocated by JVM) size depends on system memory capacity ▹ Xms, Xmx ▹ XXMaxPermSize, XXPermSize  Eclipse PDT settings ▹ validation / build settings ▹ disable automatic updates ▹ disable code folding
  • 29. Plugins  Subclipse managing SVN repositories from inside Eclipse  JSEclipse Provides additional features supporting JavaScript  Data Tools Platform managing databases from inside Eclipse
  • 30. Subclipse (installation)  Eclipse update site: http://subclipse.tigris.org/update
  • 31. Subclipse (configuration)  Set „auto-properties“ ▹ WinXp: C:Dokumente und Einstellungen<USER>AnwendungsdatenSubversionconfig ▹ MacOs / Linux: ~/.subversion/config [miscellany] global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .project .cache .settings enable-auto-props = yes [auto-props] *.js = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL *.css = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL *.php = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL *.html = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL *.htm = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL *.xsl = svn:eol-style=LF *.xml = svn:eol-style=LF *.xsd = svn:eol-style=LF
  • 32. Subclipse (conflict handling)  Integrated (diff-) editor to resolve conflicts  Support for merging changes which do not conflict  Preview on the checkout to find conflicts before updating the sources
  • 33. Questions? Further questions? Ask me at: lapistano@php.net
  • 34. References  Eclipse PDT (http://www.eclipse.org/pdt)  Eclipse plugins ▹ Subclipse (http://subclipse.tigris.org) ▹ JSEclipse (http://www.interaktonline.com/products/eclipse/jseclipse/overview)  xDebug (http://www.xdebug.org)  PhpDocumentor @ pear.php.net (http://pear.php.net/package/PhpDocumentor/docs/1.4.2)  SVN keyword substitution (http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.props.special.keywords)
  • 35. License  This set of slides and the source code included in the download package is licensed under the Creative Commons Attribution- Noncommercial-Share Alike 2.0 Generic License http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en