Giter VIP home page Giter VIP logo

api'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

api's People

Contributors

abbadon1334 avatar darkside666 avatar karakal avatar philippgrashoff avatar romaninsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

What about a relational table JOINS and its data? anything?

I have many relational tables and I want to retrieve all relational tables that belongs to the one I am pulling the information I tried many things to try to show the relational tables using the API but do not find any hook for it...

for instance show all clientes and clientes can have many addresses and groups...
I want to show the client with the addresses and group he/she belongs...

One clear example will be:
I have a post table that has comments (made by users) and the posts can have tags.

how can I join these tables for output with this API? is there any solution for this?

Appreciate any info
thanks

error: charset malformed JSON... this happen with columns fields from db with specials characters... any fix?

I have a table with a column text with French and Spanish characters and the JSON returned from the API gives me error

Fatal error: Uncaught InvalidArgumentException: Unable to encode data to JSON in Zend\Diactoros\Response\JsonResponse: Malformed UTF-8 characters, possibly incorrectly encoded in /Applications/MAMP/htdocs/www/cpanel_tripsbro/vendor/zendframework/zend-diactoros/src/Response/JsonResponse.php:164 Stack trace: #0 

I think the issue it is the charset problem... my table is utf-8 charset in the db and header and html charset is ok but the issue it is from the API returning malformed Json when the column has accents in the field to show...

is there a way to set charset when using the line below?
$db = new \atk4\data\Persistence_SQL connection here?

or where?

thanks

URL params (?param1=somevalue) mess up rest patterns

Hi,
when passing URL params to the api, the Api->rest() does not work as supposed. Furthermore, if the last part of the pattern is a variable (e.g. :id), the URL params are added to this variable

pattern setup: 
$this->rest('/bookings', new Booking($this->app->db));

This request is not recoqnized:
www.mydomain.com/api/bookings?access_token=123456

DELETE www.mydomain.com/api/bookings/3?access_token=123456
=> id which should be 3 becomes 3?access_token=123456

My proposal:

  • remove all URL params from $this->path and store them seperately. Tested, works for the 2 cases above.

Issue with requesting api rest

if I Use this it works; print all Json array

$api->rest('/customers', new Customers($db));

but if I use this, it does not work why? it print empty Json array

$api->rest('/customers', function() use($db) {
$c = new Customers($db);
$c->setLimit(20);
return $c;
});

any ideas?

Doesn't work with new versions of data

composer require atk4/data
composer require atk4/api

will produce an error

  Problem 1
    - Root composer.json requires atk4/api ^0.3.0 -> satisfiable by atk4/api[0.3].
    - atk4/api 0.3 requires atk4/data ^2.0 -> found atk4/data[2.0.0, ..., 2.4.0] but it conflicts with your root composer.json require (^5.0).

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.