The Yii Book!

Hello everybody!

Here it is:

–iM

Nice, are you the author or is it another community member?

Or someone else entirely? (I saw the name Jeffrey Winesett, but I don’t recognize the name)

EDIT: August is a long time to wait :blink:

No, I am not the author of the book, but seems like Jeffrey Winesett has been around for a while since the early release of the framework: http://www.packtpub.com/authors/profiles/jeffrey-winesett

–iM

I agree with intel352, august is a long wait… not to mention all the changes Yii will behave from today to august…

I know August is far, but hey, we’re gonna have a Yii book :D

At least we can have our WikiPedia page back!

–iM

completley agree :D

great new i guess… don’t want to sound pessmistic but unless the book is well written it will have little value for yii developers. :unsure:

hi,

i think yii have a great documentation so i think you dont need a book for this.

2 years ago i started to work with symfony. i read a book about this.

after i realized that the book was more a 1:1 copy from practical symfony documentation.

regards

That depends on the writer…

A book on how to implement or use different Yii parts would be nice…

It will be a book on how to develop a TDD application with Yii, not a 1:1 copy of the documentation.

I’m really happy to see a PHP book about test driven development (TDD and Agile), because the entire community lacks of this approach.

–iM

agree too! :lol:

Did you mean YiikiPedia page?

YESSSSS

The book is out! The book is out!!!!

yaaaaaay

–iM

Cool, here is a test chapter.

Does it only talk about the depreciated yiic, or does it include Gii?

Looked at the index on amazon and didn’t see anything about events/behaviors :(

But I did see references to both yiic and Gii

Do we get a Wiki entry now? :)

phazei

Gii is used in this one (at least in the test chapter).

Gii is used in the book!

I have read the book from cover to cover and followed the examples/tutorials to create the test app and the trackstar app.

I also had a co-worker and friend read along and do the same tutorials and examples on his development machine at the same time.

The book is a wealth of knowledge but I do have some legitimate complaints. By legitimate, I mean that the publisher has been made aware of these issue and has issued credits to people who bought and used this book!

  1. The version of Yii used in the book is an older version than current and the generated code for CRUD, model, or controller is quite different in many places (particularly the load->model not requiring parameter $id in his version and all his code examples).

  2. Many, many typos… for instance a closing php tag in the book with a colon after was written as "?:" in stead of "?>:" which caused many errors until the ">" was added.

  3. Many topics are not explained as well as they should have been. For instance rbac is a very in depth topic however he skims over it telling you to "do this" and "do that" with not much explanation as to why or the other built in methods for AuthManager that should be learned.

That said, I understand that it could be argued that book would be huge and cumbersome if ALL topics are covered in depth. It could also be argued that teaching rbac and AuthManager as a whole go well beyond the scope of the book. However my contention is that if you plan to make a user aware of the availability and in fact plan to have them start to use these constructs then you should give enough information to have them be able to reproduce this construct in their own applications later. If you cannot do that then offer to them a next book that will be focused on these items in it’s entirety and leave these concepts out of this book with the exception of mentioning the concepts and next book.

Also, a small note on point 1 (Yii versions used), I do not feel this is a problem with the author, publisher, or reader. I only mention it for readers to be aware of the issues if they are using 1.1.4 and try out this book.

Finally, on to point 2 (typos), this I do find a failure on the part of the author and more so on the part of the publishers editing team. The book is a valuable read but there are times when the author has you paste large sections of code that fail due to typos. This is in my opinion a bad for the reader since many of the typos are in methods or in classes that as a new Yii users you do not even know they exist let alone what the contruct for calling them are. As a new Yii user you spend more time backtracking and reading Yii core code then you do learning the examples in the book!

<EDIT>

Another huge issue I had was that much of the SQL code in the book will fail for you or worse, they will succeed and then will not be usable by the code in this book.

For example in the book and pdf e-book version of the book many of his SQL commands are expected to be copied and ran on MySQL but he uses apostrophes in stead of back ticks on database objects ("insert into ‘tbl_users’ " should be "insert into tbl_users ") which causes MySQL to return an error and the command never runs successfully.

Another example is that his SQL code to create tables in many cases do not have the required “Engine=InnoDB” at the end and they get created as type “MyISAM” (MySQL’s default table type). This causes code errors later because the code and ActiveRecord functions are specifically written to work on InnoDB tables! He even tells you at the beginning of the book (after the first table is created) that the tables must be created as InnoDB yet in hist first table creation SQL command the engine type is not set.

Plain and simply put the code and SQL examples in this book WILL NOT WORK out of the box even though he claims they do!

</EDIT>

@DavidDreggors, good points, thanks for letting us all know.

This wouldn’t be the first time a development book has come out with examples that are unusable-as-printed.

Real shame they didn’t test their examples before publishing…