Agile Toolkit 3.8rc1 released

Tuesday, May 11th, 2010|Version 3|by Romans

I am glad to announce that ATK3.8 based on the changes I have previously mentioned as “pathfinder branch” are now been made into 3.8rc1 release. This will be one of the few releases we will have before going into 4.0

BTW: Further ATK repository is stored at ActiveState FireFly:

Download: amodules-3.8rc1.tgz

What’s New?

Form changes:

  • Form->addField chaining is now obsolete. addField() now returns Form_Field object.
    • This will have the biggest effect on your current code. If you have been using Form->addField()->addField() chaining, it’s not going to work anymore. Return value of addField is no longer form ($this) but it is a newly added field. Functions such as validateNotNull, setNoSave, setValueList have been re-factored into Form_Field and removed from Form.
    • Form->last_field is now obsolete. If your code relied on it, please update your code.
    • Form->set() now requires 2 arguments first being field name.
  • Form->addSubmit() and Form->addButton() both return Button class now. They used to return js chain before.
    • Button::redirect() was added as a shortcut for $f->addButton()->redirect(page2); – this will keep your code compatible
  • Old JS was removed.
    • Since we have introduced new JS routines, there are no need for old onXXX handlers. Form have been cleaned up from those.
    • obsolete: Form::submitOnEnter()
    • obsolete: Form::getAjaxSubmitAction()
    • obsolete: Form/Field::onChange(), onKeyPress()
    • obsolete: addAjaxButtonAction()
  • Refactoring
    • addDefaultButton() – do not use for now, support might be coming in next version
    • addCondition() renamed into setCondition(). addCondition() is still there for compatibility until next major release.
    • addConditionFromGET() renamed into addConditionFromGET(). Compatibility will be also maintained until next release.
  • Added
    • Form::hasField() – returns field object or false if field does not exist. see also getElement();
  • obsolete: Form::setDefault()

New Page Management Classes

This release introduces number of classes to aid in detection of current page, getting links to other pages and other resources.

  • PageManager – ($this->api->pm) analyses requested document and properly determines path and page.
    • There are no need to define any variables in .htconfig (ie. URL_ROOT). It is now being detected properly.
  • URL – this class is now being returned by $api->getDestinationURL(). The primary reason is to avoid malformed URLs if getDestinationURL is called multiple times. Therefore other functions $api->redirect(), etc will be calling getDestinationURL explicitly, so that you don’t have to. However if you do – it would still work. Also introduced relative page locations such as ‘./add’ or ‘../otherpage’.
  • PathFinder – class now in charge of all file resources. It contains configuration of available resources, such as javascript libraries, templates, temporary directories etc. Other components rely on it to do the search. User can also add Locations to pathfinder, and by defining content’s type it will be properly searched by all system components.
    • New: $api->locate($type,$file) , $api->locateURL($type,$file), $api->locatePath($type,$file) and $api->addLocation(). See source for comments.

Api changes

  • Namespaces are now removed for good. (Early versions of AModules introduced implementation of namespaces. This is now obsoleted by PathFinder functionality)
  • API templates will treat tag <?template?> by trying to locate enclosed file inside one of locations containing templates. A proper relative URL will be used.
  • <?base_path?> will be substituted with the relative path (such as /myapps/project33/admin/) to a base web directory of your project
  • <?atk_path?> will be substituted with the relative path to amodules resources. By default it’s /amodules3/ and will change to /atk/ in later versions.

Minor changes and additions

  • New: jQuery_Chain::_selectorRegion(). Similar to _selectorThis(), this uses $(region)… This variable is globally defined for all AKT AJAX requests and points to the part of the page which is being substituted (atk4_load) or which issued ajax eval request ($(‘x’).univ().ajaxec())
  • New: Testing class. $api->add(‘Testing’) will introduce a generic testing pages for your project. Remove for stable / live projects.
  • View_Error() added. use $p->add(‘View_Error’)->set(‘this is error text’);
  • View_Warning() added. Usage identical to Error.
  • View_Info() added. Usage identical to Error.
  • View_Columns() added. Splits your view into multiple columns. $c=$this->add(‘View_Columns’); $c->addColumn()->add(‘LoremIpsum’); $c->addColumn()->add(‘HelloWorld’);
  • New exceptions:
    • Exception naming. Exception to be named: [<class>_]Exception[_<type>]. For example PathFinder_Exception or PathFinder_Exception_FileNotFound, Exception_InitError(), etc.
    • New: PathFinder_Exception()
  • New: LoremIpsum::setLength($paragraphs,$words) – allows you to define number of paragraphs and words per paragraph for Lorem Ipsum greekings.
  • Field::setFieldHint($hint) – will add Hint to a field.
  • Field’s template now have <?before_field?> and <?after_field?> tags set. Use it to your advantage such as $f->add(‘line’,'money’)->add(‘Text’,null,’before_field’)->set(‘€ ‘);
  • Obsolete: Field::denyEnter()
  • Uses by default: jQuery-1.4.x, jQueryUI-1.8.x.
  • removed processException (as it’s already implemented by caughtException()). Please do not use try{ } catch anywhere on your page unless you really need to. API handles all the errors properly.
  • Grid::addButton() changed in a similar way to Form. It will now return Button class.
  • Obsolete: constants AMODULES3_LIB, AMODULES3_DIR, BASE_DIR, etc.
  • New: univ().newWindow(url) opens new browser window (popup) at specified URL
  • ui.atk4_grid.js included (although it’s due to refactor)
  • Errors in form will focus faulty field


  • SMlite::eachTag() supports all callback types, not only functions.
  • Removed use of obsolete PHP functions, split(), ereg_replace, etc
  • Slightly changed how page inclusion works.
    • First it checks if page_xx is defined in API.
    • Attempts to load class page_xx from page/xx.php (note that lib/page/* is no longer checked. Pages are regulated by PathFinder.
    • Attempts to load template page/xx.html.
    • If all fails, it complains about missing page/xx.php file.
  • Several others bugfixes.


Further development of ATK will be hosted on ActiveState FireFly:

1 Comment

Posted May 11, 20106:12 am

to migrate the svn you’ll need to do:

svn switch –relocate

If you wish to stick with the RC1, then

Once you migrate repository (with –relocate) you can do svn switch with just one argument – new repository.