yii2-micro

Created on 29 May 2016  Â·  16Comments  Â·  Source: yiisoft/yii2

I think necessary to create a micro version, like lumen framework.
related #10557

under discussion enhancement

Most helpful comment

I think could be:

behaviors
caching
console
data
db
di
filters
helpers
log
mutex
rbac
rest
test
validators
web // it's necessary remove source related to Assets

Also, is necessary to replace \yii\web\Controller by \yii\rest\Controller

All 16 comments

can you propose a folder structure?

I think could be:

behaviors
caching
console
data
db
di
filters
helpers
log
mutex
rbac
rest
test
validators
web // it's necessary remove source related to Assets

Also, is necessary to replace \yii\web\Controller by \yii\rest\Controller

This has come up before and it has also come up before that it would be nice if someone could compile it to a C ext for the PHP interpreter

Compile to C, like phalcon and using Zephir?

Exactly

On 1 June 2016 at 09:58, Agung Andika [email protected] wrote:

Compile to C, like phalcon and using Zephir?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yiisoft/yii2/issues/11659#issuecomment-222933365, or mute
the thread
https://github.com/notifications/unsubscribe/AATxnAG3eOCvZapgkCnoWVchoBMw6PWzks5qHUmpgaJpZM4IpV9W
.

5016

I think necessary to create a micro version, like lumen framework.

We are currently almost as good as lumen. check those:
https://github.com/kenjis/php-framework-benchmark
https://github.com/kenjis/php-orm-benchmark

it would be nice if someone could compile it to a C ext for the PHP interpreter

I agree with @klimov-paul comment in the page that @Faryshta linked: Since PHP 7.0 release possible feature benefits does not cost the efforts.
according to this: https://caleblloyd.com/software/yii2-php-7-performance/
Yii2 should be already 2x faster with php 7.0

it's necessary remove source related to Assets

I think that is going to be possible after 2.1 release.

Yii is component-based and flexible compared to other frameworks I think we should just wait for 2.1 then we may just need to build a new template without assets or maybe pre-configured for REST. a lighter one to add along with the basic and advanced templates.

I believe that the issue is not the performance, but to separate frontend and backend.

Dublicate. See wiki next major versions v.2.1

@leandrogehlen that is why I think we need a template for REST. I currently use the basic one then I create an api folder for REST with its own entry script, controllers, own models, a config file and NO assets as described here. I use the web folder and its assets when I need gii or to quickly add records using web views. when the api is built I just delete the web folder. I find it easier and cleaner.

@tunecino you can make a template for that. yii2-advanced-rest or something like that. Its very simple and you can publish it.

As @githubjeka said, you can also open an issue for yii2.1 asking for an api folder/application available on yii2-advanced-template

Compile to C, like phalcon and using Zephir?

Thank you for a link, @Faryshta. Indeed, we are not going to play with Zephir and C to make Yii work as PHP extension.

We are already fast :) We are going to de-couple some of core components in 2.1, so dir structure may be pretty similar to the one suggested by @leandrogehlen. My colleague @hiqsol tried to do it some months ago as a proof-of-concept and it really works well. Check out: https://github.com/hiqdev?utf8=%E2%9C%93&query=minii (but please, do not use it)

I agree that REST application template is a good idea.

@Faryshta
I was just talking about it in forum today but a more advanced template where web is a built-in app like deployd to be used as a builder & debugger tool for api. check this: http://www.yiiframework.com/forum/index.php/topic/70660-looking-for-things-to-implement-at-yii-hackathon/page__view__findpost__p__300134
I just need to learn more about the debugger tool and how logging works as I've been only using Yii for REST so far.

@tunecino can you explain further what you mean with having web as a built-in app?

as for the deployd example i am working on something like that but i am not confident to release it yet. want me to give you permissions to check it out?

Yes thanks @Faryshta I'm looking forward to it. I'm working on my idea too and I just created an empty repo where I tried to explain it better. lets continue discussion there as it is not related to this issue: https://github.com/tunecino/yii2-schema-builder/issues/1

with #14154 I think this can be closed!
@SilverFire @cebe @samdark

Was this page helpful?
0 / 5 - 0 ratings