The prototyping cycle consists of the following steps:
- Build the prototype
- Copy the generated prototype to the web server
- Browse to the web-location where the prototype is being served.
This chapter talks about these steps in a bit more detail.
Building a prototype
This is done by letting ampersand work on your script, using the
-proto option. We assume your script file is called
myModel.adl, and your model is called
myModel. Generation of the prototype is then done by the command
ampersand myModel.adl -proto
Without any specific configuration, this would result in the directory
myModel.proto being generated in the same directory as your script is in. This directory contains the files that constitute your prototype.
Copy the generated prototype to the web server
The next step is copying the generated files to the web server. As you will be doing this quite often, you may want to automate this step e.g. by means of a script. Let us assume that
- gendir is the directory that contains the generated prototype files,
- webdir is the directory in which the webserver expects the prototype files.
This step consists of copying all files from gendir to webdir.
- if you used
ampersand myModel.adl -prototo generate the prototype, then gendir would be
- if you use
c:\xampp\htdocs\prototypesfor storing your prototypes on the webserver (as we suggested on the configuration page), then
- If you want to be able to run multiple prototypes at the same time, you may want to use a subdirectory for each of them. In that case, webdir would become e.g.
- If you use XAMPP and are unsure about the location where to put your generated files, have a look at this tutorial.
Running the prototype
Assuming that your webserver and database server are running, all you need to do now is point your browser to the location of the prototype. In the
myModel example, you would want to browse to http://localhost/prototypes or http://localhost/prototypes/myModel.
- Be sure to use a recent browser. We recommend to use FireFox or Chrome (Internet Explorer is known to have some issues here and there).
- You have trouble with the database (e.g. you cannot login, or do not have the correct authorization)? Check out the instructions for creating a properly authorized user
ampersandfor the database.