You are viewing revision #8 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version.
Here is a step by step To-Do list for Yii beginners. The list is an advice of what tutorials and documentation you can walk through to get a full understanding of the Yii Framework. These can be a help to learn Yii.
- Learn PHP
You need to know how to program in PHP. You can find many tutorials on the web, or buy a book. If you'd like a book, I recommend Larry Ullman's books. Two web tutorials can be found on webmonkey and home&learn.
- Learn OOP
You need to know the basics of how Object Oriented Programming works. Same as above, use Google or buy a book. You need to read the PHP manual on OOP. It will take you a few hours. Another tutorial about OOP can be found here, and a video tutorial here.
It is very important to understand what the Model-View-Controller pattern means! If you don't, you will think Yii is chaos. As soon as MVC "clicks" in your mind, you will see the very logical pattern. Read up on one, two and three. You can also find an article here about Understanding MVC.
I highly recommend reading (or even rereading) the Getting Started with jQuery page from jQuery.com. These are some basics you need to know, since Yii uses jQuery as well. If you want to dive more into jQuery, I added some more links at the Extra's at the bottom.
- API pages
The following is important to always remember: You always need to open the API pages on functions you're using. The descriptions of all functions of a language can be found here. The API's are your memory, since your brain's memory can't remember ALL functions of ALL programming languages. ;) For PHP, use the search box on the top right of PHP.net. For jQuery, you can search the jQuery Docs. And here is Yii's API.
- Easy introduction
Visual explanation is the best! So check the screencasts. :) After that, read up on Larry's easy tutorial series.
- The Guide!
The Definitive Guide is very helpful! Just walk through all pages from top to the bottom. Tip: Also check out the comments on the bottom of the pages.
- Doing stuff
Okay, now you should actually get your hands dirty! Either grab the Yii Agile Web Application Development book, or do the Blog tutorial. (Or both!) Note: If you read the book, make sure you check the errata here and here. Also, this book uses Yii 1.1.6. The book takes you on a tour to make an issuemanagement system. Some bits don't work with later versions of Yii, so make sure to use an older version while learning Yii using this book.
- Got confused what's happening?
You can trace all variables to the Yii Log to see what's in them. You can find more info here: log&debug vars using CWeblogRoute Irreplaceable for everyone to see whats happening! This is the best trick you ever learn:
> Yii::trace(CVarDumper::dumpAsString( $var ), 'NAMEOFYOURTRACE');
WHAT THEN? ¶
There are a lot of good tips in the Yii Application Development Cookbook. (If you buy it, check the errata section on their website.) Also check out the Yii Wiki and the Yii Class Reference. Tip: You can view Yii source code directly in the API docs. Also, the lookup/search box in there is invaluable.
If you have questions, head towards the Community forums or the irc chatroom at #yii on irc.freenode.org.
- More tools
There are a lot of extensions for Yii. These are extra "toolboxes", made by the Yii community, that you can re-use in your applications.
Basics - can take days, weeks or years. ;)
Yii - Step 1& 2, takes a few hours.
The rest takes days, or a few weeks if you're doing things parttime. After all that, you should go into the depths of building your own custom Yii stuff!
Have fun with Yiiing!