What's new in Delphi for PHP 2.0

By: Tim DelChiaro

Abstract: Overview of new features in version 2.0 of Delphi for PHP

    What’s New in Delphi for PHP 2.0

Delphi for PHP 2.0 provides a big step forward in functionality and performance.

  • IDE enhancements in the new version enable you to do more and get your work done faster. New features and enhancements like the visual designer support for templated forms and multilanguage support give you more flexibility to build great looking Web applications. Other features and enhancements like designer guidelines, profiling, file management and filtering make you more productive by providing quicker access to the information you need.
  • The Code Editor has received a major overhaul for improved performance and stability as well many new advanced editing features like code folding, error insight, a change tracking bar, sync edit and source code formatting that help you better understand, manage and navigate your source code.
  • The new Database app development features in Delphi for PHP 2.0 make it easier than ever to build database applications with less coding. New native components for Oracle and new support for seven additional databases in the Data Explorer give you more choices and the new ability to drag and drop from the Data Explorer to the visual designer enables you to quickly build database apps with no handwritten code.
  • Improved documentation and additional samples to help you understand how to use the IDE and the VCL for PHP components to build real world applications.

Here are more details on some of the new and enhanced features in Delphi for PHP 2.0.

    New and Enhanced IDE Features

    Form Designer

The Form Designer has been enhanced to provide smoother movement, guidelines and better hint support

Hide image
Click to see full-sized image

    HTML Designer

The HTML designer provides visual capabilities to edit basic HTML files plus the ability to drag and drop HTML elements such as HTML labels, HTML Drop Down and HTML button controls from the Tool Palette.

Hide image
Click to see full-sized image

    Templated Form Designer

The new Templated Form Designer is an extension of the HTML designer which adds the ability to work with PHP components. When working on a templated form, PHP components can be dropped inside the HTML designer, and behave like any other HTML element.

Hide image
Click to see full-sized image

    Visual Designer Guidelines

Guidelines appear as you move UI elements to make it easier to align multiple items.

Hide image

    Tool Palette

The Tool Palette contains default VCL for PHP visual and non-visual components you can add to a form. You can also create custom components based on the VCL for PHP components and install them on the palette for future use in your application development.

Now includes filtering capabilities. Just click the funnel and start typing to filter the component list and quickly find the component you’re looking for.

Hide image

    File Browser

Use this Windows-style File Browser to view files and directories and to perform simple operations on files while you are running the IDE. The File Browser supports standard Windows context menu options and the user can drag and drop PHP, text and other files from the file browser to the editor window and the file will be opened in the editor.

Hide image

    Object Inspector

Use the "Object Inspector" to set the properties and events for the currently selected object.

The Object Inspector has been rewritten in version 2.0 and now features subproperties, references and is much faster

Hide image
Hide image

    Multilanguage Support

This feature allows the IDE interface to be shown in different languages using translations provided by the Delphi for PHP community. Select a language from a drop-down menu under Tools|Options and restart the IDE to have the IDE interface appear in a different language. Spanish, Portuguese, Chinese, German and Japanese localizations are included. (Note that this localization is for the IDE interface only; the IDE help file and VCL for PHP help file are available in English only)

Hide image
Click to see full-sized image

    Status Bar

The status bar at the bottom of the editor/designer window provides access to a variety of information and tools including the macro toolbar, cursor position, insert/overwrite and tabs for switching between code view, design view for visual modules and template code for templated forms.

Redesigned to provide better visualization

Hide image

    Adding Folder Contents to a Project

This option allows you to add, in a single action, several source files to your project, right click on a project and select Add Folder to Project..., a dialog will popup requesting the folder to add.

Hide image

Hide image

    Profiler

The profiler lists the lines of code that have been executed, the times have been hit and the time spent on each hit.

Hide image
Click to see full-sized image

    New and Enhanced Editor Features

    Error Insight

This new feature provides syntax checking as you type, so you can easily fix syntax errors before running your scripts.

Hide image

Clicking the error message takes you to the line of code where the error was identified.

Hide image

    Code Insight

CodeInsight displays a list of symbols that are valid at the cursor location as you type or when you press Ctrl+Space. Just arrow down and press Enter or double click to insert the highlighted item into your code.

Hide image
Click to see full-sized image

Lot of improvements on this feature to allow you browse through your application code and to get more information using PHPDoc comments. Plus faster performance.

Hide image
Click to see full-sized image

    Code Folding

Source code is structured in blocks according to open and closed braces {} and each block can be collapsed using the plus marks (+) at the left side of the editor, just at the right of the gutter.

Hide image

    Sync Edit

Using this new feature, you can modify common parts of your code at the same time.

A sync range is a selection of the text that can be edited in a special way, if there is more than one identifier/word that is repeated on the range, a change in any of them will change the rest of them.

To create a sync range, select a portion of text and click on the button in the gutter, you will be able to write on the blocks of the code, changing all identifiers at once.

Hide image

    Tracking Band

This band, located in the left margin of the code editor window, allows you to check which lines you have modified/added and which ones were modified on the last save operation.

  • Modified lines are set to yellow. When you save the file, these lines turn to green so you see what was modified.

Hide image

    Macro Recording and Playback

You can record a specific set of actions in the code editor and repeat them later, you can use the mouse and click on the bottom of the code editor to start/stop/play a macro, or you can use the Shift+Ctrl+R (start/stop) or Shift+Ctrl+P (play).

This feature has been completely reworked to work better in version 2.0.

Hide image

    Syntax check

Syntax Check performs a lint on the active file.

Hide image

Results are shown in the Messages window at the bottom of the screen.

Hide image
Click to see full-sized image

    Source Formatter

The source code formatter allows you to format a PHP source code using a configurable set of options. Source code formatting is useful to improve consistency and readability of code.

Hide image

    New and Enhanced Database App Development Features

    Data Explorer

Use the Data Explorer to add a new connection, modify, delete, or rename your database connections. You can browse database server-specific schema objects including tables, fields, stored procedure definitions, triggers, and indexes. Additionally, you can drag and drop data from a data source to a project to build your database application quickly.

Added support for DB2, Oracle, Informix, Microsoft SQL Server, Sybase, SQL Anywhere and PostgreSQL in addition to the support for InterBase and MySQL that were available in the previous version.

Hide image

    Drag and Drop Database App Development

Delphi for PHP makes it easy to build database applications via drag-and-drop. For example, drag a table name from the Data Explorer to the visual designer to automatically create an application to browse the table data. All your connections are set up automatically.

Hide image
Click to see full-sized image

Then click the Run button to run your app in a browser. You get an AJAX-enabled, editable grid display of your database table in the browser with zero lines of handwritten code.

Hide image

    Data Viewer

The Data Viewer Data tab shows a DBGrid browsing the dataset selected in the Data Explorer

Hide image
Click to see full-sized image

Use the Data Viewer SQL tab to execute a SQL query against the dataset selected in the Data Explorer and display the results

Hide image
Click to see full-sized image

    New and Enhanced VCL for PHP Features

    Native Components for Oracle

OracleDatabase

OracleDatabase provides discrete control over a connection to a single Oracle database in a database application.

Hide image

OracleTable

OracleTable encapsulates a database table in a MySQL server.

Hide image

OracleQuery

OracleQuery represents a dataset with a result set that is based on an SQL statement.

Hide image

OracleStoredProc

OracleStoredProc encapsulates a stored procedure in an application.

Hide image

    Zend Framework Components

ZACL

The Zend ACL component is the common ancestor of all component classes

Hide image

ZAuth

ZAuth provides a component able to authenticate using dispatchers, so changing the dispatcher, allows you to authenticate using different mechanisms.

Hide image

ZAuthDB

Base class for adapters to be used with the ZAuth component.

Adapters inherit from this class, which provides a method to authenticate, which is called by ZAuth with the appropiate parameters, to know if the specifier used has been already authenticated or to authenticate it.

Hide image

ZAuthDigest

Base class for adapters to be used with the ZAuth component.

Adapters inherit from this class, which provides a method to authenticate, which is called by ZAuth with the appropiate parameters, to know if the specifier used has been already authenticated or to authenticate it.

Hide image

    New and Enhanced Documentation Features

    Context sensitive online help

Online help for the development environment is available via F1 in the IDE

Hide image
Click to see full-sized image

    Documentation wiki

A new documentation wiki is accessible via the online help to provide the latest doc updates.

Hide image
Click to see full-sized image

    VCL for PHP class library documentation

Enhanced for version 2.0 to include better navigation, more information, and code examples

Hide image
Click to see full-sized image

Tab through the help window to see information on available Properties, Events and more.

Hide image
Click to see full-sized image

Hide image
Click to see full-sized image

    Sample programs

Delphi for PHP 2.0 includes even more sample programs that demonstrate usage for a wide variety of the VCL for PHP components and serve as a great starting point for building your own applications or better understanding how to build real world applications.

Hide image
Click to see full-sized image

    PHP Reference Guide

New in Delphi for PHP 2.0, you can choose to install PHP Reference Guide in your choice of languages including English, Japanese, Spanish, Portuguese, Chinese

Hide image

Server Response from: ETNASC02