Auraphp PHP App

Auraphp

by Auraphp

PHP Framework
Helps with: PHP
Similar to: ThinkPHP App Yii 2.0 App Flow App Silex App More...
Source Type: Closed
License Types:
Supported OS:
Languages: C CPP

What is it all about?

The Aura project is a set of high-quality, semantically versioned, standards-compliant, independent library packages that can be used in any codebase.

Key Features

* Each library is self-contained and has only the things it needs for its core purpose. * The library packages do not depends on other packages so developers can use any part of project Independentlly.


Pricing

Yearly
Monthly
Lifetime
Free
Freemium
Trial With Card
Trial No Card
By Quote

Description

free - see site

Product Analysis

PHP

PHP frameworks and libraries

AuraPHP reivew

AuraPHP reivew

By Alvie Amar | 6/8/2016 | Product Analysis |Beginners

AuraPHP is a UI framework for creating and developing dynamic web applications specifically for mobile and desktop devices. This gives an adaptable, scalable long-lived lifecycle to bolster developing applications. Aura framework supports partitioned multi-tier component development that bridges the client and server. It uses Java on the server side and JavaScript on the client side. Finally, Aura 2.x gives *_Kernel and *_Project packages. These form the 2.x framework; they rely upon on the foundation libraries as well as external packages.

 

So let's have a brief history of the existence of AuraPHP. Aura 1.x, started as a change to Solar, rethought as a library collection with dependency injection rather than as a monolithic framework with service location. The name change from Solar to Aura was to lessen confusion with the Apache Solr project. The libraries, once completed, have combined into the 1.x framework. Aura 2.x proceeded with the decoupling of 1.x components into much more independent packages. It additionally split apart the framework into kernel and project packages, giving the basis for the 2.x framework.

 

The following are some key features of AuraPHP:

  • setter and constructor injection
  • inheritance of setter method and constructor parameters
  • lazy-loaded instances, values, includes/requires and services
  • instance factories
  • optional auto-resolution of type-hinted constructor parameter values

 

What is AuraPHP good for?

 

The primary objective of Aura is to give high-quality, well-tested, standards-compliant, decoupled libraries that can be utilized as part of any codebase. This implies you can use as much or as little of the task as you like.

 

Aura additionally gives you a framework system that pastes the various packages into a firm entirety. In case you're the sort of developer who needs to use a full-stack framework,  Aura makes that significantly less demanding for you since it was designed with a "libraries first" approach,  however you likewise need to have the capacity to pull out some parts of the system and replace them with your own usage or implementations. There are no cross-package conditions and it uses separated interfaces for things that ought to have replaceable implementations.  The system framework is still beta, however it seems to be working fine.

 

The advantage of using aura is that it is  a collection of libraries which are truly standalone, with less dependency.  

 

These are some of the advantages as to why to choose AuraPHP:

  • Aura has libraries that are self-contained and displays only the things that are needed for its purposes.
  • Library packages well, does not relies on the other packages. So, developers are free to use any part of the project independently.
  • Is lightweight and provides a good API for core features.

 

Examples and code snippets

 

We will make some basic examples and try some of the provided code snippets on how Aura really works in real world. I am pretty sure that you already set up everything that is needed to use this framework. But before that, let’s have a look at the installation of the aura via composer.

 

Copy the code below to install aura project.

composer create-project aura/web-project quick-start

cd quick-start

composer require "foa/html-view-bundle:2.*"

Views and layouts are kept in templates/views and templates/layouts folder. 

mkdir -p templates/{views,layouts}

Then, create your basic template templates /views/hello.php. 

<?php // templates/views/hello.php ?>
<?php $this->title()->set("Hello aura to the word of programming"); ?>
<p>Hello <?= $this->name; ?></p>

and a very basic layout. 

<?php // templates/layouts/default.php ?>
<!DOCTYPE html>
<html>
 <head>
   <?php echo $this->title(); ?>
 </head>
 <body>
   <?php echo $this->getContent(); ?>
 </body>
</html>

 

Edit config/Common.php and define service for view and the template paths in registry.

public function define(Container $di)
{
   $di->params['Aura\View\TemplateRegistry']['paths'] = array(
       dirname(__DIR__) . '/templates/views',
       dirname(__DIR__) . '/templates/layouts',
   );
   $di->set('view', $di->lazyNew('Aura\View\View'));
}


 Setting paths in registry is available from 2.1+

Edit modifyWebDispatcher method to

public function modifyWebDispatcher($di)
{
   $view = $di->get('view');
   $dispatcher = $di->get('aura/web-kernel:dispatcher');
   $response = $di->get('aura/web-kernel:response');
   $request = $di->get('aura/web-kernel:request');
   $dispatcher->setObject('hello', function () use ($view, $response, $request) {
       $name = $request->query->get('name', 'Aura');
       // set the view to render
       $view->setView('hello');
       // set the layout
       $view->setLayout('default');
       // set the data for view
       $view->setData(array('name' => $name));
       $response->content->set($view->__invoke());
   });
}

 

Run the php server

php -S localhost:8000 web/index.php

You can browse 

http://localhost:8000

or pass a get value to name as 

http://localhost:8000/?name=Jongki

Enjoy using Aura! This is just a basic way on how to use aura. 

 

Conclusion

 

We have covered some of the basic and advanced features of using Aura, so why not give it a try? I am sure it will make it easier for you to make applications than before. AuraPHP is in many ways technologically superior to some of the competing framework that are currently available in the market—it suffers however from poor marketing and finding ways to encourage engineers to give it a shot. Nonetheless, AuraPHP has a supportive community to help and support anyone who wants to try it out.

By Alvie Amar | 6/8/2016 | Product Analysis

{{CommentsModel.TotalCount}} Comments

Your Comment

{{CommentsModel.Message}}

Top DiscoverSDK Experts

User photo
3355
Ashton Torrence
Web and Windows developer
GUI | Web and 11 more
View Profile
User photo
1490
Ronan McCarthy
Cross-Platform & Web developer.
Web | Mobile and 6 more
View Profile
User photo
1230
Gary Green
Expert programmer, Ask what you want
Web | JavaScript and 3 more
View Profile
User photo
1130
Harry Gold
Experienced Web developer.
Web | JavaScript and 3 more
View Profile
Show All

Interested in becoming a DiscoverSDK Expert? Learn more

X

Compare Products

Select up to three two products to compare by clicking on the compare icon () of each product.

{{compareToolModel.Error}}

Now comparing:

{{product.ProductName | createSubstring:25}} X
Compare Now