Welcome Guest, Not a member yet? Register   Sign In
CI 4.0 Micro-framework?
#1

(This post was last modified: 04-15-2015, 09:07 PM by no1youknowz.)

So a few days ago Lumen was released.  It's a micro-framework of Laravel.

I think it's a pretty good strategy.  If you need something simple, start with Lumen and if your application goes to need a full stack, then it can be upgraded without too much problem.

It's also blazing fast framework, sorry to say leaves CI in the dust and actually is far better than CI 3.0.

Now my question is, will CI be following this same strategy?

As for me, well CI 4.0 is 2 years away.  I can't wait.  I'm taking a serious look at Lumen now and thinking about porting my code over from CI 2.X to it.  
#2

Today this idea seems to me good. It brings some additional burden for supporting, but it is much more useful than supporting documentation language translations for example.

I've seen several times posts on how "fat" CodeIgniter should be, a upgradeable micro-framework will stop this debate. People will choose on their preference, and they will stick with the brand.

+1
#3

Interesting idea... what would you see in a CI Microframework?
#4

Microframework sound nice but it should be based on CI 4 when its ready (at least its core part)
Best VPS Hosting : Digital Ocean
#5

(This post was last modified: 04-16-2015, 01:40 AM by gadelat.)

CodeIgniter is currently intended to be (and is) pretty lean framework out of the box, this would be waste of resources
#6

Simple Answer: Only what's in the current "core" folder right now.

Then users could drop in Database, Helpers, Libraries, Language folders as needed to make it more.

A smarter PSR4 style autoloader would probably support this pretty easy (just a assumption of course)

Documentation wise probably 3 or 4 pages explain what it doesn't include but since it would actually be 100% the CodeIgniter "core" those topics in the main Documentation would be valid. Most importantly is a separate download to not confuse people.

Every CI program uses Core and that is probably where the team will spend most of there CI4 development time anyway.
The Core could also be a early "test bed" approach to CI4. Sure it won't have Calendar, Email, etc... and all the documentation but, it should have enough for adventurous dev's to throw some stuff at it to test speed, loading resources, resources usage, etc... and to see how nicely it can work with other PHP libraries (not CodeIgniter).

DMyers
#7

If the micro-framework is just the core without the helpers/libraries, I don't see where the performance would change over configuring CI not to autoload anything and carefully choosing what's loaded based on your requirements.

Essentially, the core would have to be redesigned with the micro-framework in mind, moving some of the existing functionality out of core and making that functionality optional. Someone will have to weigh the benefits of having a micro-framework without these features vs. any performance degradation in the core of the macro-framework caused by making them optional.

The obvious items to consider in this area (in my mind) are Benchmark, Config, Hooks, Lang, and Log. In most of these cases, I'd imagine that each would have to be replaced with a stripped-down version which is replaced with something closer to the existing functionality in the macro-framework. For example, the micro-framework might ship with something like Psr\Log\NullLogger, while the macro-framework would be pre-configured to use something closer to the existing Log.

Otherwise, all you're really looking at is a change to the way the framework is shipped/managed/downloaded, which I'm pretty sure was one of the questions in another thread.
#8

(This post was last modified: 04-16-2015, 11:40 AM by no1youknowz.)

When I first ran HHVM 3.3.0 with codeigniter the result was horrible.  Which is why I jumped to using slim.  Now I see that's not the case.  

All the tests are run out of the box using - ab -t 60 -c 100 and using HHVM 3.6.1.  I ran each ab 3 times to ensure the JIT engine was really warmed up. Then ran it 1 more time.

slim 2 - Requests per second:    3613.11 [#/sec] (mean)
codeigniter 3.0 - Requests per second:    3614.94 [#/sec] (mean)
codeigniter 2.2 - Requests per second:    3732.25 [#/sec] (mean)
lumen - Requests per second:    4127.81 [#/sec] (mean)

php file with echo "hello world" - Requests per second:    5784.91 [#/sec] (mean)

Looks like Lumen here is top dog. It's actually trivial to enable stuff just by commenting the config file.

Where I like to focus on, is where the 1657 requests per second go from hello world to lumen. Of course my own requirements are much different than the norm. If I was hosting a simple CMS or little website. I'd throw varnish up and forget about it. But unfortunately, I'm not. Doing 10B impressions a month, well now you need to save where you can.
#9

(04-16-2015, 11:39 AM)no1youknowz Wrote: When I first ran HHVM 3.3.0 with codeigniter the result was horrible.  Which is why I jumped to using slim.  Now I see that's not the case.  

All the tests are run out of the box using - ab -t 60 -c 100 and using HHVM 3.6.1.  I ran each ab 3 times to ensure the JIT engine was really warmed up.  Then ran it 1 more time.

slim 2 - Requests per second:    3613.11 [#/sec] (mean)
codeigniter 3.0 - Requests per second:    3614.94 [#/sec] (mean)
codeigniter 2.2 - Requests per second:    3732.25 [#/sec] (mean)
lumen - Requests per second:    4127.81 [#/sec] (mean)

php file with echo "hello world" - Requests per second:    5784.91 [#/sec] (mean)

Looks like Lumen here is top dog.  It's actually trivial to enable stuff just by commenting the config file.

Where I like to focus on, is where the 1657 requests per second go from hello world to lumen.  Of course my own requirements are much different than the norm.  If I was hosting a simple CMS or little website.  I'd throw varnish up and forget about it.  But unfortunately, I'm not.  Doing 10B impressions a month, well now you need to save where you can.
Can you PM your lumen controller, view and route. Once I setup a controller which accepted a variable which I then sent to a view. I wasn't as impressed with the speed.

The default closure lumen uses for \ isn't a real world setup.

DM
#10

(04-17-2015, 10:27 AM)dmyers Wrote: Can you PM your lumen controller, view and route. Once I setup a controller which accepted a variable which I then sent to a view. I wasn't as impressed with the speed.

The default closure lumen uses for \ isn't a real world setup.

DM

It's out of the box. So whatever lumen supplies I am using that.




Theme © iAndrew 2016 - Forum software by © MyBB