You are previewing PHPEclipse: A User Guide.
O'Reilly logo
PHPEclipse: A User Guide

Book Description

Take advantage of the leading open source integrated development environment to develop, organize, and debug your PHP web development projects.

  • Compact guide to using Eclipse and PHPEclipse for web development

  • Slash development time by improving the efficiency of your PHP coding and organizing your projects in the PHPEclipse environment

  • Learn to use Eclipse for debugging PHP applications, interfacing with databases, and managing source code

  • No previous knowledge of Eclipse required

  • In Detail

    The fusion of Eclipse, the leading open source development environment, and PHP is an exciting prospect for web developers. This book makes sure that you are up and running as quickly as possible, ready to take full advantage of PHPEclipse's tuned PHP development tools, without requiring any prior knowledge of Eclipse.

    You will begin with installing and configuring PHPEclipse, before moving onto a tour of the Eclipse environment, familiarizing you with its main components. As a plug-in to Eclipse, PHPEclipse is able to harness the platform to provide a rich and powerful development experience.

    For helping you improve the efficiency of your PHP coding, the book details the powerful editing features of PHPEclipse, and shows you how to use it to better organize your application code.

    You will see how PHPEclipse helps you throughout the development lifecycle, and learn how to use PHPEclipse's debugger to troubleshoot and step through your PHP code as it executes. The book rounds off with coverage of accessing databases and managing source code from within the . For the final step for your application, you will learn how to deploy your site to a production server.

    PHPEclipse brings PHP functionality to the Eclipse platform, enhancing it as an environment for developing web applications and focusing on what PHP web developers need to create an application. PHPEclipse's development is active and its tool-set provides everything you need to write web applications in PHP.

    Table of Contents

    1. Copyright
    2. Credits
    3. About the Author
    4. Acknowledgements
    5. About the Reviewer
    6. Preface
      1. What This Book Covers
      2. What You Need for This Book
      3. Conventions
      4. Reader Feedback
      5. Customer Support
        1. Downloading the Example Code for the Book
        2. Errata
        3. Questions
    7. 1. Overview of Eclipse and PHPEclipse
      1. Integrated Development Environments
        1. Advantages of Using an IDE
        2. Disadvantages of Using an IDE
      2. IDEs in Development Projects
      3. Eclipse
        1. A History of Eclipse
        2. IBM and OTI
        3. The Eclipse Foundation
      4. The Eclipse Architecture
        1. Plug-Ins
        2. The Workbench Plug-In
        3. Standard Widget Toolkit
      5. Why Use Eclipse?
        1. Eclipse is Extensible
        2. Eclipse is Free
        3. Eclipse Frees You from Vendor Lock-In
        4. Cross-Platform
        5. Professional Features
      6. PHPEclipse
      7. Summary
    8. 2. Installation
      1. Installing Apache/PHP
        1. Windows
        2. Mac OS X
        3. Linux
        4. Testing Apache
        5. Testing PHP
      2. Installing Java
        1. Windows
        2. Mac OS X
        3. Linux
        4. Testing Java
      3. Eclipse
        1. Downloading Eclipse
        2. Installing Eclipse
      4. Installing PHPEclipse
      5. Putting It All Together
      6. Summary
    9. 3. The Eclipse Interface
      1. Starting Eclipse
      2. The Eclipse Welcome Screen
      3. Perspectives
        1. Changing Perspectives
      4. Quantum DB Perspective
      5. Editors
      6. PHPEclipse Views
        1. Navigator View
          1. Working Sets
        2. Console View
        3. Problems View
        4. Outline View
        5. Bookmarks View
        6. PHP Browser View
      7. Personalizing Your Perspectives
        1. Customize Perspectives
        2. Perspective Layouts
          1. Save Perspective As…
          2. Reset Perspective
          3. Close Perspective
          4. Close All Perspectives
      8. Summary
    10. 4. Writing PHP Code with Eclipse
      1. Creating a Project
        1. Adding Directories
        2. Creating PHP Files
        3. Code Templates
      2. The Editor
        1. Editor Visual Aids
        2. Customizing the Editor
      3. Creating a Web Application
        1. Setting Up the Database
        2. Setting Up the Project
        3. Creating the Objects
        4. Creating the View Files
        5. Writing the Database Class
        6. Writing the Pet Class
        7. Writing the Cat Class
        8. Writing the View Class
        9. Eclipse Web Tools Platform Project
          1. Installing the Web Tools Platform
            1. Installing on Linux and Windows
            2. Installing on Macintosh
        10. Writing the View Page
      4. HTML Cleanup Using HTML Tidy
      5. Code Documentation Using phpDocumentor
      6. Summary
    11. 5. Testing and Debugging
      1. About the Debugger
      2. Installing the Debugger
        1. Installing DBG
          1. Precompiled Binary Instructions
          2. Compiling DBG Yourself
        2. Configuring php.ini to Use DBG
          1. Testing Your PHP Installation
      3. Configuring Eclipse as the Debugger Client
        1. Specifying an Interpreter
        2. Creating a Debugging Configuration
      4. Troubleshooting Tips
      5. How to Use the Debugger
        1. Debug View
        2. Variables View
        3. Breakpoints View
        4. Console, Editor, Outline, and PHP Browser
      6. Navigating Through a Debugging Session
      7. Debugging Strategies
        1. Working with Variables
          1. Debugging Arrays
          2. Debugging Objects
          3. Changing Variable Values
        2. Forms, Cookies, Session, and Server Variables
        3. Watching Variables
        4. Run
      8. XDebug
        1. Installing XDebug
          1. Windows Installation
          2. Mac OS X/Linux Installation
          3. Configure php.ini
      9. Summary
    12. 6. Using the Quantum DB Plug-In
      1. Relational Databases
        1. JDBC
      2. The Quantum DB Plug-In
        1. Setting Up the Environment
          1. The Development Database
          2. Downloading and Installing the MySQL JDBC Driver
        2. Using the Quantum DB Plug-In
          1. Setting Up a Database in Quantum DB
          2. Using a Database in Quantum DB
          3. Writing SQL Statements
          4. Working with the Quantum Table View Result Sets
          5. Quantum DB Shortcuts
      3. Summary
    13. 7. Version Control
      1. Version Control Overview
        1. Terms and Concepts
      2. Installing and Setting Up CVS
        1. Windows Installation
        2. Macintosh Installation
        3. Linux Installation
        4. Macintosh and Linux Configuration
      3. The CVS Repository Perspective
        1. Adding a Repository
        2. Adding a Project to CVS
        3. Committing and Updating
        4. CVS Annotate View
        5. CVS Resource History
        6. Tagging
        7. Branching
        8. Merging
      4. Subclipse
        1. Viewing a Subversion Project
      5. Summary
    14. 8. Deploying Your Site
      1. Setting Up a Test FTP Server
        1. Windows
        2. Macintosh
        3. Linux
      2. .FTP, SFTP, and WebDAV Export
      3. Using Ant for Deployment
        1. Setting up Ant for FTP
          1. Downloading
          2. Installing
          3. Adding Files to the Ant Classpath
        2. Creating Our Sample Ant Build File
        3. Running an Ant Script
        4. Ant Tools
      4. Summary
    15. 9. Plug-ins and Plug-in Sites
      1. Community Sites
      2. Notable Language Plug-ins
    16. 10. The Eclipse Update Manager
      1. Installing New Plug-Ins
        1. Installing PHPEclipse
      2. Updating Current Software