Giter VIP home page Giter VIP logo

book's Introduction

Agile Toolkit - Web UI Toolkit

Join the chat at https://gitter.im/atk4/atk4

Agile Toolkit is a Web UI framework and collection of usable widgets. It allows you to develop rich web applications by writing only PHP code. Agile Toolkit is inspired by Desktop GUI Toolkits and is a fully-object oriented development environment.

Overview

Agile Toolkit has introduced three new principles in web development:

  • A Complete UI solution for PHP developers
  • Unique integration between jQuery events and chains and PHP
  • Innovative Object Relational Manager with support for joins, sub-selects and expression abstraction.

All the features are delivered in a unique close-coupled environment - Similarly to Cocoa or Qt - all objects of Agile Toolkit are based off one common ancestor and are constructed under the guidance of the top-level Application object.

Installing

To start a new web application in Agile Toolkit, download a bundle from http://agiletoolkit.org/ and follow instructions. Alternatively, if you are a very hardcore developer, add the following code inside your composer.json file:

"require": {
    "atk4/atk4": "4.3.*@dev"
}

Example

To help you understand some key principles of Agile Toolkit, copy the following example into page/index.php and place inside the init() method.

Message to Romans

Source:

$form = $this->add('Form');
$form->addField('line', 'subject')->validateNotNull();
$form->addField('password','password');
$form->addSubmit();

if ($form->isSubmitted()) {
    $this->js()->univ()
        ->dialogOK('Hello World','Subject: '.$form['subject'])
        ->execute();
}

Congratulations. You have now created a fully AJAX / PHP form, fully protected from SQL / HTML / JS injection, based on jQuery UI theme and Bootstrap-compatible 12-column flexible grid system.

License

Agile Toolkit is distributed under MIT License.

Your support will ensure the longevity of Agile Toolkit

book's People

Contributors

ayurmedia avatar borderlessnomad avatar darkside666 avatar ibelar avatar jinzuu avatar konstantinkolodnitsky avatar ppalmtag avatar romaninsh avatar skondakov avatar waffle-iron avatar yotmv avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

book's Issues

agiletoolkit-overview/application

http://book.agiletoolkit.org/agiletoolkit-overview/application.html

  • "therefore you can have multiple applicaiton classes" - i think will be better "therefore you can have multiple applicaiton classes for one project"
  • "don’t go outside of your application" - not clear. How can I go outside of my app? If it is possible we need something like "bad example", otherwise i can "go outside" accidentally and do not even know that i did it.
  • "it will initialize several sub-components which call Controllers" - not clear. Maybe lists of sub-components for each type of App will be good to have here?
  • It is good to have example of Frontend.php file with db connection, jQueryUI and so on after "it will initialize several sub..." paragraph.
  • "ApiFrontend will automatically initialize Logger() which makes error logging more bearable." - is any information how to use this logger?
  • "Layouts A Layout is a region in the shared template". Typo?
  • "Layouts A Layout is a region in the shared template (shared.html), which is parsed by the API class. If the region is defined, then a corresponding layout function is called." - i think this part can be extended. Don't know how yet.
  • "most significant layout element is “Content”" - why layout, not template? And why element, not spot? Content is required spot in template.
  • - old style spot

model page

http://book.agiletoolkit.org/agiletoolkit-overview/model.html

  • The Dataset - i think this part should be rewrited.
  • setSource - Primary Source - require some examples.
  • addCache - Caches - same, require some examples. Much more :)
  • Model data and methods. "In a typical ORM implementation, model data is stored in model properties while reserving all the property names beginning with underscore. Agile Toolkit stores model data as array in a single property called “data”." - add more low level explanation or stay on high level only. I think description set(), get() functions is more then enough at this point, most of the users will never ask you how it works behind the curtains.
  • class Model_User doesn't have public $table property.
  • "Please note that model is defined using PHP language and it’s always defined as a class." - i get confused with this phrase :) really :)
  • * you must define some fields* - how to define fields? Short example required here.
  • $m['name']='John';$m['daily_salary']=150; - why this written in one line?
  • * Extend “User” model to create “Manager” model.* - example might be very useful here.
  • Loading and Saving models - pretty good!
  • Relational Models (SQL) - this is h3 element. Everything "described below" has h2 element for header. Not clear what exactly is "described below".

needs more simple examples

http://book.agiletoolkit.org/agiletoolkit-overview/view.html

I don't find examples which are close to "every day" programming workflow

  • Example with function defaultTemplate()
  • complete example with $this->add('MyView') which contains MyView class, template for this class and resulting view (screenshot from browser while we have no embed Snippets). The good example is here where code and template located in different tabs, and result is under them.
  • $poem->setModel('Book')->tryLoadAny(); - this part needs more explanation. I think beginners will not understand how to use model with view, though it is very important feature of AgileToolkit
  • Composite Views - i don't see difference between views added to other views and composite view. It needs to be described more clear if there is a difference or add example with "user-created" Composite Views. Maybe "You can create Composite Views by adding one view to another $myView->add('MyOtherView')" is enough.
  • View with Template - we have two ways to set template to View. Only one is described. Do we really want user to go somewhere else from this page to know second way? I think both ways should be described on this page

Create article for object cloning

Issue by romaninsh
Sunday Jun 08, 2014 at 13:52 GMT
Originally opened as atk4/atk4#551


Cloning Objects

When you use the PHP clone statement the whole object is duplicated
into an independent variable.

$book_archive = clone $book;

$book_archive->addCondition('is_archive',true);
$book->addCondition('is_archive',false);

$this->add('Grid')->setModel('book');
$this->add('Grid')->setModel('book_archive');

This code will display two grids - one for regular books and another for
archived. Because objects are cloned, adding conditions to one will not
affect the other.

But be careful – there's a gotcha when you clone hooks.

To continue the example above, say you have a hook inside Model_Book
to check a value before saving:

// In Model_Book

function init()
{
    parent::init();

    $this->addField('review');
    $this->hasOne('Author');

    $this->addHook('beforeSave', array($this,'check'));
}

function check($m)
{
    if (strlen($this['review']) < 100) {
        throw $this->exception('Review is too short');
    }
}

After cloning, $this will be referencing the wrong object! Saving
our Model with $book_archive->save() will call $book->check(),
and $this will validate the value of $book instead of
$book_archive.

You can avoid this problem if you use the Model passed in as $m
instead of $this inside a hook. In the above example, $m will
point to $book_archive.

CRUD issue with atk4

Issue by johndobsonRoR
Tuesday Aug 26, 2014 at 21:59 GMT
Originally opened as atk4/atk4#573


There is a CRUD issue with the first example in the atk book, the update option used for a basic edit or checking a book out as borrowed fails to rewrite the row after edit (including ID) using the 'save' button, leaving the table in an unusable state. This raises another issue, I can't locate the database where the books are stored in order to 'drop' the table and start again - the example doesn't appear to reference the "config-default.php" file in the admin directory, the only way I can drop the database is to reboot my machine.

doxygen generated Class/API reference for atk4.3?

Hi,

When using atk4.2 before, I was really helped alot with being able to browse the Class and API reference documentation generated by doxygen.

since the new documentation/book went online this seems to be unavailable in its old location.
Is there a new link for this, or is that not available anymore for atk 4.3?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.