Yii 2.0 Vs Yii 1.1.15

I know Yii 2.0 is still on Beta, but for those how started to use the earlier version of Yii, and has started just using Yii, or who just started using an MVC framework for that matter.

Can you please explain to newbies like us, how exactly 2.0 is different from the earlier versions of yii? and the major benefits/features of Yii 2.0 that we could not imagine using in the earlier versions?

In my oppinion I would not recommend using Yii 2.0 for productive applications cause it’s still beta right now.

If you are new and learn Yii I would recommend to start with Yii 1 and if you understand the basic concepts of the framework you can also e.g. try to do the same application you did with Yii 1 with Yii 2. For this see the Upgrading from Yii 1 to Yii 2.

Well,If your project was done under Yii 1.x then keep maintaining the version and start thinking of migrating. Yii 1.x is supported to at least 2017 so no need for rush. However, new projects, IMHO, should be in 2.x

Alot have changed but significantly and is well documented here. Better support for Rest API (Excellent IMHO), better names (zapping Cxxx is nice that is CActiveRecord is now ActiveRecord) and use of PHP5 features as well is big stuff.

That adds few troubles like need for PHP >= 5.4 and of course unfinished documentation.

Apart fro the right Yii2 dev garner from the word Beta to change anything or introduce a bug, I do not see anything that say it is unstable. I use it for a project and runs quiet well with no problem.

Unfinished documentation and few support (dues to few people actually using it comparing to 1.x) I have no major problem at all.

Ive been using yii 1.1.14 for about a year now, and have gotten really used to it, and prefer it compare to other Php Frameworks.

I would just like to get a better understanding of the two, about the differences, and what to expect if i somehow switch to Yii 2.0.

Thank you for providing the link.

thank you for this, have you encountered any problems so far as far as Yii 2.0 is concerned?

Yes, unfinished documentation and lesser support than Yii 1.x

Other than that not yet!

i see. thank you.

i would appreciate any additional information about 2.0, any specifics on how to maximize the benefits and features of Yii 2.0, if one tries to switch from Yii 1.1.15. Are there any immediate difference you notice when you started using Yii 2.0, performance or usage wise?

Not yet in position to say perfomance wise but its far better in terms of coding.

Things are easier!

For sure you can use it in your projects, it’s everyone’s own decision.

Read the official announcement of the yii team when they released Yii 2.0 beta: Yii 2.0 beta is released

IMHO there is everything inside this announcement you need to know and to decide if you want to use it or not.

We’re still breaking code from time to time. For example, my recent commits resulted in broken Gii on some PHP verisons. Writing tests for it right now…

Right,

can you give at least a guess-date on when documentation MIGHT be ready?

I see its a big pain now :)

Well, all existing docs are up to date: http://stuff.cebe.cc/yii2docs/

We won’t release w/o all the guide finished.

Hello Neovash.

Short answer to your question is that Yii 2 should be modern,up to date, framework. What do I mean by that ? The world of web development is changing very fast. PHP 5.3 and 5.4 brought us some things that are considerably changing the way of coding compared on what we was doing few years ago, when yii 1 was "modern" framework. Namespaces, traits, and expansion of web services and testing driven development simply forced us to "need" modern tools to make our life easyier. Yii 2 should be that tool. Of course yii 2 is still in beta and documentation is not ready. Even if you are familiar with yii 1 you may still have a problems understanding yii 2, but it is still very usefull to know how yii 1 works.

I was asking for guess-date when they will be finished (may be just a month or something).

Thanks for the link.

I don’t have any. Depends on too many factors. But we’re working hard to release it: https://github.com/yiisoft/yii2/pulse

Thanks!

I tried to migrate my simple app from Yii 1.x to Yii 2.0, and seems like Yii2 is slower for some case.

For example I use findOne go get a record:


$model = Category::findOne((int)$id);

It took more than 1 sec to complete the request, with 3 DB query.

If I remove that line, it just took 0.2 sec.

Is it normal? Or any better way to do that?

Using Yii 1, I perform 2 query with 1 data view and 1 list view, took less than 1 sec.

Thanks.

did you do profiling to check whats the cause? How long does the same query take when done with DAO or in DBMS itself