Creating an Application
The Istarel Workshop Application Framework has two important command line executables, one to create an application skeleton, and one to create the model object classes associated with the application database.
Create the PostgreSQL database
Each application has as associated PostgreSQL database which must exist before the application installer can be executed. I first create the user which will own the database, and then create the database itself.
psql template1 postgres template1=# CREATE USER iw WITH PASSWORD 'iwpassword' CREATEDB; template1=# \q
createdb -U iwuser --encoding UNICODE --template template0 iwuser
Create the application skeleton
With the database created, the application can now be created.
cd ~/Sites/fw/install php app_install -n Istarel Workshop -w /Users/markf/Sites -a iwuser -d pgsql:iw@localhost:iwuser:iwpassword
Initializing Application... initialize() complete... setApplicationPath() complete... setApplicationName() complete... setFrameworkDirectory() complete... setDatabase() complete... Creating application directories... createDirectory() complete... Creating Apache configuration file... createApacheConfigurationFile() complete... Creating application constants file... createApplicationConstantsFile() complete... Creating front controller... createFrontController() complete... Creating ApplicationDelegate class... createApplicationDelegate() complete... Creating ApplicationSecurityDelegate class... createApplicationSecurityDelegate() complete... Creating Application home page... createApplicationHomePage() complete... Installation Successful!