Easier kick-start with Sample Project

Sunday, September 19th, 2010|Beginner tips|by Romans

For each project it usually takes some time to set up basic things. We wanted to make it easier for people who are only starting with Agile Toolkit. So we are now including a sample project, which you can “svn export” to get started much faster.

Exporting sample project

First you will need to have a directory set-up. It should be somewhere on your web-url.

First you need to get Agile Toolkit. It is not hosted with GitHub, so create a new directory and check-out the framework first:

git clone https://github.com/atk4/atk4.git

Then it’s good idea to copy a kick-start sample project

cp -aR atk4/tools/sampleproject/* .

cp atk4/tools/sampleproject/.ht* .

If you planning to use add-ons (such as MVC, Filestore, Billing backend and CRM integration):

git clone https://github.com/atk4/atk4-addons.git

If you are not installing into webroot, then edit config.php file and specify path to the project inside webroot. For instance if you open mysite.com/a/b/, then base_path should be /a/b/atk4/.

Once you done that, you should be able to open new project in the browser and login using u: demo, p: demo

Edit files you have copied over from the sample project and follow documentation on http://atk4.com/

What is included?

  • project is using default JUI skin
  • authentication is verified. Use demo / demo to login
  • comes with 5 pages
  • dashboard. It demonstrates how can you add index pages with some dynamic content through API’s method
  • My Project page – it demonstrates how can you redefine Page class to create your pages with custom template
    • template/jui/page/project.html illustrates how you can use text and tags for your pages, which designer can easily edit
    • page/project.php illustrates how you can use Grid with add, edit and delete functions implemented through js Dialog, expander and button respectively
    • page/project/edit.php shows how you can unite editing and adding of entries into same form / page. It also illustrates how you can reload page
    • use of javascript to show success messages on record add, edit or delete.
  • Users (page/users.php) illustrates how same thing can be done with Controllers and Models.It uses built-in Page_EntityEditor
  • Preferences page contains a sample MVCForm.
  • About page demonstrates how you can use a completely static page

All the code is extremely documented and should not give you any difficulties to understand and continue with your own models, controllers, pages etc.


Posted September 21, 201012:30 pm

you should set this up somewhere and add url, so that one could see the live preview.

Posted September 23, 20106:52 am

yeah, im also going to create a downloadable .zip package which you can slap into your web-root and you have a working project.

Svetlozar Kondakov
Posted September 24, 20108:36 pm

Finally a good example of the framework. An URL and ZIP package is a good idea!

Posted September 25, 20101:15 am

It’s now released. Enjoy:


Posted April 20, 20117:49 am


In the examples of the version 4.0.3 is missing the line $this->api->dbConnect(); in the init of the front end api, and is missing the line $m->addMenuItem(‘Usuarios’,'users’); in the initLayout of the front end api too, with those two fixes the example will work entirely.

Posted April 21, 201112:30 am

Hi Mariano.

Thanks. I think we don’t have the users page anymore. If it is there, then my mistake i’ll take it out. There are plenty of examples on agiletoolkit.org already, so putting them in atk4-example could be too much, since it’s used for starting new projects.

As for the db connection, we want to have agile toolkit work out of the box and requiring user to set up database just to see something working would be too much I think. There is a page for db connection testing.

Anyways – thanks for your suggestions!