Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This sample project shows how you can run Spiffy UI using PHP on an Apache HTTP server.
Java PHP
Branch: master
#2 Compare This branch is 6 commits ahead, 1 commit behind maryvogt:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
build
src/main/java/org/spiffyui/hellospiffyphp
.classpath
.htaccess
.project
LICENSE.txt
README.md
build.xml
hellospiffyphp.php
hellospiffyphp_devmode.launch
ivy.xml

README.md

Hello Spiffy PHP - GWT made simple

Hello Spiffy PHP is a sample application using the Spiffy UI Framework. It builds a simple REST application with Apache Ant and runs on PHP.

Building and Running Spiffy UI

Hello Spiffy PHP is built with Apache Ant using Apache Ivy and deployed to PHP. Once you've installed Ant, PHP, and a web server like Apache HTTP, go to your Hello-Spiffy-PHP working copy and run this command:

    <ANT_HOME>/ant

The ant command will download the required libraries and build the Hello Spiffy PHP project.

To deploy the Hello Spiffy PHP application, copy the contents of the target/www directory from your Hello-Spiffy-PHP working copy of to your web server server. Run the application by accessing the index.html file.

Hello Spiffy PHP as a REST application

PHP files normally serve at a specific URL. That works well for searching web pages, but not for REST.

To make our application support the name as part of the URL we're using the Apache mod_rewrite module. This requires your Apache server to have mod_rewrite installed and enabled. If you do then you can just define a rewrite rule in your .htaccess file like this:

   RewriteEngine on
   RewriteRule ^hellospiffyphp/(.*)$ hellospiffyphp.php?name=$1&%{QUERY_STRING} 

This rule will take requests to hellospiffyphp/John and send them to hellospiffyphp.php?name=John. If your server doesn't support mod_rewrite you can just change the client to pass the name as an URL parameter.

Debugging through Eclipse

Depending on your web server's configuration, you will probably need to modify your devmode launch configuration file to use the port of your web server. See Spiffy UI's GWT Dev Mode page for more information.

License

Hello Spiffy PHP is available under the Apache License, Version 2.0.

Something went wrong with that request. Please try again.