All Projects → auraphp → System

auraphp / System

Licence: bsd-2-clause
A full-stack framework built from Aura library packages.

Projects that are alternatives of or similar to System

Findbugs Plugin
Jenkins findbugs plugin
Stars: ✭ 43 (-29.51%)
Mutual labels:  deprecated
Malware
Malware related code
Stars: ✭ 51 (-16.39%)
Mutual labels:  deprecated
Face Recognition
Deprecated. Face recognition Android application. Using Android SDK, OpenCV and Facebook SDK. Loading the user's Facebook pictures, scanning pictures for facial features and comparing faces to image repository for matches. PLEASE NOTE: This project is relatively old and uses obsolete versions of both the Facebook SDK and the Android SDK.
Stars: ✭ 54 (-11.48%)
Mutual labels:  deprecated
Winternote
[Deprecated] Semantic WYSIWYG editor.
Stars: ✭ 47 (-22.95%)
Mutual labels:  deprecated
Puppet Staging
⛔️ Deprecated in favor of puppet-archive
Stars: ✭ 50 (-18.03%)
Mutual labels:  deprecated
Terminal Ide
💀 A full command line based Java / Android develpment kit, that runs on Android devices.
Stars: ✭ 52 (-14.75%)
Mutual labels:  deprecated
Multiple Scms Plugin
Stars: ✭ 39 (-36.07%)
Mutual labels:  deprecated
Notifier For Github Firefox
[DEPRECATED] Firefox extension - Displays your GitHub notifications unread count
Stars: ✭ 58 (-4.92%)
Mutual labels:  deprecated
Wearhttp
This library provides a means to access the content on the Web easily from AndroidWear. Welcome pull request
Stars: ✭ 51 (-16.39%)
Mutual labels:  deprecated
Dataarrays.jl
DEPRECATED: Data structures that allow missing values
Stars: ✭ 54 (-11.48%)
Mutual labels:  deprecated
Androidffmpeg
[DEPRECATED] FFmpeg build for android random architectures with example jni
Stars: ✭ 1,049 (+1619.67%)
Mutual labels:  deprecated
Codeigniter Base Model
⛔️DEPRECATED CodeIgniter base CRUD model to remove repetition and increase productivity
Stars: ✭ 1,052 (+1624.59%)
Mutual labels:  deprecated
Android Lint Plugin
Android Lint parser plugin for Jenkins
Stars: ✭ 52 (-14.75%)
Mutual labels:  deprecated
Connect Python Sdk
Python client library for the Square Connect APIs
Stars: ✭ 45 (-26.23%)
Mutual labels:  deprecated
Os Homedir
[DEPRECATED] Node.js `os.homedir()` ponyfill
Stars: ✭ 55 (-9.84%)
Mutual labels:  deprecated
Tmwa Client Data
DEPRECATED: The data used by the ManaPlus client for the tmwAthena server used by The Mana World Legacy. All further development will take place in the "client-data" repo.
Stars: ✭ 42 (-31.15%)
Mutual labels:  deprecated
Zoho Crm Client Php
[DEPRECATED] Provides a clean readable PHP API to the Zoho Rest API.
Stars: ✭ 52 (-14.75%)
Mutual labels:  deprecated
Anatine
[DEPRECATED] 🐦 Pristine Twitter app
Stars: ✭ 1,102 (+1706.56%)
Mutual labels:  deprecated
Heroku Buildpack Datadog
Heroku Buildpack to run Datadog DogStatsD in a Dyno
Stars: ✭ 55 (-9.84%)
Mutual labels:  deprecated
Graphql Modules
⚠️ [DEPRECATED] GraphQL module library for Apollo.
Stars: ✭ 53 (-13.11%)
Mutual labels:  deprecated

Aura System

Build Status

The Aura System provides a full-stack Aura framework built around Aura library packages.

Getting Started

Installation

Install via Composer to a {$PROJECT_PATH} of your choosing:

composer create-project aura/system {$PROJECT_PATH}

This will create the system skeleton and install all of the necessary packages.

Once you have installed the Aura system, start the built-in PHP server with an Aura.Framework command:

cd {$PROJECT_PATH}
php package/Aura.Framework/cli/server

You can then open a browser and go to http://0.0.0.0:8000 to see the "Hello World!" demo output.

Press Ctrl-C to stop the built-in PHP server.

Additionally, you can run a command-line test:

cd {$PROJECT_PATH}
php package/Aura.Framework_Demo/cli/hello

You should see "Hello World!" as the output.

Run The Tests

For testing, you need to have PHPUnit 3.7 or later installed.

To run the integration tests for the system as a whole, change to the tests directory and issue phpunit:

cd {$PROJECT_PATH}/tests
phpunit

To run the unit tests for a package, change to that package's tests directory and issue phpunit:

cd {$PROJECT_PATH}/package/Aura.Autoload/tests
phpunit

Web Server

To run Aura under Apache or another web server, add a virtual host to your web server configuration, then point its document root to {$PROJECT_PATH}/web.

If mod_rewrite or an equivalent module is installed on the server, you will be able to browse without needing index.php in the URL.

Remove the Demo Package

When you are satisifed that the installation is working, edit the composer.json file to remove the aura/framework-demo package requirement and then run composer update.

System Organization

The system directory structure is pretty straightforward:

{$PROJECT_PATH}/
    config/                     # mode-specific config files
        _mode                   # the config mode to use
        _packages               # load these packages in order
        default.php             # default config
        dev.php                 # shared development server config
        local.php               # local development server config
        prod.php                # production config
        stage.php               # staging config
        test.php                # testing config
    include/                    # application include-path directory
    package/                    # aura-package libraries
    tests/                      # system tests
    tmp/                        # temporary files
    vendor/                     # composer vendors
    web/                        # web server document root
        .htaccess               # mod_rewrite rules
        cache/                  # public cached files
        favicon.ico             # favicon to reduce error_log lines
        index.php               # bootstrap script

Writing A Page Controller

Let's create a package and a page controller, and wire it up for browsing. We will do so in a project-specific way, leaving out the complexities of creating an independent package for distribution.

Warning: If you have not removed the Framework_Demo package yet, please do so before continuing. Otherwise, your routes will not work correctly.

Create The Controller

Change to the include/ directory and create a location for the example package and a space for our first web page ...

cd {$PROJECT_PATH}/include
mkdir -p Example/Package/Web/Home
cd Example/Package/Web/Home

... then create a file called HomePage.php. Add this code for a bare-bones index action:

<?php
namespace Example\Package\Web\Home;

use Aura\Framework\Web\Controller\AbstractPage;

class HomePage extends AbstractPage
{
    public function actionIndex()
    {
        $this->view = 'index';
    }
}
?>

Create The View

Next, create a view for the index action in a file called views/index.php and add the following code to it

<?php echo "This is an example home page."; ?>

At this point your include/ directory should look like this:

include/
    Example
        Package/
            Web/
                Home/
                    HomePage.php
                    views/
                        index.php

N.b.: Technically you don't need a directory structure this deep. However, a structure like this makes it easy to add new pages as well as other support libraries without having to change the project organization later.

Configure The System

Now we need to wire up the page controller to the autoloader and the routing system. Change to the system config directory:

$ cd {$PROJECT_PATH}/config

Edit the default.php file and add this code at the end of the file:

<?php
// attach the path for a route named 'home' to the controller and action
$di->params['Aura\Router\Map']['attach'][''] = [
    // all routes with the '' path prefix (i.e., no prefix)
    'routes' => [
        // a route named 'home'
        'home' => [
            'path' => '/',
            'values' => [
                'controller' => 'home',
                'action'     => 'index',
            ],
        ],
    ]
];

// map the 'home' controller value to the controller class
$di->params['Aura\Framework\Web\Controller\Factory']['map']['home'] = 'Example\Package\Web\Home\HomePage';
?>

Try It Out

You should now be able to browse to the / URL to see "This is an example home page."

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].