ERå³ããï¼Webã¢ããªãèªåçæããããï¼A5SQL Mk2 + CakePHPãé£æºãããï¼
ä¸è¨ã®æµãã¯ï¼ä¸åº¦ã¯ä½é¨ãã¦ããããã
- ERå³ãæ¸ãã
- â 1 ããï¼DDLæ+ãã¼ãã«ãèªåçæã
- â 2 ããï¼ãã¼ãã«å®ç¾©æ¸ãèªåçæã
- â 2 ããï¼Webã¢ããªãèªåçæã
ã³ã¼ãã£ã³ã°ãªãã
ä¾ã¨ãã¦ï¼è¤æ°äººã§å©ç¨ã§ããããã¯ãã¼ã¯ã¢ããªã®ãããªãã®ãçæãã¦ã¿ãã
ãCakePHPãä½ã£ã¦ãããéåï¼scaffoldï¼ã¯ãªããã ãã¨ããè¨ããããï¼ãããæ´ã«ãã¼ãã«çæãã¼ã«ã¨çµã¿åããããã©ããªããï¼ã¨ããã®ãç¦ç¹ã
CakePHPã®å
¥éæ¹æ³ãã¡ãã£ã¨å
¼ããã
äºåæºåï¼1/2ï¼ï¼ãã¼ã«
ERå³æç»+DDLçæ+ãã¼ãã«å®ç¾©æ¸çæã®ããã«ï¼A5SQLã¨ããããªã¼ã½ããã使ãã®ã§ã¤ã³ã¹ãã¼ã«ãã¦ããã
A5SQLãDL
http://www.wind.sannet.ne.jp/m_matsu/...
ã¾ãï¼DB+DB管ç+PHPå®è¡ã®ããã«ï¼XAMPP+CakePHPã使ãã
XAMPPã¯ã¤ã³ã¹ãã¼ã«ãã¦ããã
Cakeã¯ï¼ä¸è¨ã§ãã¨ã§ã¤ã³ã¹ãã¼ã«ããã
äºåæºåï¼2/2ï¼ï¼DBä½æ
ãã¼ãã«ã¯ãã¨ã§èªåçæããã
ã ãï¼ãã¼ã¿ãã¼ã¹/ã¹ãã¼ãã¯å ã«æºåãã¦ããã
以ä¸ã¯MySQL/PHPMyAdminã®ä¾ã
ï¼æ°è¦ãã¼ã¿ãã¼ã¹ãä½æãã ï¼ãã¼ã¿ãã¼ã¹å boo ï¼ç §åé åº utf8_bin
ã§å®è¡ã
ãã¼ã¿ãã¼ã¹ boo ãä½æãã¾ãã
å®è¡ãã SQL:
CREATE DATABASE `boo` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
ã¨ãªãã
注ï¼
MySQLã®ç §åé åºï¼utf8_unicode_ciã£ã¦ãªããï¼
http://cial.seesaa.net/article/704525...
http://localhost/phpmyadmin/
ã«æ»ãï¼
ç¹æ¨©ï¼æ°ããã¦ã¼ã¶ã追å ããï¼ ã¦ã¼ã¶åï¼boo_user ãã¹ãï¼ãã¼ã«ã«ï¼localhost ãã¹ã¯ã¼ãï¼boo_pass ã°ãã¼ãã«ç¹æ¨©ï¼ãã¹ã¦ãã§ãã¯ãã
ã§å®è¡ã
æ°ããã¦ã¼ã¶ã追å ãã¾ãã
å®è¡ãã SQL:
CREATE USER 'boo_user'@'localhost' IDENTIFIED BY '********';GRANT ALL PRIVILEGES ON * . * TO 'boo_user'@'localhost' IDENTIFIED BY '********' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
ããã¦ï¼ãã®DBã¸ODBCæ¥ç¶ã§ããããã«ãã¦ããã
ä¸è¨ã®ãã©ã¤ããã¤ã³ã¹ãã¼ã«ã
MySQL Connector/ODBC 5.1 Downloads
http://dev.mysql.com/downloads/connec...
ããã¦Windowså´ã§è¨å®ï¼
ã³ã³ããï¼ç®¡çãã¼ã«ï¼ODBCï¼ã·ã¹ãã DSNï¼è¿½å DSNAME:boo Server:localhost User:boo_user Pass:boo_pass DB:boo Test>Connection Successful
A5SQLãéãã¦ã¿ã¦ï¼
å·¦ãã¤ã³å³ã¯ãªãã¯ï¼DBã®è¿½å ã¨åé¤ï¼ODBCãåæããã
ã«ãã§ãã¯ãå ¥ã£ãç¶æ ã§éããã¨ï¼ä¸ã§ä½ã£ããbooãã表示ãããã
ããã¾ã§ãäºåæºåã
æ¬çªï¼ï¼ï¼ãERå³ä½æ
ä¸è¨URLã«æ¸ãæ¹ã»ä½¿ãæ¹ãè¼ã£ã¦ããã
A5:SQL Mk-2ã使ã£ã¦ERå³ãæããï¼ï¼
http://www.wind.sannet.ne.jp/m_matsu/...
æ°è¦ï¼æ°è¦ERå³ï¼ããã¸ã§ã¯ãåãå ¥åï¼ããã§ã¯booã¨ããååã«ãããï¼
å³å ã«
- ã¨ã³ãã£ãã£ï¼ãã¼ãã«ãã®ãã®ã®å®ç¾©ï¼
- ãªã¬ã¼ã·ã§ã³ï¼å¤é¨çµåï¼
ãªã©ãæ¸ãè¾¼ãã§ããã
ãã®éã«ï¼CakePHPã®æµåã«åãããå
¥åãè¡ãªãã
ERå³ï¼ã¨ã³ãã£ãã£ã®ä½æ
ERå³ã¨ãã£ã¿ä¸ã§ï¼ãã³ã¯ã®åè§ã®é£ã®ã¢ã¤ã³ã³ãæ°è¦ã¨ã³ãã£ãã£ããã¯ãªãã¯ã
ã¨ã³ãã£ãã£ï¼ ã»è«çåã¨ç©çåãå ¥åã ãã£ã¼ã«ãï¼ ã»æ¨ªç§»åã¯TABãã¼ ã»åï¼ãã¡ã¤ã³ï¼ã¯ALT+ä¸ãã¼ã§åºãã â»ãã ãVARCHARã¯ï¼é¸æå¾èªåã§(10)ã¨ãæåæ°ãä»å ãããã¨ã http://dev.mysql.com/doc/refman/4.1/ja/char.html ã»å¿ é ãã§ãã¯ã¯ã¹ãã¼ã¹ãã¼ã§ãã§ãã¯ã§ãã 決ã¾ã£ããï¼å³ä¸ã®é©ç¨ãã¯ãªãã¯ãã¦ãã¤ã¢ãã°ãéããã
ãã®ã¨ãï¼æ³¨æç¹ã¨ãã¦
- ãã¼ãã«ã®ç©çåã¯è±èªå°æåè¤æ°å½¢ã«ããã
- 主ãã¼ã¯ id
- å¤é¨ãã¼ã¯ããã¼ãã«å_id
- created, modified ãDATETIMEã§å ¥ãã
主ãã¼ã§ãããidãã®åã¯ï¼ä¸è¨ã®ããã«è¨å®ããã
- å㯠*ID ã¨å ¥åã
- IDã¨ããååã®ãåãã¡ã¤ã³ããä½ãã
- ãã¡ã¤ã³ç·¨éãã¯ãªãã¯ï¼ãã¡ã¤ã³åãIDããå®éã®ãã¼ã¿åãINT unsigned auto_incrementãã«è¨å®ã
- not null
- ãã¼ã«ï¼ã¨å ¥åï¼ä¸»ãã¼ï¼
A5SQL:åãã¡ã¤ã³ã¨ã¯ä½ã
http://www.wind.sannet.ne.jp/m_matsu/...CakePHPã·ã¹ãã ãã¶ã¤ã³ï¼ææ°è¦ç´ï¼ï¼2007/02
http://cakephp.jp/modules/newbb/viewt...
ä»åã¯ï¼å®æçã¯ä¸è¨ã®ããã«ï¼ãã¼ãã«ã«ãªãã
è«çåï¼ã¦ã¼ã¶
ç©çåï¼usersãã£ã¼ã«ãï¼
- id / id / *ID / å¿ é / 1
- ã¦ã¼ã¶å / user_name / @VARCHAR(20) / å¿ é
- ãã¹ã¯ã¼ã / user_password / @VARCHAR(20) / å¿ é
- ç»é² / created / @DATETIME
- æ´æ° / modified / @DATETIME
è«çåï¼ããã¯ãã¼ã¯
ç©çåï¼bookmarksãã£ã¼ã«ãï¼
- id / id / *ID / å¿ é / 1
- ã¦ã¼ã¶ID / user_id / @INT / å¿ é
- ããã¯ãã¼ã¯URL / bookmark_url / @VARCHAR(200) / å¿ é
- ã³ã¡ã³ã / bookmark_comment / @VARCHAR(200)
- ç»é² / created / @DATETIME
- æ´æ° / modified / @DATETIME
ãã¼ãã«åã®æ«å°¾ã®sãå¿ããªãããã«ã
ERå³ï¼ãªã¬ã¼ã·ã§ã³ã®ä½æ
ãªã¬ã¼ã·ã§ã³ã«ã¤ãã¦ï¼
第2åã30åéãã¼ã¿ã¢ããªã³ã° ãERå³ãæããï¼ã
http://www.atmarkit.co.jp/fdb/rensai/...
- ã主ä½ããããè¡çºãã«åãã£ã¦1ï¼å¤ã®é¢ä¿
Aï¼ã¤ã«ã¤ãBãããããããï¼ã¨ããå ´åï¼è¦ªãAã§åãBã
ä»åã¯ï¼ã¦ã¼ã¶ã主ä½ã§ããã¯ãã¼ã¯ãè¡çºã ããï¼è¦ªãã¦ã¼ã¶ã¨ããã
A5SQLä¸ã§ã®æä½ï¼
ãã¼ãã«éã§ç·ãå¼ã£å¼µãï¼ ã»ã¨ã³ãã£ãã£ãã¿ã³ã®é£ã®ããªã¬ã¼ã·ã§ã³ã追å ããã¯ãªã㯠ã»ã¦ã¼ã¶ã¨ã³ãã£ãã£ã親ã¨ãã¦ã¯ãªã㯠ã»ããã¯ãã¼ã¯ãåã¨ãã¦ã¯ãªã㯠ã«ã¼ãã£ããªãã£ï¼ ã»ã¦ã¼ã¶ï¼1 ã»ããã¯ãã¼ã¯ï¼0ä»¥ä¸ ã«ã©ã ï¼ ã»ã¦ã¼ã¶ã®IDããããã¯ãã¼ã¯ã®user_id㸠é©ç¨ãã¯ãªã㯠âã¨ã³ãã£ãã£ã«FKã®è¡¨ç¤ºãåºãã
ERå³å®æã
ããã§ï¼ã»ãã®ç©ã¯èªåçæã§ããã
æ¬çªï¼ï¼ï¼ããã¼ãã«çæ
ERå³ããï¼ãã¼ãã«çæã®ããã®SQLæï¼DDLï¼ãçæã
A5SQLã®ã¡ãã¥ã¼ãã¼ä¸ã§ï¼
ERå³ï¼DDLä½æï¼ ã»MySQLï¼ ã»Drop tableãçæããªãï¼ ã»å¤é¨ãã¼å¶ç´ä½æ ã»DBã«ã³ã¡ã³ãç»é²ãã ï¼DDLçæ
ã¨ããããã«å®è¡ã
ä¸è¨ã®ãããªSQLãçæãããã
-- Project Name : boo -- Date/Time : 2009/01/30 16:25:26 -- Author : PCUser -- RDBMS Type : MySQL -- Application : A5:SQL Mk-2 -- ããã¯ãã¼ã¯ create table bookmarks ( id INT unsigned auto_increment not null comment 'id' , user_id INT not null comment 'ã¦ã¼ã¶ID' , bookmark_url VARCHAR(200) not null comment 'ããã¯ãã¼ã¯URL' , bookmark_comment VARCHAR(200) comment 'ã³ã¡ã³ã' , created DATETIME comment 'ç»é²' , modified DATETIME comment 'æ´æ°' , primary key (id) ) ; -- ã¦ã¼ã¶ create table users ( id INT unsigned auto_increment not null comment 'id' , user_name VARCHAR(20) not null comment 'ã¦ã¼ã¶å' , user_password VARCHAR(20) not null comment 'ãã¹ã¯ã¼ã' , created DATETIME comment 'ç»é²' , modified DATETIME comment 'æ´æ°' , primary key (id) ) ; alter table bookmarks add foreign key (user_id) references users(id);
ãããï¼A5SQLä¸ã§å®è¡ãããã
ã»å·¦ãã¤ã³ã§DBï¼ãã£ãä½ã£ãbooï¼é¸æï¼å³ã¯ãªãã¯ï¼DBéã ã»SQLã¨ãã£ã¿ä¸ã®å·¦ä¸ã»ã¬ã¯ãããã¯ã¹ã«ãbooãã¨ããDBåã表示ãããã ã»SQLã¨ãã£ã¿ä¸é¨ã§ï¼SQLå®è¡ä½ç½®ï¼å ¨ã¦å®è¡ããããã¯ãªãã¯ã ã»é»ç·è²ã®ãã¿ã³ã§å®è¡ã
ãã¼ãã«ãçæãããã
æ¬çªï¼ï¼ï¼ããã¼ãã«å®ç¾©æ¸ãçæ
ãã¼ãã«ãã®ãã®ããï¼ãã¼ãã«å®ç¾©æ¸(.xls)ãèªåçæã
ã»A5SQLã®å·¦ãã¤ã³ã§DBï¼booï¼é¸æï¼æ¥ç¶ã ã»ãdefaultããé¸æãã¦å³ã¯ãªãã¯ï¼ãã¼ãã«å®ç¾©æ¸ã®ä½æ ã»å¯¾è±¡ãã¼ãã«ã¯Ctrl+ã¯ãªãã¯ã§è¤æ°é¸æã§ãã
Excelãã¡ã¤ã«ãçæãããã
ãã¼ãã«ä¸è¦§ã·ã¼ãã¤ãï¼ã«ã©ã¼ã
â»CSEã§ãï¼
å³ãã¤ã³ï¼ãã¼ãã«ï¼å®ç¾©æ¸ãåºå
ã§ã¢ãã¯ãã®ã·ã³ãã«ãªXLSãã§ããã
æ¬çªï¼ï¼ï¼ãWebã¢ããªãçæ
ææ°çï¼1.2ï¼ã®CakePHPããã¦ã³ãã¼ãã
CakePHP
http://cakephp.org/
解åï¼
cake_1.2.1.8004ã®ãã©ã«ãããbooãã«ãªãã¼ã ãã¦ï¼XAMPP Apacheã®htdocs以ä¸ã«ã³ãã¼ã
DBæ¥ç¶ã®è¨å®
php.exeã«PATHãéã£ã¦ããã¨ãã¦ï¼
D:\dev\xampp\htdocs\boo\cake\consoleï¼ã¨ããæãã®ãã©ã«ãï¼ã«ã¦ã³ãã³ãããã³ãããã
php cake.php bake -app D:\dev\xampp\htdocs\boo\
ï¼ãã®ã³ãã³ãã¯ãããã«ãã¦ãã¾ãã®ãããã ãããï¼
ããã§å¯¾è©±å½¢å¼ã§è¨å®ã§ããã
ä¸è¨ã§ï¼ãã¼æä½ã®é¨åã¯éãããã
ï¼http://php.sunvisor.net/2008/12/cake12bake.html ãåèãï¼
> ã®ããã³ããã ãã®é¨åã¯ï¼åã«Enterã ãæ¼ä¸ãããã¨ãæãã
D:\dev\xampp\htdocs\boo\cake\console>php cake.php bake -app D:\dev\xampp\htdocs\
boo\
Welcome to CakePHP v1.2.1.8004 Console
- -
App : boo
Path: D:\dev\xampp\htdocs\boo
- -
What is the full path for this app including the app directory name?
Example: D:\dev\xampp\htdocs\boo\myapp
[D:\dev\xampp\htdocs\boo\myapp] > D:\dev\xampp\htdocs\boo\
Bake Project
Skel Directory: D:\dev\xampp\htdocs\boo\cake\console\libs\templates\skel
Will be copied to: D:\dev\xampp\htdocs\boo\
- -
Look okay? (y/n/q)
[y] >
Do you want verbose output? (y/n)
[n] >
- -
Created: boo in D:\dev\xampp\htdocs\boo\
- -
Creating file D:\dev\xampp\htdocs\boo\views\pages\home.ctp
Wrote D:\dev\xampp\htdocs\boo\views\pages\home.ctp
Welcome page created
Random hash key created for 'Security.salt'
CAKE_CORE_INCLUDE_PATH set to D:\dev\xampp\htdocs\boo in webroot/index.php
CAKE_CORE_INCLUDE_PATH set to D:\dev\xampp\htdocs\boo in webroot/test.php
Remember to check these value after moving to production server
Your database configuration was not found. Take a moment to create one.
- -
Database Configuration:
- -
Name:
[default] >
Driver: (db2/firebird/mssql/mysql/mysqli/odbc/oracle/postgres/sqlite/sybase)
[mysql] >
Persistent Connection? (y/n)
[n] >
Database Host:
[localhost] >
Port?
[n] >
User:
[root] > boo_user
Password:
> boo_pass
Database Name:
[cake] > boo
Table Prefix?
[n] >
Table encoding?
[n] >
- -
The following database configuration will be created:
- -
Name: default
Driver: mysql
Persistent: false
Host: localhost
User: boo_user
Pass: ********
Database: boo
- -
Look okay? (y/n)
[y] >
Do you wish to add another database configuration?
[n] >Creating file D:\dev\xampp\htdocs\boo\config\database.php
Wrote D:\dev\xampp\htdocs\boo\config\database.phpD:\dev\xampp\htdocs\boo\cake\console>
ããã§DBæ¥ç¶ã®è¨å®ãçµãã£ãã
ã«ãã©ã¦ã¶ã§ã¢ã¯ã»ã¹ããã¨ï¼
Your database configuration file is present.
ãåºãã
ã¢ãã«çæ
ããä¸åº¦åãã³ãã³ããå®è¡ãï¼ã¢ãã«ä½æã
php cake.php bake -app D:\dev\xampp\htdocs\boo\
ã¦ã¼ã¶ã¨ããã¯ãã¼ã¯ã®ï¼ãã¼ãã«ã«ã¤ãã¦ï¼ã¢ãã«ï¼Mï¼ãçæããã
Welcome to CakePHP v1.2.1.8004 Console
- -
App : boo
Path: D:\dev\xampp\htdocs\boo
- -
Interactive Bake Shell
- -
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
> m
- -
Bake Model
Path: D:\dev\xampp\htdocs\boo\models\
- -
Possible Models based on your current database:
1. Bookmark
2. User
Enter a number from the list above, type in the name of another model, or 'q' to
exit
[q] > 1
Would you like to supply validation criteria for the fields in your model? (y/n)[y] > n
Would you like to define model associations (hasMany, hasOne, belongsTo, etc.)?
(y/n)
[y] >
One moment while the associations are detected.
- -
Please confirm the following associations:
- -
Bookmark belongsTo User? (y/n)
[y] >
Would you like to define some additional model associations? (y/n)
[n] >
- -
The following Model will be created:
- -
Name: Bookmark
Associations:
Bookmark belongsTo User
- -
Look okay? (y/n)
[y] >Baking model class for Bookmark...
Creating file D:\dev\xampp\htdocs\boo\models\bookmark.php
Wrote D:\dev\xampp\htdocs\boo\models\bookmark.php
Cake test suite not installed. Do you want to bake unit test files anyway? (y/n
)
[y] >You can download the Cake test suite from http://cakeforge.org/projects/testsuit
e/Baking test fixture for Bookmark...
Creating file D:\dev\xampp\htdocs\boo\tests\fixtures\bookmark_fixture.php
Baking unit test for Bookmark...
Creating file D:\dev\xampp\htdocs\boo\tests\cases\models\bookmark.test.php
- -
Interactive Bake Shell
- -
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
> m
- -
Bake Model
Path: D:\dev\xampp\htdocs\boo\models\
- -
Possible Models based on your current database:
1. Bookmark
2. User
Enter a number from the list above, type in the name of another model, or 'q' to
exit
[q] > 2
Would you like to supply validation criteria for the fields in your model? (y/n)[y] > n
Would you like to define model associations (hasMany, hasOne, belongsTo, etc.)?
(y/n)
[y] >
One moment while the associations are detected.
- -
Please confirm the following associations:
- -
User hasMany Bookmark? (y/n)
[y] >
User hasOne Bookmark? (y/n)
[y] > n
Would you like to define some additional model associations? (y/n)
[n] >
- -
The following Model will be created:
- -
Name: User
Associations:
User hasMany Bookmark
- -
Look okay? (y/n)
[y] >Baking model class for User...
Creating file D:\dev\xampp\htdocs\boo\models\user.php
Wrote D:\dev\xampp\htdocs\boo\models\user.php
Cake test suite not installed. Do you want to bake unit test files anyway? (y/n
)
[y] >You can download the Cake test suite from http://cakeforge.org/projects/testsuit
e/Baking test fixture for User...
Creating file D:\dev\xampp\htdocs\boo\tests\fixtures\user_fixture.php
Wrote D:\dev\xampp\htdocs\boo\tests\fixtures\user_fixture.phpBaking unit test for User...
Creating file D:\dev\xampp\htdocs\boo\tests\cases\models\user.test.php
Wrote D:\dev\xampp\htdocs\boo\tests\cases\models\user.test.php
- -
Interactive Bake Shell
- -
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
ã¢ãã«çµãããæãåãããã®ã¯ï¼éãé¨åã ãã
ã³ã³ããã¼ã©ãä½ã
ããã©ã¯Cãscaffoldï¼éåï¼ãå©ç¨ããããã«è¨å®ã
Welcome to CakePHP v1.2.1.8004 Console
- -
App : boo
Path: D:\dev\xampp\htdocs\boo
- -
Interactive Bake Shell
- -
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
> c
- -
Bake Controller
Path: D:\dev\xampp\htdocs\boo\controllers\
- -
Possible Controllers based on your current database:
1. Bookmarks
2. Users
Enter a number from the list above, type in the name of another controller, or '
q' to exit
[q] > 1
- -
Baking BookmarksController
- -
Would you like to build your controller interactively? (y/n)
[y] >
Would you like to use scaffolding? (y/n)
[n] > y
- -
The following controller will be created:
- -
Controller Name: Bookmarks
var $scaffold;
- -
Look okay? (y/n)
[y] >Creating file D:\dev\xampp\htdocs\boo\controllers\bookmarks_controller.php
Wrote D:\dev\xampp\htdocs\boo\controllers\bookmarks_controller.php
Cake test suite not installed. Do you want to bake unit test files anyway? (y/n
)
[y] >You can download the Cake test suite from http://cakeforge.org/projects/testsuit
e/Baking unit test for Bookmarks...
Creating file D:\dev\xampp\htdocs\boo\tests\cases\controllers\bookmarks_controll
er.test.php
- -
Interactive Bake Shell
- -
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
> c
- -
Bake Controller
Path: D:\dev\xampp\htdocs\boo\controllers\
- -
Possible Controllers based on your current database:
1. Bookmarks
2. Users
Enter a number from the list above, type in the name of another controller, or '
q' to exit
[q] > 2
- -
Baking UsersController
- -
Would you like to build your controller interactively? (y/n)
[y] >
Would you like to use scaffolding? (y/n)
[n] > y
- -
The following controller will be created:
- -
Controller Name: Users
var $scaffold;
- -
Look okay? (y/n)
[y] >Creating file D:\dev\xampp\htdocs\boo\controllers\users_controller.php
Wrote D:\dev\xampp\htdocs\boo\controllers\users_controller.php
Cake test suite not installed. Do you want to bake unit test files anyway? (y/n
)
[y] >You can download the Cake test suite from http://cakeforge.org/projects/testsuit
e/Baking unit test for Users...
Creating file D:\dev\xampp\htdocs\boo\tests\cases\controllers\users_controller.t
est.php
- -
Interactive Bake Shell
- -
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[Q]uit
What would you like to Bake? (D/M/V/C/P/Q)
ã³ã³ããã¼ã©çµããã
ã³ã¼ãã£ã³ã°0ã§Webã¢ããªãã§ããã
å®æ
ã§ï¼ã¦ã¼ã¶ã®ä¸è¦§/追å /åé¤/ç·¨é
ã§ï¼ããã¯ãã¼ã¯ã®ä¸è¦§/追å /åé¤/ç·¨é
ãã§ããã
ãããæã¯ï¼
- ããã¯ãã¼ã¯è¿½å æã«ã¯ï¼ã©ã®ã¦ã¼ã¶ã¨ãã¦è¿½å ããã®ãã¦ã¼ã¶IDãé¸æã§ããã
- ã¦ã¼ã¶è¡¨ç¤ºæã«ã¯ï¼é¢é£æ å ±ã¨ãã¦ï¼ãã®ã¦ã¼ã¶ãããã¯ãã¼ã¯ãã¦ããããã¯ãã¼ã¯ãä¸è¦§ã§ããã
ã¨ããç¹ã
ã¤ã¾ãï¼ãWikiã®ããã«ï¼è¤æ°ã®ã¦ã¼ã¶å
¨å¡ãèªç±ãªç·¨é権éãæã£ãæ²ç¤ºæ¿ã¢ããªããå®æããã®ã ã
- ããã¯ãã¼ã¯ä¸è¦§ç»é¢ï¼bookmarks/indexï¼ãæ²ç¤ºæ¿ãã®ãã®ã«ãããï¼
- çºè¨æ稿æã«ã¯çºè¨ã¦ã¼ã¶ãé¸æã§ãï¼
- ç¹å®ã®ã¦ã¼ã¶ã®çºè¨ã®ã¿æ½åºããäºãã§ããï¼
ã¨ãã£ãæããã
èãæ¹
ããã§æ³¨ç®ãããã®ã¯ï¼
- ERå³
- DDL
- DBä¸ã«å®éã«åå¨ãããã¼ãã«ãã®ãã®
- ãã¼ãã«å®ç¾©æ¸
ã¯ã©ããåãæ å ±ã表ãã¦ããï¼ããã£ã¦ããï¼ã¨ãããã¨ã
åãæ å ±ãªãï¼ã©ããã¦å¥ã ã«ç·¨éããã®ãï¼
ã©ããï¼åæ¸ãç´ãããï¼ã»ãã®ï¼ã¤ãä¿®æ£ããªãã¨ãããªãã
ããã¯æåã§ããã¹ããã¨ã ãããã
ERå³ã«éããï¼æåã«ã©ããä¸åä½ããããç©ãä½ã£ããï¼ãããã¢ãã«(M)ã¨ãã¦ï¼ã»ãã®ï¼ã¤ã¯ãã¥ã¼(V)ã¨ãã¦çæããã®ã楽ã ããã
ãã®å¾ã§ï¼DBæ§é ãå¤ãããã³ã«ï¼é©å®äºãã«ãªãã¼ã¹çæããã°ããã
ï¼ãã¼ãã«ããERå³ããªãã¼ã¹çæãããããªãã¨ãA5SQLã§ã§ãããï¼
DBä¸ã®ã«ã©ã ãä¸è¦§ã«ããä»æ§æ¸ï¼å®éã®ãã¼ãã«ãçæããããã®SQLã³ãã³ãä¸å¼ï¼ãã¼ãã«ã®è¡ãã¨ã®å 容ãä¿æããããã®ããã°ã©ãã³ã°è¨èªã«ããã¬ã³ã¼ãæ§é ï¼ãåå¨ããã¨èãã¦ä¸ãããããã§ã¯åãæ å ±ã3åç¹°ãè¿ããã¦ãããã¨ã«ãªãã¾ãã
ãããDRYååã«åãã¦ããã®ã¯æããã§ãã
ãã®åé¡ãåé¿ããããï¼ä¿¡é ¼ã§ããæ å ±æºãé¸æããå¿ è¦ãããã¾ããâ¦
ã¢ãã«ã®æ å ±ãç°ãªã£ããã¥ã¼ã¸ã¨å¤æããæ¹æ³ãèãåºãã°ããã®ã§ãã
ãé人ããã°ã©ãã¼ã8ç« ï¼ãå®è¡å¯è½ããã¥ã¡ã³ããã®å¯è¦åºã
ä¸è¨ã®ã¨ã³ããªãé¢ä¿ï¼
ãã¼ãã«å®ç¾©æ¸ããï¼Javaã®ã¨ã³ãã£ãã£ã¯ã©ã¹ãèªåçæãã VBA ãã¯ã
http://language-and-engineering.hatenablog.jp/entry/20081229/1230563126
è£è¶³
Cakeã®æ¥½ããç®ã§è¦ãã«ã¯ï¼ä¸è¨ã®åç»ãã¨ã¦ãåèã«ãªãã
10åã§ä½ãCakePHPã¢ã㪠for Windows
http://p4life.jp/cake/
ã¨ããã§ï¼ä»åä½æã®ã¢ããªã§ã¯ï¼å
¨å¡ãWikiã®ãããªèªç±ãªç·¨é権éãæã£ã¦ãã¾ã£ã¦ããããï¼DBä¸ã§ãã¦ã¼ã¶ã®ãã¹ã¯ã¼ãããæªä½¿ç¨ã«ãªã£ã¦ãã¾ã£ãã
ããããå ã¯ï¼å°ãã®ã³ã¼ãã£ã³ã°ãå ãã¦æ¹è¯ãã¦ããã
ãã®å 容ã¯ã¾ã次åã
ã