Anakinmike / yiidoc

Automatically exported from code.google.com/p/yiidoc
0 stars 0 forks source link

Improvement proposals #121

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. http://www.yiiframework.com/doc/guide/1.1/en/database.dao#using-table-prefix
It will be good to add a note like this: "We recommend to always specify a 
table prefix, because 3rd party extensions are usually designed to work with 
table prefixes (it means in AR classes {{tableName}} syntax is used), and in a 
case you leave the prefix empty, you'll get an error 'Table {{...}} not found'".

2. http://www.yiiframework.com/doc/guide/1.1/en/basics.mvc
"6. The action reads a Post model whose ID is 1 from the database.". What is  
Post model? It is never mentioned before... Maybe we should introduce it 
somehow...

3. 
http://www.yiiframework.com/doc/guide/1.1/en/basics.component#component-behavior
"To use a behavior, it must be attached to a component first by calling the 
behavior's [attach()|IBehavior::attach] method. Then we can call a behavior 
method via the component:"
Shouldn't it be "by calling component's attach() method"?

4. http://www.yiiframework.com/doc/guide/1.1/en/basics.module
There is a code example on this page: 
"$postPerPage=Yii::app()->controller->module->postPerPage;". I think it's a 
little incorrect. Here we want to access a particular module, so it's better to 
use Yii::app()->moduleId or Yii::app()->getModule('moduleId').

5. http://www.yiiframework.com/doc/guide/1.1/en/basics.namespace#root-alias
"Additionally, if an application uses modules, each module will have a 
predefined root alias that has the same name as the module ID and refers to the 
module's base path. "
I think it should be mentioned that a module's alias is created when the module 
is accessed first time. It means if we have 10 modules, then we won't have 10 
aliases predefined.
Also maybe add an example of using namespaced classes?

Original issue reported on code.google.com by andy.s.kos on 18 Feb 2012 at 6:41

GoogleCodeExporter commented 8 years ago
Regarding 3. I mean CComponent.attachBehavior() of course.

Original comment by andy.s.kos on 18 Feb 2012 at 6:44