SlideShare a Scribd company logo
PHP development
       with Eclipse PDT
Bastian Feder               IPC 2008
papaya Software GmbH      29.10.2008
Me, myself & I
       Application
        developer
       PHP since 2001
       @papaya since
        01.2008
Agenda
   Installation
   Configuration
   Views & Perspectives
   Projects
   Templates
   Code competetion
   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)
Configuration
   Heap space (memory allocated by JVM)
    size depends on system memory capacity
    ▹   Xms, Xmx
    ▹   XXMaxPermSize, XXPermSize
   Eclipse PDT settings
    ▹   disable code folding
    ▹   formatting / linebreaks
    ▹   validation / build settings
    ▹   disable automatic updates
Views & Perspectives
   Views or Tabs
    (Window > Show View)
    ▹   Viewport providing specific information and/or
        functionality
   Perspective
    (Window > Open Perspektive)
    ▹   Arrangement of Views:
        PHP Perspektive contains e.g. 'PHP Explorer',
        'Outline' and 'Project Outline'
Views & Perspectives   (II)
Projects
    Organizational untis
    Customizeable
     configuration
    PHP include path
     ▹   Validation
     ▹   Build rules
     ▹   ...
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}, ${class_container}
    ▹   ${function}, ${function_container}
    ▹   ${variable}                      switch (${dollar}${variable}) {
                                         case ${value}:
                                          ${cursor};
    ▹   ${value}                          break;

                                         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 mysql_connect_db();             * @var docuDb Database handling
             }                                        */
         }                                            private $dbHandler = NULL;

                                                      private function connectToDB() {
                                                        $this->dbHandler = &new docuDb();
                                                        $dbh = $this->dbHandler->connect();
                                                      }
                                                  }
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
Plugins
   Subclipse
    managing SVN repositories from inside Eclipse
   JSEclipse
    Provides additional features supporting JavaScript
   Data Tools Platform
    managing databases from inside Eclipse
Subclipse (installation)
   Eclipsse 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?
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

More Related Content

What's hot

AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017
Stéphane Este-Gracias
 
Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017
Stéphane Este-Gracias
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
ZendCon
 
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
 
Scala4sling
Scala4slingScala4sling
Scala4slingday
 
Rich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 ApplicationRich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 Application
Kirill Chebunin
 
Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3guestcc91d4
 
Effective CMake
Effective CMakeEffective CMake
Effective CMake
Daniel Pfeifer
 
Dispatch in Clojure
Dispatch in ClojureDispatch in Clojure
Dispatch in Clojure
Carlo Sciolla
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010isnull
 
Clojure and the Web
Clojure and the WebClojure and the Web
Clojure and the Web
nickmbailey
 
Debugging on rails
Debugging on railsDebugging on rails
Debugging on rails
Mykhaylo Sorochan
 
Alfresco the clojure way -- Slides from the Alfresco DevCon2011
Alfresco the clojure way -- Slides from the Alfresco DevCon2011Alfresco the clojure way -- Slides from the Alfresco DevCon2011
Alfresco the clojure way -- Slides from the Alfresco DevCon2011
Carlo Sciolla
 
WordPress Plugin Localization
WordPress Plugin LocalizationWordPress Plugin Localization
WordPress Plugin Localization
Ronald Huereca
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overviewjsmith92
 
The Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern MatchingThe Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern Matching
José Paumard
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet
Keir Bowden
 
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
 

What's hot (20)

AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017
 
Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
 
Tips
TipsTips
Tips
 
C make tutorial
C make tutorialC make tutorial
C make tutorial
 
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
 
Scala4sling
Scala4slingScala4sling
Scala4sling
 
Rich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 ApplicationRich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 Application
 
Introduction to PHP 5.3
Introduction to PHP 5.3Introduction to PHP 5.3
Introduction to PHP 5.3
 
Effective CMake
Effective CMakeEffective CMake
Effective CMake
 
Dispatch in Clojure
Dispatch in ClojureDispatch in Clojure
Dispatch in Clojure
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010
 
Clojure and the Web
Clojure and the WebClojure and the Web
Clojure and the Web
 
Debugging on rails
Debugging on railsDebugging on rails
Debugging on rails
 
Alfresco the clojure way -- Slides from the Alfresco DevCon2011
Alfresco the clojure way -- Slides from the Alfresco DevCon2011Alfresco the clojure way -- Slides from the Alfresco DevCon2011
Alfresco the clojure way -- Slides from the Alfresco DevCon2011
 
WordPress Plugin Localization
WordPress Plugin LocalizationWordPress Plugin Localization
WordPress Plugin Localization
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
 
The Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern MatchingThe Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern Matching
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet
 
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
 

Viewers also liked

Age reversing modalities
Age reversing modalitiesAge reversing modalities
Age reversing modalities
Dr Daulatram Dhaked
 
How To Correct and Prevent Sun Damaged Skin
How To Correct and Prevent Sun Damaged SkinHow To Correct and Prevent Sun Damaged Skin
How To Correct and Prevent Sun Damaged Skin
Kenneth Dickie
 
Treatment of ageing skin
Treatment of ageing skinTreatment of ageing skin
Treatment of ageing skin
Mikhin Thomas
 
Topical chemo therapeutic treatments for non melanoma skin cancer
Topical chemo therapeutic treatments for non melanoma skin cancerTopical chemo therapeutic treatments for non melanoma skin cancer
Topical chemo therapeutic treatments for non melanoma skin cancerJeremy Gathercole
 
Sun Protection
Sun ProtectionSun Protection
Sun Protection
apappa
 
Premalignant Skin Conditions
Premalignant Skin ConditionsPremalignant Skin Conditions
Premalignant Skin Conditions
Ibrahim Farag
 

Viewers also liked (7)

Age reversing modalities
Age reversing modalitiesAge reversing modalities
Age reversing modalities
 
How To Correct and Prevent Sun Damaged Skin
How To Correct and Prevent Sun Damaged SkinHow To Correct and Prevent Sun Damaged Skin
How To Correct and Prevent Sun Damaged Skin
 
Treatment of ageing skin
Treatment of ageing skinTreatment of ageing skin
Treatment of ageing skin
 
Topical chemo therapeutic treatments for non melanoma skin cancer
Topical chemo therapeutic treatments for non melanoma skin cancerTopical chemo therapeutic treatments for non melanoma skin cancer
Topical chemo therapeutic treatments for non melanoma skin cancer
 
4part1
4part14part1
4part1
 
Sun Protection
Sun ProtectionSun Protection
Sun Protection
 
Premalignant Skin Conditions
Premalignant Skin ConditionsPremalignant Skin Conditions
Premalignant Skin Conditions
 

Similar to Php Development With Eclipde PDT

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
Bastian Feder
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
Rowan 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
 
Api Design
Api DesignApi Design
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2portBenny Siegert
 
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
biicode
 
Developing with-devstack
Developing with-devstackDeveloping with-devstack
Developing with-devstack
Deepak 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 W09
Bastian Feder
 
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
Ortus Solutions, Corp
 
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
Ortus Solutions, Corp
 
Pecl Picks
Pecl PicksPecl Picks
Pecl Picks
Elizabeth Smith
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cooljavablend
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Diego Freniche Brito
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
Itzik Kotler
 
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
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
klipstein
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
Roman Podoliaka
 

Similar to Php Development With Eclipde PDT (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
 
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
 
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
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
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
 
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
 
Pecl Picks
Pecl PicksPecl Picks
Pecl Picks
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool
 
Ext 0523
Ext 0523Ext 0523
Ext 0523
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
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
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
 

More from Bastian Feder

JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
Bastian Feder
 
Why documentation osidays
Why documentation osidaysWhy documentation osidays
Why documentation osidays
Bastian Feder
 
Solid principles
Solid principlesSolid principles
Solid principles
Bastian Feder
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
Bastian Feder
 
PhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsPhpUnit - The most unknown Parts
PhpUnit - The most unknown Parts
Bastian Feder
 
Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your project
Bastian Feder
 
jQuery's Secrets
jQuery's SecretsjQuery's Secrets
jQuery's Secrets
Bastian 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.1
Bastian Feder
 
Bubbles & Trees with jQuery
Bubbles & Trees with jQueryBubbles & Trees with jQuery
Bubbles & Trees with jQuery
Bastian Feder
 
Ajax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google SuggestAjax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google Suggest
Bastian Feder
 

More from Bastian Feder (12)

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
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
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
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Php Development With Eclipde PDT

  • 1. PHP development with Eclipse PDT Bastian Feder IPC 2008 papaya Software GmbH 29.10.2008
  • 2. Me, myself & I  Application developer  PHP since 2001  @papaya since 01.2008
  • 3. Agenda  Installation  Configuration  Views & Perspectives  Projects  Templates  Code competetion  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. Configuration  Heap space (memory allocated by JVM) size depends on system memory capacity ▹ Xms, Xmx ▹ XXMaxPermSize, XXPermSize  Eclipse PDT settings ▹ disable code folding ▹ formatting / linebreaks ▹ validation / build settings ▹ disable automatic updates
  • 6. Views & Perspectives  Views or Tabs (Window > Show View) ▹ Viewport providing specific information and/or functionality  Perspective (Window > Open Perspektive) ▹ Arrangement of Views: PHP Perspektive contains e.g. 'PHP Explorer', 'Outline' and 'Project Outline'
  • 8. Projects  Organizational untis  Customizeable configuration  PHP include path ▹ Validation ▹ Build rules ▹ ...
  • 9. Templates  Contextual predefined code snippets  Configure at Preferences > PHP > Templates
  • 10. 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; }
  • 11. Code templates (II)  Capable of code completion  Set cursor positioning (${cursor})  Dynamic content by use of variables ▹ ${class}, ${class_container} ▹ ${function}, ${function_container} ▹ ${variable} switch (${dollar}${variable}) { case ${value}: ${cursor}; ▹ ${value} break; default: ; break; }
  • 12. File templates  File templates ▹ Create new files with standardized structures ▹ Easy to create or adapt
  • 13. Code completion (Code Assist)  Configuration via Preferences > PHP > Editor > Code Assist
  • 14. 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)
  • 15. Code completion (III) (Code Assist)
  • 16. 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 mysql_connect_db(); * @var docuDb Database handling } */ } private $dbHandler = NULL; private function connectToDB() { $this->dbHandler = &new docuDb(); $dbh = $this->dbHandler->connect(); } }
  • 17. External Tools Framework  Enables Eclipse to run ,stand-alone' applications  Two broad classes of external tools are available: ▹ Ant build files ▹ Everything else
  • 19. 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; )
  • 20. External Tools Framework (III)  Display in favorits menu  Standard input & output
  • 21. xDebug  Debugging for PHP by Derick Rethans (http://www.xdebug.org)  Provides profiling, tracing, code coverage, …  Cross platform
  • 22. 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;
  • 23. xDebug (III)  Debug dialog
  • 24. xDebug (IV)  Configure PDT to talk to xDebug
  • 25. xDebug (IV)  Configure the 'Server' handling the debugging session
  • 26. Plugins  Subclipse managing SVN repositories from inside Eclipse  JSEclipse Provides additional features supporting JavaScript  Data Tools Platform managing databases from inside Eclipse
  • 27. Subclipse (installation)  Eclipsse update site: http://subclipse.tigris.org/update
  • 28. 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
  • 29. 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
  • 31. 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)
  • 32. 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