SleeK Action Wizard is a small program that builds an introductory application
for use with the php.MVC Web application framework.
This program may help new php.MVC developers understand the requirements of
setting-up a new php.MVC application. The various settings and configuration
options have been grouped into individual pages for easier comprehension.
Please review the
php.MVC Users Guide 101 for an introduction to the Model-View-Controller (MVC)
concept. This guide also explains the use of the classes provided with this demo.
This is free software. You can use this program without cost for personal
and commercial php.MVC Web applications.
All care has been taken to ensure the correct operation of this program.
No responsibility will be taken by the developer for any issues arising
from the use of this program. Use this program at your own risk.
The source code for this program is not available for public release.
The SleeK Action Wizard program can be downloaded from this location:
SleeK Action Wizard
Unzip the SleeK Action Wizard archive to a directory - something like:
C:\Dev\ProjectWizard
The program installation does not copy or modify files in any other
directory other than the program installation directory. The program does
not modify the Windows registry in any way.
To remove the program, just delete the SleeK Action Wizard installation directory.
Installing the php.MVC Libraries
The php.MVC Libraries must be installed in your PHP enabled Web server before you
can use the demo application produced by the SleeK Action Wizard.
The latest version of the php.MVC library can be downloaded from this location:
CVS Snapshots. It is usually best to download the latest release (highest
release number/date).
Unzip the php.MVC library archive to a directory - something like:
C:\WWW\phpmvc-base. The php.MVC library can be
installed in a directory not within the Web server root for additional security.
No configuration is needed within the php.MVC library.
The Web Server Directory Layout and Files
The figure below shows how a php.MVC application and the core php.MVC libraries
can be deployed.
The figure below shows the first wizard property page. This is where we enter
the Application Name (1), Application Description
(2) and also the Author Name
(3) if required. The Application Name field will be used as the application
directory, for example C:\WWW\SalesReport\.
Figure 3 below shows the next wizard property page. Here we can enter
the parameters used to setup this application .
Figure 3: The SleeK Action Wizard Page 2
The Application Index File (1) field specifies the main
index file for this application. This file defines the single entry point for this
particular application. You can call this file any name you like, provided it
can be parsed by the web server as a PHP file. You would usually name this index file
Main.php or Index.php
or similar.
The Welcome Path (2) field specifies the default path
for this application, for example
http://www.myhost.com/SalesReport/Main.php.
This is the equivalent of entering a path like
http://www.myhost.com/SalesReport/Main.php?do=welcomeAction.
This path is mapped by the framework to an action mapping in our application XML configuration
file, something like:
The next item defines the ActionDispatcher
(3) class for this application. The framework (Beta-0.4.x or above) supplies a default Action
Dispatcher class , so leave this field set to the default ActionDispatcher
unless you provide a custom Action Dispatcher class.
And the last item on this page defines the Path Pattern (4). This
is the parameter that the framework controller uses to map our path (like
Main.php?do=logon) to the application XML configuration action mapping. You
can change this parameter to suit your application if required, otherwise just use the
default do value.
The following figure shows the settings for the application location, the php.MVC library
location and the operating system type of the Web server.
Figure 4: The SleeK Action Wizard Page 3
The Application Location (1) field specifies where we want
to install this application (within the document root directory of the Web server). The wizard
uses the Application Name field from page 1 as the default application directory
(like C:\WWW\SalesReport). The install path and application
directory name should be changed to suit your requirements. You can use the button on the
right of the field to browse for the install directory.
The Library Location (2) field specifies the directory where we
have previously installed the php.MVC library. The Library Location directory path should
be changed to reflect your setup. You can use the button on the right of the field to browse
for the Library Location directory.
The Set Server OS Type (3) field can be used to define the
operating system type of the Web server if required. The framework should automatically
detect the Server OS type in most cases, so you can leave this field set to the default
auto-select selection (AUTO SEL).
Figure 5 below shows the application configuration files used to setup the application. You
can use the default configuration settings to start with.
Figure 5: The SleeK Action Wizard Page 4
The Application Bootup Configuration File (1) defines the
name and location of the application boot initialisation file. You can move this file
to another location within the WEB-INF directory,
and rename the file if required. For most situations the default location and name
should be used.
The Bootup Configuration Force Compile (2) option is
reserved for future use.
The Application Configuration File Location field (3) defines
the location of the application XML configuration files *. You can specify another
location within the WEB-INF directory if required. For most
situations the default location should be used.
The Module Path field (4) defines the identifier (or path) for
a particular application module/xml configuration file. Double click the field to edit the
configuration file identifier. This option is reserved for future use *.
The Module Config File field (5) defines the XML configuration file
for a particular module *. You can rename this configuration file to something like
phpmvc-config-sales.xml. Double click the field to edit the
configuration file name.
The Force Compile field (6) defines whether to recompile the
module XML configuration file on every request. If the checkbox is checked, the XML
configuration file is recompiled and cached on each request. This is slower but may be useful
during application development, as modifications to some framework or application classes may
not be available until the module XML configuration file is recompiled and cached. Setting the
checkbox to unchecked causes the module XML configuration file to be compiled and cached on
the first request only. This option is faster as the application configuration data is read
from the module configuration cache file ( something like:
phpmvc-config.data). Force Compile should be turned Off
when application development is complete and the site is online. You can do this by opening
the application boot.ini file and editing the Force Compile
option, something like:
The next figure shows the application paths setup. Again we can use the default application
path settings to start with.
Figure 6: The SleeK Action Wizard Page 5
The Define Paths File field (1) defines the path and name of
file used to hold our application paths statements. Note that the path statement is relative
to the application home directory.
The Application Paths (2) list can be used to define the paths
to our application classes and resources as required. For example if we wish to include some
administration classes with this application, we could add an additional path statement like:
WEB-INF\class-admin. And again the path statements are relative
to the application home directory. Double click the field to edit or add a path statement, or
select the field and hit the enter key.
The following figure shows the application prepends setup. And again we can use the default application
prepends settings to start with.
Figure 7: The SleeK Action Wizard Page 6
The Define Prepends File field (1) defines the path and name of
file used to hold our application prepend statements. Note that the path statement is relative
to the application home directory.
The Application Prepend Files (2) list can be used to prepend
(or include) application classes and resources as required. For example if we wish to include some
administration classes with this application, we could add an additional path statement like:
AdminReports.php. The path statements are relative to the
paths defines on page 5 above, and the application home directory. Double click the field to
edit or add a prepends statement, or select the field and hit the enter key.
On this page we can review the application setup. Click Finish to build the application,
or Back to go back to the previous pages. Clicking the Cancel button at any time will
close the SleeK Action Wizard.
On completing the steps covered in the above sections, our new application should
have been created in the specified directory. To run the application point your browser
to the new application directory, for example http://localhost/SalesReport.
An index page will be displayed with two links that can be used to test the
application.
After setting up a default application, you can experiment with various paths and configuration
options. You can use the new application to as a basis for creating your own applications.
The application timer can be turned on or off by editing the $timerRun
variable in the boot.ini file. To enable the timer set the
variable like this: $timerRun = 1;. To disable the timer use
$timerRun = 0;.
Troubleshooting Guide.
Please check the
Troubleshooting Guide first, when having problems with the php.MVC framework.
You may find the answer to your problem has been detailed there, thus saving you the
time of ask for help and waiting for a reply.
Other Guides.
There a several guides on other topics listed here:
User Guides.