Book Image

PHPEclipse: A User Guide

Book Image

PHPEclipse: A User Guide

Overview of this book

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."
Table of Contents (12 chapters)
11
Index

Integrated Development Environments

IDEs are simply programs to write programs. They are generally editing environments with tools to help programmers write code quickly and efficiently. As an example, we can create PHP‑driven web applications using a combination of Eclipse and PHPEclipse. Core features typically include:

  • Code completion or code insight: The ability of an IDE to know a language’s keywords and function names is crucial. The IDE may use this knowledge to do such things as highlight typographic errors, suggest a list of available functions based on the appropriate situation, or offer a function’s definition from the official documentation.
  • Resource management: When creating applications, languages often rely on certain resources, like library or header files, to be at specific locations. IDEs should be able to manage these resources. An IDE should be aware of any required resources so that errors can be spotted at the development stage and not later, in the compile or build stage.
  • Debugging tools: In an IDE, you should be able to thoroughly test your application before release. The IDE may be able to give variable values at certain points, connect to different data repositories, or accept different run-time parameters.
  • Compile and build: For languages that require a compile or build stage, IDEs translate code from high-level languages to the object code of the targeted platform.

Requirements for these features vary substantially from language to language. Thus, traditionally, an IDE specializes in one language or a set of similar languages. Some famous IDEs and their languages include: JBuilder for Java; Metrowerks CodeWarrior suite for Java, C, and C++; and Microsoft’s Visual Studio for its Visual Basic and C# family of languages.

Advantages of Using an IDE

Using an IDE will save you a lot of effort in writing a program. Some advantages include:

  1. Less time and effort: The entire purpose of an IDE is to make developing faster and easier. Its tools and features are supposed to help you organize resources, prevent mistakes, and provide shortcuts.
  2. Enforce project or company standards: Simply by working in the same development environment, a group of programmers will adhere to a standard way of doing things. Standards can be further enforced if the IDE offers predefined templates, or if code libraries are shared between different team members/teams working on the same project.
  3. Project management: This can be twofold. First, many IDEs have documentation tools that either automate the entry of developer comments, or may actually force developers to write comments in different areas. Second, simply by having a visual presentation of resources, it should be a lot easier to know how an application is laid out as opposed to traversing the file system for arcane files in the file system.

Disadvantages of Using an IDE

Be careful of some of the pitfalls of using an IDE as it may not be ideal for everyone and might not be suitable in every situation.

  1. Learning curve: IDEs are complicated tools. Maximizing their benefit will require time and patience.
  2. A sophisticated IDE may not be a good tool for beginning programmers: If you throw the learning curve of an IDE on top of learning how to program, it can be quite frustrating. Further, features and shortcuts for experienced programmers often hide crucial but mundane details of a language. Details should not be overlooked when learning a new language. Using an IDE may hamper the learning of a new language.
  3. Will not fix bad code, practices, or design: You still need to be proficient and meticulous. An IDE will not eliminate efficiency or performance problems in your application. IDEs are like paintbrushes. Whether you create a Van Gogh or a Velvet Elvis is dictated by your skill and decisions.