Agile Toolkit news

library updates, tips, information and more

Symfony 2.0 vs ATK3.8 – part 5 – Architecture and beyond

This post continues comparison of ATK and Symfony 2.0. This post is based on features described in Quick tour – page 5

Directory structure

I have already reviewed directory structure in my first post. Probably I should have mentioned that My_Super_Class is mapped into {php}/My/Super/Class.php by auto-include.

Web directory

We leave it up to developer to decide if they want to keep everything inside webroot or outside. Framework supports both approaches. When you define locations, you also have to specify basePath. If certain location is outside the webroot, but you need to make some parts available (such as templates), you will have to provide a valid basePath. We ourselves tend to use .htaccess to block access to locations where user shouldn’t go.

In your main.php file you only include a single file ‘amodules3/loader.php’. All the other includes are done by the ATK.

Interactions

ATK properly determines 3 components of the URL:

  • $this->api->pm->base_url = ‘http://yoursitte.com:81′
  • $this->api->pm->base_path = ‘/admin/’
  • $this->api->pm->page (or api->page) = ‘user/add’

This pretty much gets inputted into $this->api->pathfinder->base_location. Additionally you have $this->api->pathfinder->atk_location which describes resources provided by ATK.

Some function equivalents:

  • addLocation()
  • readConfig() – is called by API, reads file ‘config.php’. You can access it through $this->api->getConfig(‘db/dsn’,$optional_default_value);

Vendors

Currently there are no support for vendors, but we are looking to have it by ATK4.

Cache and Logs

Oddly enough – ATK4 never needed a caching system. The way it is it works incredibly fast. Therefore there are no native caching available.

By default APIs do not provide any logs. However class ‘Logger’ severely improves collection of error information, debug-display on-screen and writes pretty log files with 3 severity levels. There is also support for logging into database and other extensions are possible.

Command line

ATK provides a specific API – ApiCLI which is a bare-bones for you to use in command-line or cron.

This is only a start.

Those 5 posts were comparing the frameworks of ATK and Symfony. ATK have it’s pros and cons but overall it’s have a very powerful framework. But it’s not framework alone. It’s a toolkit.

That means – it’s only a foundation for what ATK really offers. ATK comes bundled with many things such as:

  • default templates you can use right away and skin with jQuery UI CSS framework
  • lister – show your blog posts, news, history
  • grid – structured tables with addons to sort, edit, order, paginate
  • form – standard and forms with custom layout, validators, multiple error reporting options
  • wizards – sequental pages
  • tabs – jquery UI native
  • js integration – transparent function calls, json arguments
  • instant support of any 3rd party jquery plugins
  • js – a number of js-widgets and kits included
    • system level, extended ajax: atk4-start.js
    • atk4_loader – universal loadable region widget, native atk4 integration with dynamic JS parsing and JS/CSS inclusion on demand
    • atk4_form – enhances form to use ajax submission, error display, field reloading and more
    • atk4_grid – enhance grids to be clickable, reloadable fields
    • akt4_checkbox – places checkboxes on default grid and pontenially uses selectable(), binds selectables with form field
    • atk4_expander – enhances grid to contain expanders (accordions) buttons
    • atk4_menu – support for ajax page loading, URL hash
    • combo box / autocomplete support
    • univ – extensible utility library, handles dialogs(frames), ajax functions, field enhancements, growl-style notifications
  • database versioning control
  • relational database abstraction (fields, types, related entities)
  • cloud (amazon) integration (limited but planned to expand)
  • framework-level security practices
  • portal features, cms
  • object-to-object relational model support
  • file uploads

All of the above components are bundled and properly integrated with each-other and into framework.

About these ads

May 19, 2010 - Posted by | Uncategorized

3 Comments »

  1. > database versioning control

    What did you mean ? Could you give more info on this ?

    Comment by point | May 19, 2010 | Reply

  2. VersionControl

    it executes series of db upgrade scripts. See it here: http://firefly.activestate.com/romaninsh/atk4/browser/trunk/lib/VersionControl.php

    Comment by romaninsh | May 20, 2010 | Reply

  3. Incredibly great writing! Really!

    Comment by Randolph Fink | May 27, 2010 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.