Upload
sotaro-karasawa
View
4.936
Download
2
Embed Size (px)
DESCRIPTION
ビジネスロジックとプレゼンテーションロジックを分けてしまっちゃうよ!
Citation preview
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna �
Action � View ���
id:sotarokSotaro KARASAWA
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Agenda����
Ethna ������ �����������������������
� !"�#$�% !"�#$
&'
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
����
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
����
id:sotarok(�"$�
)*+,,-./0
("$!1
2345-678!!!
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
������ ���
wassr.jp/user/sotarok2 � 2!!twitter.com/sotarok
d.hatena.ne.jp/sotarok���
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
���
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
���
��� ��������
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
���
������
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
���
» -9:;<+=>?@A6B+C!BDEF7�
»�+-90GH�IJ��K+!B0EthnaCL,��KLB,D(M+5) *1
»���,N 0OPQKMRBD#�K,1M
» (*1 ����� � events.php.gr.jp ��)
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
���
»�������������� !"#…
» ��
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
$%&'(
)*�+� yandod ,�-.$�/
0123�45,�
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
�67%58��9
:9!",�/��8���;
���
�����
������
…
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna <�=>?@
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna � A�BC�D�$EFGH�$IJ�Ethna(���)��PHP��� ��������������������� �!�"�#$�%&�'()
�*+,-.�&'��/
» 012 �12�MVC�������» …
http://ethna.jp/ethna-about.html
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna � A�BC�D�$EFGH�$IJ�
Controller
Model View
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna � A�BC�D�$EFGH�$IJ�
Controller
AppObject/AppManager template (Smarty)
Action View
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna � A�BC�D�$EFGH�$IJ�
Controller
AppObject/AppManagerADOdb��DB�� template (Smarty)
performprepare preforward
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna � A�BC�D�$EFGH�$IJ�
Controller
AppObject/AppManagerADOdb��DB�� template (Smarty)
performprepare preforward�
�
�
�
�
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Ethna���» Action
» (authenticate) -> prepare -> perform» View
» preforward -> forward -> template»CKLF9MNOP�QRST»UV�Model
»3 %4'�4SQL#'�5 67�
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
1���� / 1����1� �!» S�TU�J+��V» action
» Blog» Post.php» Post/Do.php» View.php
» view» Blog
» Post.php» View.php
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
WXY�Z�GH�CKLF
$
IK[\CKLF
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
"#$% &�(1)»]��^_�GH�`ab�c�defprepare (Action) 9g4
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
"#$% &�(2)»DB�hijk(#lmnojk)fperform (Action) 9g4
»���pq_�rfos/tu (prepare#vw�/�N�)
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
"#$% &�(3)»"x9yN�$f preforward (View) 9g4
» (hijkfg����z)»"xoN�$�{|9�Nhif;����} (view~��B$)»�8 DB �09,�):&#';<
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
��3'()*
postprepare
perform
perforward
post_doprepare
perform
perforward
��������
��� �������
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
��3'()*
postprepare
perform
perforward
post_doprepare
perform
perforward
����������������...
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
��3'()*
postprepare
perform
perforward
post_doprepare
perform
perforward
����������������...
��������
�� ������
�������
DB��������
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
��3'()*
postprepare
perform
perforward
post_doprepare
perform
perforward��������
�� ������
�������
���
����������������...
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
"#$% &�(5)» DBWX.D#�
» ���� � �!"#��$!�� » ���� %&'()*�
» ���� � Ethna_DB_ADOdb ���» add/update � autoExecute � (ADOdb��)» find ���������» findBy* �������
» JOIN��+,» �����JOIN����
» �!"�-. (�/0�12�34���5�6)» !"#$ -> %&'» (�) -> *&'_+�,-.�$/
» id / created / updated !
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
�8��$$�8��$
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
+�,��
» if ���N»=>?@",AB�CD�E�&'FG��HGIJ6H(,#'&'F$6�KL$F
»DBfDB�R%�8/SQLg�N» findBy* ��MFNOH(,P6#'&MF$»QRSTUGV�WXY
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
-�,��
»DBf���%9���» SQLZ�[
» autoExecute78)9��9�:9��»;<�=>?)�@���AB9��
»H(�H\�JOIN�&F)$L�\F»Z\B$u����/��
»]L^_`»a���,��6b&F)�'��cd�e�@�
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
��
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
./012345�
» ��YLC,�/Z[»\�]��^_��
» CakePHP *C>?)» http://getmockingbird.org/
» symfony *D>?EF6GHIJ�»&`,BDEthnaU�JaCakePHPbWDBU�c�L"5� �dD8NWLB,D
» �9:PHP 5KL» M%EthnaNO�P?*…» QR�12�34��(PHP%S@T?)U��/VWXY:���Z
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
6789�:0
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
;<
nequal����
)�<9
��%���
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
nequal»�$7� sotarok»��� riaf»q��� wozozo (i�)
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
1=;<
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
Open PEAR Server����
(riaf�������)
Copyright (c) sotarok 2008, Attribution-NonCommercial Creative Commons
0y%