Giter Site home page Giter Site logo

aura.framework's People

Contributors

galactic-void avatar harikt avatar pborreli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aura.framework's Issues

Easy way cli script .

When you look into https://github.com/auraphp/Aura.Framework/tree/develop/cli

We can notice we have a bunch of cli scripts .

When we look into the code of any class we can notice the code is same.

<?php
require dirname(dirname(__DIR__)) .  '/Aura.Framework/src/Aura/Framework/Bootstrap/Factory.php';
$factory = new \Aura\Framework\Bootstrap\Factory;
$cli = $factory->newInstance('cli');
$return = $cli->exec(__FILE__);
exit($return);

But just the value passed as its dynamic the __FILE__ value is changing .

That means I wished if we can change the script to something like accepting from the command line itself the options .

I assume the system has a cli folder with the aura script and which can be run as

Eg :

php cli/aura something

Show some help and also list all the available

$di->params['Aura\Framework\Cli\Factory']['map'] 

array values removing the path and making it something like vendor.package.cli-name which

$di->params['Aura\Framework\Cli\Factory']['map']["vendor.package.cli-name"]

than as in ["$system/package/Aura.Framework/cli/server"]

This removes so many scripts in the Aura.Framework/cli/, make length written than the current one as

php package/Aura.Framework/cli/server 

to

php cli/aura 

Don't need the same scripts.

Thoughts.

PATH_INFO

When running via php 's own development server ,

the method in class Aura\Framework\Web\Front

public function request()
{
    // match to a route
    $path   = $this->context->getServer('PATH_INFO', '/');

public function request()
{
    // match to a route
    $path   = $this->context->getServer('REQUEST_URI', '/');

needs some change to route the corresponding routes . PATH_INFO is only available for apache see http://php.net/manual/en/reserved.variables.server.php

I feel REQUEST_URI works fine. @pmjones thoughts ? I can make the changes and push , let me know if its ok .

Assets

The assets has been moved to onhold.

We should need that for a release for framework level.

Render different format from the same action

Currently Aura.Framework 's view ends with name <action-name>.php Eg : https://github.com/auraphp/Aura.Framework/blob/develop/src/Aura/Framework/Web/Hello/views/world.php .
I was wondering what will happen if we want to render a json value.

I think its implemented ( https://github.com/auraphp/Aura.View/blob/develop/src/Aura/View/TwoStep.php#L512 ) , but I am still trying to figure out how to make use of it.

May I know how this is going to happen for I can also check on Mustache, Twig etc .

Templates from different source

@pmjones , I Hope we had a discussion about using different templates from different packages. Not sure or remember we had it .

Currently setView() method of Aura\Framework\Web\AbstractPage set the path to the package controllers views and layouts .

I feel if we can set something like Package.Vendor:Controller:template ( This is something similar to Symfony2 is doing , not exactly :-) ) and then add this path , it makes life easier for the template finder to load.

Or do you think there is some other good way to do this ?

Also there can be a problem is the order the paths are set :P ( Not sure that will come when we do like these sort of rendering and sometimes may need to resolve this also )

Inflector

Take Aura\Framework\Inflect out, so it acts as a separate one.

Probably something called utilities ?

I have been using Inflector in various projects.

More information of Error

Hi Paul ,

Yesterday I was trying to figure out an error thrown as

404 Not Found

No controller found for '/fb/login'

 Please check that your config has:

 An Aura\Router\Map route for the path '/'

 A ['values']['controller'] value for the mapped route

 A $di->params['Aura\Framework\Web\Controller\Factory']['map'] entry for the controller value.

You can see I did added the path as

 $di->get('router_map')->add('fb_login', 'fb/login', [
     'values' => [
         'controller' => 'facebook',
         'action' => 'login',
     ],
 ]);

But you can see / is missing.

Can we add more information or look into the system itself for the name and give a right answer ?

setInnerData

setInnerData of TwoStep view is being called twice and data getting lost

$this->view->setInnerData( ['authors' => 'Hello World'] );
$this->view->setInnerView('list');
$this->view->setOuterView('layout'); 

Generic Factory

@pmjones I was creating a ModelFactory to get injected to the controller .

And I noticed the functionality is similar to the one we have in Aura\Framework\Web\Controller\Factory . Wondering why not we make this class as a generic factory so we can inject this object to which all class we need.

Sample Project

Create a sample project probably a Blog example itself and document it on making use of the Aura components.

Problems faced

  • Rendering different strategies as in #10
  • Model creation and how it can be made and utilized with Aura.Marshal

For Later :

  • Authentication : @galactic-void has started with https://github.com/galactic-void/Aura.Auth . Seems a lot more todo .
  • ACL ( Roles / Permissions ) . We cannot leverage on Zend\Acl for its removed in 2.0 with something different which we don't even know as in their Beta5 . So we need our own Aura.Security ?
  • Forms : Current components are tightly coupled . So a need of Aura.Form is needed.
  • Filtering / Validation : All the current packages are tightly coupled . The one at https://github.com/Respect/Validation is making use of static which the Dependency injection cannot make use of . So there is a need of Aura.Filter component.

Widget

Hey Paul,

I recently noticed a use case like rendering the view of an action inside the view.

$this->action('action-name', 'controller-name',  'module-name');

Which will call the action of the controller in the module. Do you think this approach is a good one to create widgets ?

Di not loaded

The Aura.Di container not able to load, for the Aura\Di is not registered in autoloader .

Aura\View\TwoStep has some trouble with DI

Catchable fatal error: Argument 1 passed to Aura\View\TwoStep::__construct() must be an instance of Aura\View\Template, null given in /media/Linux/aurasystem/package/Aura.View/src/Aura/View/TwoStep.php on line 142 Call Stack: 0.0001 125536 1. {main}() /media/Linux/aurasystem/web/index.php:0 0.0248 958816 2. Aura\Framework\Bootstrap\Web->exec() /media/Linux/aurasystem/web/index.php:12 0.0248 958868 3. Aura\Framework\Web\Controller\Front->exec() /media/Linux/aurasystem/package/Aura.Framework/src/Aura/Framework/Bootstrap/Web.php:71 0.0248 959196 4. Aura\Framework\Web\Controller\Front->request() /media/Linux/aurasystem/package/Aura.Framework/src/Aura/Framework/Web/Controller/Front.php:166 0.0260 1009128 5. Aura\Framework\Web\Controller\Factory->newInstance() /media/Linux/aurasystem/package/Aura.Framework/src/Aura/Framework/Web/Controller/Front.php:217 0.0260 1009356 6. Aura\Di\Forge->newInstance() /media/Linux/aurasystem/package/Aura.Framework/src/Aura/Framework/Web/Controller/Factory.php:96 0.0290 1141808 7. Aura\Di\Lazy->__invoke() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Forge.php:96 0.0290 1141808 8. Aura\Di\Container->Aura\Di{closure}() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Lazy.php:55 0.0290 1141824 9. Aura\Di\Forge->newInstance() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Container.php:378 0.0297 1167152 10. Aura\Di\Lazy->__invoke() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Forge.php:96 0.0297 1167152 11. Aura\Di\Container->Aura\Di{closure}() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Lazy.php:55 0.0297 1167168 12. Aura\Di\Forge->newInstance() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Container.php:378 0.0302 1202036 13. call_user_func_array() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Forge.php:105 0.0302 1202400 14. Aura\View\TwoStep->__construct() /media/Linux/aurasystem/package/Aura.Di/src/Aura/Di/Forge.php:0

Release needed

The version 1 have been broken for quite some time even after the merge on #52 .

It will be nice if a release is made for the same for if some tries let them see a Hello World .

Composer Autoload

Hi @pmjones ,

There is a problem with the way we are autoloading the composer stuffs.

/media/Linux/aurasystem [develop] $ ls vendor/composer/
autoload_classmap.php  autoload_namespaces.php  autoload_real.php  ClassLoader.php  installed.json

You can notice autoload_real.php . When I installed nette/nette , the problem I noticed is nette uses its own loader.

"autoload": {
    "files": ["Nette/loader.php"]
},

https://github.com/nette/nette/blob/debugger/composer.json#L27

Which is written in autoload_real.php .

And the https://github.com/auraphp/Aura.Framework/blob/develop/src/Aura/Framework/Autoload/Loader.php#L34 will not load for we are only checking classmap and namespace . Wondering whether it is a good idea to completely relay on vendor/autoload.php

Thought ?

Cli execution runs into errors

Hello,

I try to execute cli commands as per statement on http://auraphp.com/manuals/v1/en/installation/.

Erroroutput:

$ php package/Aura.Framework/cli/server

Fatal error: Uncaught exception 'Aura\Framework\Exception\NoClassForController' with message 'D:\xampp\xampp\htdocs\mass\package\Aura.Framework\cli\server' in
mpp\htdocs\mass\package\Aura.Framework\src\Aura\Framework\Cli\Factory.php on line 72

Aura\Framework\Exception\NoClassForController: D:\xampp\xampp\htdocs\mass\package\Aura.Framework\cli\server in D:\xampp\xampp\htdocs\mass\package\Aura.Framewor
Framework\Cli\Factory.php on line 72

Call Stack:
    0.0246     125208   1. {main}() D:\xampp\xampp\htdocs\mass\package\Aura.Framework\cli\server:0
    0.0735     678024   2. Aura\Framework\Bootstrap\Cli->exec() D:\xampp\xampp\htdocs\mass\package\Aura.Framework\cli\server:5
    0.0736     678240   3. Aura\Framework\Cli\Factory->newInstance() D:\xampp\xampp\htdocs\mass\package\Aura.Framework\src\Aura\Framework\Bootstrap\Cli.php:76

Possible Bug

There is an issue I found trying to incorporate Mustache

Array
(
    [Aura\Framework\Web\Controller\AbstractPage] => Aura\Framework\Web\Controller\AbstractPage
    [Aura\Web\Controller\AbstractPage] => Aura\Web\Controller\AbstractPage
    [Aura\Web\Controller\AbstractController] => Aura\Web\Controller\AbstractController
)

https://github.com/auraphp/Aura.Framework/blob/master/src/Aura/Framework/Web/Renderer/AuraViewTwoStep.php#L38

So I feel we need to remove one more array_pop($stack); . I can send a PR for this if its confirmed or you can make the necessary changes..

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.