Live data from Hacker News

Yii Framework 2.0.0 GA

yiiframework.com

41–50 of 55 posts

Re: Yii Framework 2.0.0 GA

#41
post #29
post #12

Earlier quoted context omitted.

Twig, at least, escapes by default. Laravel's Blade templates don't, unless that's changed recently. But the price you pay for that of course is no longer working directly in PHP but a templating language with its own syntax (for instance, array shorthand in Twig templates [] has worked since I don't know when but only recently has PHP gotten around to supporting it) which has to be parsed, and partially compiled int…

In Laravel Version 5 (due in a month or two), escaping will be on by default.

Yep, and to do none escaped you have to use {!! $foo !!} which at least makes it obvious at a glance as {{{ $foo }}} {{ $foo }} got lost easily.

Re: Yii Framework 2.0.0 GA

#42
post #17

If your namespaces are all lowercase after adopting PSR standards, you haven't really adopted the PSR standards.

PSR-4 does not require any case for namespaces:

> Alphabetic characters in the fully qualified class name MAY be any combination of lower case and upper case. http://www.php-fig.org/psr/psr-4/

Re: Yii Framework 2.0.0 GA

#44
post #30

Earlier quoted context omitted.

I'm not disagreeing with you, but > Symbols persist across multiple requests; this is a big part of why they are so beneficial. That is still not really useful, PHP throws the entire execution context away after the request has finished. There is no sharing nor anything to persist unless you're doing so with an external data-store.

Wait, isn't that just if it's used/configured as a CGI? If you use it as a webserver module (Apache/IIS/Lightspeed), the execution environment can persist in a similar way to an app domain, right?

The only way to set PHP up as a daemon with shared execution and shared processes responding to requests is to use something like ReactPHP[0] -- even with mod_php, php5-fpm or similar, the execution context is still thrown away. The only difference between that and CGI is that the compiled byte code can be cached and the start-up costs are minimised as the bare interpreter process is kept around.

Shared-nothing turns out to be really nice for scaling web apps. One of the few things PHP got right from the get-go.

[0] http://reactphp.org

Re: Yii Framework 2.0.0 GA

#45
post #2

Out of all the PHP frameworks I've used (CakePHP, Kohana, Laravel, Symfony) I have to say Yii is the one of the best. It's hard to describe why, I think mostly because it feels like it was built and designed by one person who had a lot of experience with other frameworks and knew PHP inside and out.

Never was a fan of Yii myself. The one PHP framework I really do like though is the Fat-Free Framework.

FFF is pretty rad, as is Slim framework. I like Slim so much I've been cloning it for Hack[0]. With the next week off work, I'm looking forward to getting it close to parity!

[0] https://github.com/LeanFramework/Lean

Re: Yii Framework 2.0.0 GA

#48

Yii, feels more complicated, and rough around the edges to me...than laravel... There's just a lot of things that make sense to me in Laravel.

Yii is actually incredibly polished, it's not rough around the edges at all. It is not particularly easy on newcomers though, which is the main reason it's not more widely known.

If you put the effort in to learn it thoroughly, you'll be rewarded with an incredibly productive platform that is great not just for getting apps out of the door super quickly, but also provides a secure, scalable foundation which is easy to grow and maintain.

Re: Yii Framework 2.0.0 GA

#49
post #31
post #12

Earlier quoted context omitted.

Twig, at least, escapes by default. Laravel's Blade templates don't, unless that's changed recently. But the price you pay for that of course is no longer working directly in PHP but a templating language with its own syntax (for instance, array shorthand in Twig templates [] has worked since I don't know when but only recently has PHP gotten around to supporting it) which has to be parsed, and partially compiled int…

> but only recently has PHP gotten around to supporting it You're talking about the `[]` short-hand for arrays, right? That was released in version 5.4, in March 2012, I wouldn't really say that's "recent", at least in my opinion.

It is still relatively recent, if you consider how many older PHP installs are out there. I've had to write around this on a few projects, when I found out my client's server had no idea what the array shorthand or namespaces were.

Re: Yii Framework 2.0.0 GA

#50
Currently I working into the Cakephp and Django framework. Now I wanna to work in yii. which is the best between Yii and laravel in large concept application. anyone tell which is best framework for large application in Cakephp, Yii, laravel. please describe.
Post reply on HN