Web Authoring
  Home arrow Web Authoring arrow Page 3 - Deploying your Site with phpEclipse
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB AUTHORING

Deploying your Site with phpEclipse
By: PACKT Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2006-03-09

    Table of Contents:
  • Deploying your Site with phpEclipse
  • FTP, SFTP, and WebDAV Export
  • Using Ant for Deployment
  • Setting up Ant for FTP

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Deploying your Site with phpEclipse - Using Ant for Deployment


    (Page 3 of 4 )

    You may have heard of Ant in the Java development world. Being a pure Java tool, Ant is often called 'the Java version of make'. With Ant, you create scripts called build files that are interpreted by the Ant parser. These scripts aid you in Java development by compiling your code and deploying it in your build directory. For both small home-grown projects and large Java enterprise environments, Ant has become an absolutely critical tool for Java developers. In the PHP world, though, we do not have any code to compile, and often, FTP is adequate for moving files into production. Why, then, as PHP developers, do we care about Ant?

    In some business environments, production web servers are tightly controlled. Developers are not allowed anywhere near the servers, let alone pushing out code at their whim. The sheer act of deploying new code often occurs only after a long ritual of meetings and approvals at various levels. In these environments, deployment occurs with a script that automates the delivery of an application from one area to the production site. Ant scripts can do this job for you for applications in any language.

    Even if you are not working in such an environment, why would you use Ant? A key benefit is Ant's integration with CVS and Subversion. Using Ant, you can write a script to grab all files in the repository with a certain tag and FTP them to a production server. Imagine the time saved and reduction in human error with this. In a large application with PHP class files in one directory, HTML view files in another, JavaScript files in their own separate directory, and stylesheets in yet another, a deployment involves a huge effort and it is difficult to keep track of what has changed.

    At deployment time, you have to check out all the correct files from CVS or Subversion and then FTP all of them again to the production web server. If all you have to do is tag a file at the end of testing, you have drastically reduced the chance that you'll miss something when retrieving from the code repository or FTPing.

    Finally, Ant scripts are easy to write. Being XML-based, these scripts are fairly simple and intuitive. If we were not concerned with code cleanliness, it would take only one line of code to check out a project from the code repository, and another line to FTP files. The reference documentation is excellent. If you require any more support, Ant is supported by a large user base and online community. Being an Apache Foundation project doesn't hurt its popularity either.

    Eclipse integrates Ant smoothly into our development environment. Included with the JDT, Eclipse has a nice Ant editor, templates, and tag help. You can execute them directly from Eclipse. Let's walk through an example using CVS.

     


    The official Ant release does not support Subversion. Luckily, Ant employs an extensible architecture like Eclipse. Tigris.org, the developer of Subversion, has created an Ant task called svnAnt that allows Ant to interface with Subversion repositories. More information about this proect is available at http://subclipse.tigris.org/svnant.html

     

    More Web Authoring Articles
    More By PACKT Publishing


       · This article is an excerpt from the book "PHPEclipse: A User Guide," published by...
     

    Buy this book now. This article is excerpted from PHPEclipse: A User Guide, written by Shu-Wai Chow (Packt Publishing, 2006; ISBN: 1904811442). Check it out today at your favorite bookstore. Buy this book now.

    WEB AUTHORING ARTICLES

    - Yahoo Pipes: Worth a Look
    - Completing an EAR
    - Building and Deploying an EAR
    - New Nuke Security Sentinel: Worth Taking a C...
    - Administering Your CMS-Based Web Site
    - What You Need to Know Before Using a CMS
    - Introducing the Google Maps API
    - An Overview of the Yahoo User Interface Libr...
    - Basic configuration of osCommerce, concluded
    - Basic configuration of osCommerce, continued
    - Basic configuration of osCommerce
    - Deploying your Site with PHPEclipse, continu...
    - Deploying your Site with phpEclipse
    - Macromedia Captivate Review
    - Macromedia and Adobe Planning to Tie the Knot







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT