josedasilva @ 13:25

Ter, 27/02/07

Tomas Funch, escreveu um artigo que pode ser útil a quem agora está a começar a iniciação na framework CakePhp.org.

No artigo estão listadas as convençĩoes adoptadas pelo CakePHP, pelo menos algumas delas.

"


  1. tables names are plural and lowercased

  2. model names singular and CamelCased: ModelName

  3. model filenames are singular and underscored: model_name.php

  4. controller names are plural and CamelCased with *Controller* appended: ControllerNamesController

  5. controller filenames are plural and underscored with *controller* appended: controller_names_controller.php

  6. associations should use the ModelName, and the order should match the order of the foreignKeys: var $belongsTo = 'User';

  7. foreign keys should always be: table_name_in_singular_form_id: user_id (foreign key) -> users (table)

  8. many-to-many join tables should be named: alphabetically_first_table_plural_alphabetically_second_table_plural ie: tags_users

  9. columns in many-to-many join tables should be named like other foreign keys ie: tag_id and user_id

  10. columns named created and modified will automatically be populated correctly

  11. components should be CamelCased: MyComponent : my_component.php : var $components = array('MyComponent'); $this->MyComponent->method();

  12. helpers should be CamelCased: MyHelper: my_helper.php: var $helpers = array('MyHelper'); $myHelper->method();



"

In Cake Conventions

Tags:

Order phentermine 37.5mg without rx. @ 17:23

Seg, 30/07/07

 

Phentermine 37 5mg....

Phentermine 37 5mg....

De
 
Nome

Url

Email

Guardar Dados?

Ainda não tem um Blog no SAPO? Crie já um. É grátis.

Comentário

Máximo de 4300 caracteres



Copiar caracteres

 



Blog pessoal de José Silva. Sou programador informático, nos últimos anos dedicado quase exclusivamente ao PHP.
Fevereiro 2007
Dom
Seg
Ter
Qua
Qui
Sex
Sab

1
2
3

4
5
6
7
8
9
10

11
12
13
14
15
16
17

18
19
20
21
23
24

25
26
28


Pesquisar
 
subscrever feeds
blogs SAPO