Sleek Action Edit | SourceForge - PHP - Freshmeat - Gibson Research - Ubuntu Linux - Clusty Search - Babel Fish Translation - WordReference Dictionaries - Wiktionary - ASP
php.MVC, The Model View Controller Framework for PHP Web Applications
  Free OpenSource Downloads
The Model View Controller Framework for PHP Web Applications
 
spacer Features •  Demos •  Docs •  Design •  Download •  CVS •  Support •  Developers

spacer
SleeK Action Wizard for php.MVC Users Guide
SleeK Action Wizard for php.MVC Users Guide

Contents:
  Introduction
  License Agreement
  Requirements
  Installing the SleeK Action Wizard and php.MVC Library
  Running the SleeK Action Wizard
  Running the New Application
  Customising the Wizard Templates
  Resources

Introduction

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.

License Agreement

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.

Requirements

The SleeK Action Wizard program has the following requirements:

  • A computer running MS Windows: 9x/NT4/W2K/XP (Linux/Wine!).
  • At least 200Kb of free disk space.
  • At least 16Mb of memory.

Installing the SleeK Action Wizard and php.MVC Library

Installing the SleeK Action Wizard

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 Web Server Directory Structure
Figure 1: The Web Server Directory Structure

Running the SleeK Action Wizard

To build a demo application, open the SleeK Action Wizard install directory and double click the ProjectWizard.exe file.

The various property pages in the wizard are covered in the following sections

Page 1 - Application Name and Description

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\.

The SleeK Action Wizard Page 1
Figure 2: The SleeK Action Wizard Page 1

Page 2 - Application Setup

Figure 3 below shows the next wizard property page. Here we can enter the parameters used to setup this application .

The SleeK Action Wizard Page 2
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:

<action  path = "welcomeAction"
         type = "ForwardAction"
        scope = "request"
    parameter = "welcome.tpl">
</action>

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.

Page 3 - Locations and Server OS Type

The following figure shows the settings for the application location, the php.MVC library location and the operating system type of the Web server.

The SleeK Action Wizard Page 3
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).

Page 4 - Application Configuration Files

Figure 5 below shows the application configuration files used to setup the application. You can use the default configuration settings to start with.

The SleeK Action Wizard Page 4
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:

	$appXmlCfgs['config'] = array('name'=>'phpmvc-config.xml', 'fc'=>False); 
Double click the checkbox field to set or unset this option, or select the field and hit the enter key.

* Note Multiple module/xml configuration file support is not yet available in the php.MVC framework (soon).

Page 5 - Application Paths

The next figure shows the application paths setup. Again we can use the default application path settings to start with.

The SleeK Action Wizard Page 5
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.

Page 6 - Application Prepends

The following figure shows the application prepends setup. And again we can use the default application prepends settings to start with.

The SleeK Action Wizard Page 6
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.

Final Page

And the final page is shown in the figure below.

The SleeK Action Wizard Page 7
Figure 8: The SleeK Action Wizard Page 7

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.

Running the New Application

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;.

Resources

The SleeK Action Wizard program can be downloaded from this location: SleeK Action Wizard.

php.MVC Web Sites
The project homepage: www.phpmvc.net.

The SourceForge project page and forums: php.MVC on SourceForge.

The php.MVC Users Guide 101 for an introduction to the Model-View-Controller (MVC) concept.

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.

The php.MVC Library Source CVS Snapshots.

Examples.  There a working examples on task based topics listed here: Other Releases.


Document version: 1.0 - 22-October-2004
Copyright © 2004 John C. Wildenauer. All rights reserved.

Printable Page
spacer

SleeK Action Edit - Code Editor for Windows PHP Logo php.MVC Logo SourceForge
Copyright © 2006 John C. Wildenauer. All rights reserved.