Author: Leon Barnard
This document is a specification of the NetBeans IDE New Project Wizard for PHP Projects. This document applies to the Preview Release only.
Table of contents:
The User is running a local web server on his/her machine (e.g. Apache). This means that all files located inside of a specific directory (e.g. "apache/htdocs") will be accessible via HTTP. The user would like to edit files directly inside their web server documents directory or would prefer to edit their files in their NetBeans Projects directory and copy them to the web server documents directory.
- Inside NetBeans, the user invokes the new project wizard and selects PHP Project from the project choices.
- On step 2, the user enters the basic project information and is then presented with a list of choices for the "Sources Folder" field. The default choice is "
\web", which means that the source files will be stored in a sub-directory of the Project Folder called "web". If the user opens the combo box, they will see a list of web server document root folders that have been located by NetBeans during initialization of the wizard. NetBeans does this by searching for "httpd.conf" or other web server configuration files that are stored in default or predictable locations on the user's machine, which provide information about valid document root folders. By default, the folder will be appended with "\web", but the combo box will be editable.
- The user will also see an item at the bottom of the list labeled "Search for Web Server installations...", which allows the user to specify the location of "httpd.conf" or other web server configuration files that were not located by NetBeans, in order to provide more choices of valid document root folder locations. This feature is intended to help novices who know that they have a web server installed, but don't know much about how to publish files to it.
- Below the Sources Folder field, the user is asked to specify the URL that the project will be published to, so that NetBeans knows where to direct the browser when the project is run. This information is often provided in the web server configuration file, so it will be populated automatically in these cases. To help novices, inline help text will be provided below the field. This field is not required.
- The user is asked to specify the default encoding for their project files. The initial selection will be chosen based on the user's operating system.
- Finally, the user is asked whether NetBeans should create an index file when the project is created. This option will be enabled by default unless the user has selected a project sources directory which contains one or more php files (if the user has existing sources, they likely don't want to create a new, empty php file by default). If the user attempts to create an index file with the same name as one in an existing sources directory, they will be warned that the specified file name already exists and asked to provide a different name. The default name for the index file will be index.php, but the field name will be editable. The name of the location for the index file will be shown below the field (e.g. "http://localhost/PhpProject1/index.php").
- The user may click "Finish" on this step or "Next" to move to Step 3, which is optional.
- On step 3, the user is asked whether they would like to copy their source files to another location. This feature supports the use case that a user wants to store their files inside their NetBeans project directory and copy them to their web server document root. If the user checks the box, the field to choose the location to copy files to becomes enabled. The choices in the list box will be similar to those in the Sources Folder field in that known document root folders will be listed as well as the ability to search for Web Server installations.
- The user clicks "Finish" and the project is created.