Getting Examples to work

All of the Agile Toolkit documentation is filled with numerous examples. Most of the examples will also have a preview which is executed in real-time such as the one below:

Result

 

Code

$button=$page->add('Button')
    ->
setLabel('Button')
    ->
js('click')
        ->
univ()
        ->
alert('My First Button');

Start by running this example in your local copy of Agile Toolkit. Select the code and "copy" it with Ctrl+C (Cmd+C on Mac). Open the file located in page/index.php, and place it inside the "init()" method.

Refresh your browser window and you should now see your new button on your page and be able to click it to trigger alert.

Congratulations. You have just executed your first application in Agile Toolkit.

About the Look and Feel?

With Agile Toolkit, your code is separated from the "look and feel" of the page. It depends on the theme you have selected and your "local" templates. You will be able to customize the look very soon, but for the time being I will focus on developing application "Logic".

Interraction with browser