Delphi for PHP Sample Programs Online

By: Tim DelChiaro

Abstract: Run the Delphi for PHP 2.0 sample programs online and download the source

Now you can run the Delphi for PHP sample applications online and see some ways you can use Delphi for PHP to build great looking and powerful PHP applications. The samples cover a variety of topics from simple examples of GUI elements to full applications.

After you view the samples, try Delphi for PHP for yourself by downloading a free trial edition. The sample applications with source are included with the trial and installed by default in C:\Program Files\CodeGear\Delphi for PHP\2.0\vcl\samples.

    GUI Samples

  • AJAX Sample - (Download source)
    Shows how simply is to use AJAX. It features a button, and, when clicked, it calls the server using AJAX and updates the button text and a label caption.
  • Basic Authentication - (Download source)
    Using this component you can easily protect a web page, just by calling the Execute() method, it prompts a browser dialog requesting user/password, you can setup a valid one on the component properties or use an event to validate the ones the user enter.
  • Button - (Download source)
    It shows the different ways to use a Button component, as a regular button, as an image button, or using JavaScript with it.
  • ButtonView - (Download source)
    It features the ButtonView component and how to use JavaScript to know the button clicked, so you can write code which reacts to that event. It uses the qooxdoo library.
  • Canvas - (Download source)
    Shows how to use the Canvas object to generate images by coding
  • Clock - (Download source)
    In this demo you will see the Clock component, a JavaScript clock, with an alarm event you can set to react when the specified time is reached.
  • Frames No DB - (Download source)
    Here you will see a Frame/FrameSet sample, is really easy to create a framed website using the Frame and FrameSet components and the Align properties, as all the layout is created by the Page component.
  • Get Styles from StyleSheet - (Download source)
    This demo features the StyleSheet component and how to use it to extract the styles from a .css file. It has properties to allow you select the type of styles you want to get.
  • GroupBox - (Download source)
    This sample shows how to use the GroupBox component, which allows you to group several components inside a frame with a label.
  • Internationalization - (Download source)
    Here you will see how to localize the visual interface of your application and also the strings inside your source code using gettext.
  • Inheritance - (Download source)
    Here you will see how to create a master page to isolate the common aspects of your application and the, how to inherit from it to create the content pages of your website. This way, you can change common aspects of your application in a single place without modifying all pages.
  • I18N - (Download source)
    This demo shows how to change the active language dynamically on your web application.
  • Layouts.ColAndRowLayout - (Download source)
    Layouts are an easy way to create resizable interfaces, this demo shows you how to use the Col and Row Layouts and how controls inside react when you change their dimensions.
  • Layouts.GridBagLayout - (Download source)
    To create layouts like tables or grids, you can use the GridBag layout, in which every control is assigned to a cell inside the grid, the amount of cols and rows are determined by the Cols and Rows properties of the Layout property of the page or panel.
  • ListBox - (Download source)
    This demo features a ListBox and how you can use an array property like Items.
  • MainMenu - (Download source)
    MainMenu components can be really nice to create desktop-like interfaces, here is a nice sample.
  • MainMenu2 - (Download source)
    MainMenus can have attached server events or JavaScript events, this demo shows you how to react when the user clicks on an item, depending on what you want to do.
  • PageControl - (Download source)
    PageControl component allows you to create stacked interfaces, in which controls are shown depending on the active page of the PageControl, this is really useful for administrative interfaces to show options for the user to be setup.
  • Parent Properties - (Download source)
    There are properties called "Parent" ones that specify, if true, the control must use the property value from its parent, here is a demo.
  • Progress Bar - (Download source)
    You can use a ProgressBar to show percentage-like indicators to your user, this demo shows you how.
  • ScrollBar - (Download source)
    ScrollBars can help you to create more powerful interfaces by scrolling information, here is a basic sample.
  • SimpleChart - (Download source)
    SimpleChart component allows you to show graphical information to your user, charts can be of several types and this demo features the common usage of the component.
  • Templates - (Download source)
    Templates is a powerful feature of the VCL for PHP, because allows you to get the best of the HTML+CSS world and the best of the VCL for PHP to create dynamic interfaces. Checkout also the template documentation on the User's Guide.
  • TrackBar - (Download source)
    A TrackBar component is useful to let the user select a value in a dynamic fashion.
  • Webservice - (Download source)
    Web Services let you publish part of your application to the world by creating services, then, any external application can consume that services to make use of the features your application provides. Here is a sample on how to create a web service using Delphi for PHP and a Windows client using Delphi for Win32.
  • Webmail - (Download source)
    A sample showing the usage of graphical advanced components, thanks to the qooxdoo library.
  • Windows No DB - (Download source)
    To create desktop-like interfaces you can use the Window component, a container to place components inside and when running in the browser, it mimmics a window you can move, resize, maximize, close, etc. You can also create modal dialogs.

    Data Samples

  • Ajax.Database - (Download source)
    Database example using Ajax to switch the table to browse on a DBGrid, it features a listbox filled with all tables on a database and then, clicking on the listbox, calls the server using ajax to change the tablename of the table component, which makes the dbgrid to get updated.
  • Dataset Events - (Download source)
    In this sample you will see the events fired on a dataset.
  • DBGrid - (Download source)
    DBGrid control allows you to show a dataset in a tabular format and also, when changing the value of a cell, it posts the data to the server using AJAX, so it doesn't refreshes the browser.
  • Master Detail - (Download source)
    A sample showing Master-Detail with two DBGrids, it uses AJAX to switch the detail according to the MasterFields mapping.
  • Query - (Download source)
    This samples shows you how to use a Query component to issue parameterized SQL statements.
  • RowChanged - (Download source)
    A sample showing how to react to the RowChanged event of the DBGrid.
  • Frames - (Download source)
    A frame/frameset sample showing how easy is to created framed interfaces and using a DBRepeater to switch the contents of the active frame.
  • Simple Management - (Download source)
    A management of a database using simple techniques.
  • Simple Management and JS - (Download source)
    A sample showing how to manage a dataset and use JavaScript to add more interactivity.
  • Windows - (Download source)
    Features a Window control with a DBGrid inside, you can move the Window inside your browser and also show a modal dialog.
  • DB Events - (Download source)
    In this sample you will see the events fired on a database

    Full Applications

Server Response from: ETNASC04