SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
Lithium labo #2
Super Rad Framework




       2010/07/30 php-study tokkyo yandod
                                            1
Who am I

name Yusuke Ando
a,k,a, yando
Talking & Writing
 in JP PHP community
Rakuten.inc
Linkshare.inc
in NYC since 2009




                       2
Germany and me.




                  3
From Lithium session at Tek X Chicago




                                        4
Agenda


   What is Lithium
   Core functionality
   Recap and announcement




Copyright © YusukeAndo. 2010 - . All rights reserved.   5
What is Lithium?
The origin of Lithium




Copyright © YusukeAndo. 2010 - . All rights reserved.   6
Lithium




     Framework for PHP5.3 or higher
     Light weight, Flexibility
     Document Database as Primary citizen
     Was called as Cake3


Copyright © YusukeAndo. 2010 - . All rights reserved.   7
Gwoo & Nate !




Copyright © YusukeAndo. 2010 - . All rights reserved.   8
Little bit detail

12 developers in project
Current version is 0.9.5 Almost There
CakePHP like code
Able to integrate outside Libraries.
Including Unit Test, Console, Document
Refined View and Model layer.



                                         9
PHP5,3

Namespace
Finally language orgnizes naming rule.
Late Static Binding (LSB)
Allow full extending static class.
Clousure
Promote Aspect Oriented Programming.


  This is time to evolve our self.

                                         10
Core value




             PHP5.3

拡張性(flexibility)
                      11
Core functionality
雰囲気を体験




Copyright © YusukeAndo. 2010 - . All rights reserved.   12
Install

PHP5.3 Also XAMPP
MongoDB is recommended, MySQL is beta.
Just extract archive.
 http://rad-dev.org/lithium/versions
Database setting
 app/config/connections.php


          Simple install steps
                                         13
app/config/connections.php
                                                         namespace
use ¥lithium¥data¥Connections;

Connections::add('default', array(
   'type' => 'MongoDb',
   'host' => 'localhost',
   'database' => 'labo02'
));




 Copyright © YusukeAndo. 2010 - . All rights reserved.               14
Homepage




Copyright © YusukeAndo. 2010 - . All rights reserved.   15
Blog Tutorial

Controller calls PostModel
Writing template with pure php.
If you use MySQL, need to create schema first.
Namespace Namespace Namespace
Smaller code than any other Framework.




                                                 16
app/models/Post.php


<?php                                                       namespace
namespace app¥models;

class Post extends ¥lithium¥data¥Model {

}




    Copyright © YusukeAndo. 2010 - . All rights reserved.               17
app/controllers/PostsController.php


<?php
namespace app¥controllers; Importing model
                           and parent class
use app¥models¥Post;

class PostsController extends ¥lithium¥action¥Controller {

    public function index(){
       $posts = Post::all();                                Return vars to
       return compact('posts');                               template
    }
}


    Copyright © YusukeAndo. 2010 - . All rights reserved.                    18
app/views/posts/index.html.php


<?php foreach($posts as $post): ?>
<article>
<h1><?=$post->title ?></h1>
<p><?=$post->body ?></p>
</article>              Auto escaping
<?php endforeach; ?>




  Copyright © YusukeAndo. 2010 - . All rights reserved.   19
result




Copyright © YusukeAndo. 2010 - . All rights reserved.   20
Where is flexibility ?

Isolatated core classes
   You can replace any class inside flow.
Libraries class is able to load any classes
   Specify structure by closure
Filter system
   No more callback
   Less sub class

                                              21
13 Packages of Lithium

        action           security
        analysys         storage
        console          template
        core             test
        data             tests
        g11n             util
        net

                                    22
Typical class tree

                     Provides common structure for
    Object           each classes.


                     For Static class.
  StaticObject       (including any model classes)


                     Provides configuable structure
   Adaptable


                                                      23
Unified constructor

  Object class provides common constructor

function   __construct(array   $config   =   array())
function   __construct(array   $config   =   array())
function   __construct(array   $config   =   array())
function   __construct(array   $config   =   array())
function   __construct(array   $config   =   array())
function   __construct(array   $config   =   array())
function   __construct(array   $config   =   array())

                                                        24
Adapter provides portability


 Connections   Logger      Catalog   Cache


                Auth       Session


                   Adaptable



                YourAdapter

                                             25
Ready to hack




 You can use any class you
like, even your class or any
      other component


                               26
Case Studies

Doctrine
 http://marianoiglesias.com.ar/li3-lithium/building-a-
blog-with-lithium-and-doctrine/

Twig
 http://rad-dev.org/li3_twig/source
Zend
http://rad-dev.org/lithium/wiki/guides/using/zend


            http://rad-dev.org/projects
                http://lab.lithify.me/

                                                         27
Recap

Lithium is lightest and most flexible.
Using much PHP5.3
   LSB
   NameSpace
   Closure
Community is still growing up.
   Documents and plugin will come soon.

                                          28
特報
     29
【講演】 The Origin of Lithium




 軽量・柔軟な次世代フレームワークLithiumの思想
  やコアフィーチャーを開発者が解説

                              30
それが




      PHP Matsuri



                    31
開催概要


日程
2010/10/02 (Sat) – 2010/10/03 (Sun)
会場
晴海グランドホテル
募集人数
100名 (スタッフ除く)
参加費用
2万円前後(食事・軽食・懇親会込み)


                                      32
タイムスケジュール
Time      October 2 (Sat)   Time     October 3 (Sun)

9:00 -    受付                8:00 –   朝食
10:00                       9:00
10:00 –   基調講演・ゲストセ         10:00 – 開発タイム
12:00     ッション              12:00
12:00 –   昼食・開発開始           12:00 – 昼食・デモ応募締切
13:00                       13:00
13:00 –   ワークショップ・セッ        13:00 - デモ発表
18:00     ション               16:00
18:00 –   夕食                16:30 – 表彰・クロージング
20:00                       17:00
20:00-    お楽しみ
22:00
終日        開発タイム

                                                       33
開発コンテスト・ハッカソン


 未発表作品・機能のコンテストを開催
  PHPに関連している作品(サービス、ツール、ドキュメントなど)

  チームでの応募も可

 開発タイム終了後にデモを実施
  各自持ち時間3分でデモ発表

  審査員によって各賞を選出

 作業スペースは終夜利用可
  まとまった開発時間を確保

                                    34
オールナイト開催


 初日朝9時から開始し、翌日17時に終了
 豪華ゲストによるセッション、ワークショップ
 開発用スペースでは各自開発や質問が可能
 2日目に作品のコンテストを開催


オールナイトでセッション、開発、交流


                         35
質疑応答




   ご静聴ありがとうございました。




  Follow @phpmatsuri
                       36

Contenu connexe

Tendances

Threads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonThreads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonYi-Lung Tsai
 
Best practices in Java and Swing
Best practices in Java and SwingBest practices in Java and Swing
Best practices in Java and SwingAshberk
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshopjulien pauli
 
Php and threads ZTS
Php and threads ZTSPhp and threads ZTS
Php and threads ZTSjulien pauli
 
NativeBoost
NativeBoostNativeBoost
NativeBoostESUG
 
Portland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modulesPortland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modulesPuppet
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshopjulien pauli
 
TensorFlow Lite (r1.5) & Android 8.1 Neural Network API
TensorFlow Lite (r1.5) & Android 8.1 Neural Network APITensorFlow Lite (r1.5) & Android 8.1 Neural Network API
TensorFlow Lite (r1.5) & Android 8.1 Neural Network APIMr. Vengineer
 
Objective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central DispatchObjective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central DispatchMatteo Battaglio
 
Functional Programming with LISP
Functional Programming with LISPFunctional Programming with LISP
Functional Programming with LISPAnil Kumar Pugalia
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)goccy
 
PHP 7 OPCache extension review
PHP 7 OPCache extension reviewPHP 7 OPCache extension review
PHP 7 OPCache extension reviewjulien pauli
 
Introduction to Rust language programming
Introduction to Rust language programmingIntroduction to Rust language programming
Introduction to Rust language programmingRodolfo Finochietti
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an OverviewRoberto Casadei
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCDrsebbe
 
Modified "Why MacRuby Matters"
Modified "Why MacRuby Matters"Modified "Why MacRuby Matters"
Modified "Why MacRuby Matters"Sean McCune
 
Python Developer Certification
Python Developer CertificationPython Developer Certification
Python Developer CertificationVskills
 
Introduction to python along with the comparitive analysis with r
Introduction to python   along with the comparitive analysis with r Introduction to python   along with the comparitive analysis with r
Introduction to python along with the comparitive analysis with r Ashwini Mathur
 
An introduction to Rust: the modern programming language to develop safe and ...
An introduction to Rust: the modern programming language to develop safe and ...An introduction to Rust: the modern programming language to develop safe and ...
An introduction to Rust: the modern programming language to develop safe and ...Claudio Capobianco
 

Tendances (20)

Threads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonThreads and Callbacks for Embedded Python
Threads and Callbacks for Embedded Python
 
Best practices in Java and Swing
Best practices in Java and SwingBest practices in Java and Swing
Best practices in Java and Swing
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
Php and threads ZTS
Php and threads ZTSPhp and threads ZTS
Php and threads ZTS
 
NativeBoost
NativeBoostNativeBoost
NativeBoost
 
Portland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modulesPortland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modules
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshop
 
TensorFlow Lite (r1.5) & Android 8.1 Neural Network API
TensorFlow Lite (r1.5) & Android 8.1 Neural Network APITensorFlow Lite (r1.5) & Android 8.1 Neural Network API
TensorFlow Lite (r1.5) & Android 8.1 Neural Network API
 
Objective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central DispatchObjective-C Blocks and Grand Central Dispatch
Objective-C Blocks and Grand Central Dispatch
 
Functional Programming with LISP
Functional Programming with LISPFunctional Programming with LISP
Functional Programming with LISP
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
Seeking Clojure
Seeking ClojureSeeking Clojure
Seeking Clojure
 
PHP 7 OPCache extension review
PHP 7 OPCache extension reviewPHP 7 OPCache extension review
PHP 7 OPCache extension review
 
Introduction to Rust language programming
Introduction to Rust language programmingIntroduction to Rust language programming
Introduction to Rust language programming
 
The Rust Programming Language: an Overview
The Rust Programming Language: an OverviewThe Rust Programming Language: an Overview
The Rust Programming Language: an Overview
 
Blocks & GCD
Blocks & GCDBlocks & GCD
Blocks & GCD
 
Modified "Why MacRuby Matters"
Modified "Why MacRuby Matters"Modified "Why MacRuby Matters"
Modified "Why MacRuby Matters"
 
Python Developer Certification
Python Developer CertificationPython Developer Certification
Python Developer Certification
 
Introduction to python along with the comparitive analysis with r
Introduction to python   along with the comparitive analysis with r Introduction to python   along with the comparitive analysis with r
Introduction to python along with the comparitive analysis with r
 
An introduction to Rust: the modern programming language to develop safe and ...
An introduction to Rust: the modern programming language to develop safe and ...An introduction to Rust: the modern programming language to develop safe and ...
An introduction to Rust: the modern programming language to develop safe and ...
 

En vedette

Testing your app with Selenium on Travis CI
Testing your app with Selenium on Travis CITesting your app with Selenium on Travis CI
Testing your app with Selenium on Travis CIYusuke Ando
 
ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大Yusuke Ando
 
DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版Yusuke Ando
 
DevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックDevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックYusuke Ando
 
Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Yusuke Ando
 
Travis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストTravis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストYusuke Ando
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsShelly Sanchez Terrell
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaChris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back KidEthos3
 

En vedette (10)

Testing your app with Selenium on Travis CI
Testing your app with Selenium on Travis CITesting your app with Selenium on Travis CI
Testing your app with Selenium on Travis CI
 
ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大
 
DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版
 
DevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックDevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニック
 
Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発
 
Travis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストTravis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テスト
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 

Similaire à 20100730 phpstudy

Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming LanguageYLTO
 
Socket Programming In Python
Socket Programming In PythonSocket Programming In Python
Socket Programming In Pythondidip
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworksYuri Visser
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller ColumnsJonathan Fine
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18Xiaoli Liang
 
How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsJarrod Overson
 
OpenERP Technical Memento
OpenERP Technical MementoOpenERP Technical Memento
OpenERP Technical MementoOdoo
 
Lambdas & Streams
Lambdas & StreamsLambdas & Streams
Lambdas & StreamsC4Media
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructuredAmi Mahloof
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules RestructuredDoiT International
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworksMD Sayem Ahmed
 
OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Foundation
 
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonTWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonCodemotion
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Antonio Peric-Mazar
 
Embrace dynamic PHP
Embrace dynamic PHPEmbrace dynamic PHP
Embrace dynamic PHPPaul Houle
 

Similaire à 20100730 phpstudy (20)

Best practices tekx
Best practices tekxBest practices tekx
Best practices tekx
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming Language
 
Socket Programming In Python
Socket Programming In PythonSocket Programming In Python
Socket Programming In Python
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18
 
How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web Applications
 
OpenERP Technical Memento
OpenERP Technical MementoOpenERP Technical Memento
OpenERP Technical Memento
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Lambdas & Streams
Lambdas & StreamsLambdas & Streams
Lambdas & Streams
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
Why Drupal is Rockstar?
Why Drupal is Rockstar?Why Drupal is Rockstar?
Why Drupal is Rockstar?
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
 
OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11
 
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonTWINS: OOP and FP - Warburton
TWINS: OOP and FP - Warburton
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
 
Embrace dynamic PHP
Embrace dynamic PHPEmbrace dynamic PHP
Embrace dynamic PHP
 

Plus de Yusuke Ando

Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Yusuke Ando
 
Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Yusuke Ando
 
ゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツYusuke Ando
 
Travis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションTravis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションYusuke Ando
 
ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行Yusuke Ando
 
PHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストPHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストYusuke Ando
 
Shimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるShimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるYusuke Ando
 
Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Yusuke Ando
 
Engine Yard Cloud
Engine Yard CloudEngine Yard Cloud
Engine Yard CloudYusuke Ando
 
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めようYusuke Ando
 
PHPの教室「foreachを極める」
PHPの教室「foreachを極める」PHPの教室「foreachを極める」
PHPの教室「foreachを極める」Yusuke Ando
 
90分間濃縮 PHPエラーの教室
90分間濃縮 PHPエラーの教室90分間濃縮 PHPエラーの教室
90分間濃縮 PHPエラーの教室Yusuke Ando
 
新標準PSRに学ぶきれいなPHP
新標準PSRに学ぶきれいなPHP新標準PSRに学ぶきれいなPHP
新標準PSRに学ぶきれいなPHPYusuke Ando
 
8時間耐久 PHP構築の教室
8時間耐久 PHP構築の教室8時間耐久 PHP構築の教室
8時間耐久 PHP構築の教室Yusuke Ando
 
4時間耐久 PHP on Heroku
4時間耐久 PHP on Heroku4時間耐久 PHP on Heroku
4時間耐久 PHP on HerokuYusuke Ando
 
8時間耐久PHPUnitの教室
8時間耐久PHPUnitの教室8時間耐久PHPUnitの教室
8時間耐久PHPUnitの教室Yusuke Ando
 

Plus de Yusuke Ando (20)

Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突
 
Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Webプログラマの為のUnity入門
Webプログラマの為のUnity入門
 
ゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツ
 
Travis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションTravis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーション
 
ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行
 
PHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストPHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテスト
 
Shimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるShimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆ける
 
Dev opschef
Dev opschefDev opschef
Dev opschef
 
Paa s and oss
Paa s and ossPaa s and oss
Paa s and oss
 
New relic
New relicNew relic
New relic
 
Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境
 
Engine Yard Cloud
Engine Yard CloudEngine Yard Cloud
Engine Yard Cloud
 
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
 
PHPの教室「foreachを極める」
PHPの教室「foreachを極める」PHPの教室「foreachを極める」
PHPの教室「foreachを極める」
 
20121225 php
20121225 php20121225 php
20121225 php
 
90分間濃縮 PHPエラーの教室
90分間濃縮 PHPエラーの教室90分間濃縮 PHPエラーの教室
90分間濃縮 PHPエラーの教室
 
新標準PSRに学ぶきれいなPHP
新標準PSRに学ぶきれいなPHP新標準PSRに学ぶきれいなPHP
新標準PSRに学ぶきれいなPHP
 
8時間耐久 PHP構築の教室
8時間耐久 PHP構築の教室8時間耐久 PHP構築の教室
8時間耐久 PHP構築の教室
 
4時間耐久 PHP on Heroku
4時間耐久 PHP on Heroku4時間耐久 PHP on Heroku
4時間耐久 PHP on Heroku
 
8時間耐久PHPUnitの教室
8時間耐久PHPUnitの教室8時間耐久PHPUnitの教室
8時間耐久PHPUnitの教室
 

20100730 phpstudy

  • 1. Lithium labo #2 Super Rad Framework 2010/07/30 php-study tokkyo yandod 1
  • 2. Who am I name Yusuke Ando a,k,a, yando Talking & Writing in JP PHP community Rakuten.inc Linkshare.inc in NYC since 2009 2
  • 4. From Lithium session at Tek X Chicago 4
  • 5. Agenda What is Lithium Core functionality Recap and announcement Copyright © YusukeAndo. 2010 - . All rights reserved. 5
  • 6. What is Lithium? The origin of Lithium Copyright © YusukeAndo. 2010 - . All rights reserved. 6
  • 7. Lithium Framework for PHP5.3 or higher Light weight, Flexibility Document Database as Primary citizen Was called as Cake3 Copyright © YusukeAndo. 2010 - . All rights reserved. 7
  • 8. Gwoo & Nate ! Copyright © YusukeAndo. 2010 - . All rights reserved. 8
  • 9. Little bit detail 12 developers in project Current version is 0.9.5 Almost There CakePHP like code Able to integrate outside Libraries. Including Unit Test, Console, Document Refined View and Model layer. 9
  • 10. PHP5,3 Namespace Finally language orgnizes naming rule. Late Static Binding (LSB) Allow full extending static class. Clousure Promote Aspect Oriented Programming. This is time to evolve our self. 10
  • 11. Core value PHP5.3 拡張性(flexibility) 11
  • 12. Core functionality 雰囲気を体験 Copyright © YusukeAndo. 2010 - . All rights reserved. 12
  • 13. Install PHP5.3 Also XAMPP MongoDB is recommended, MySQL is beta. Just extract archive. http://rad-dev.org/lithium/versions Database setting app/config/connections.php Simple install steps 13
  • 14. app/config/connections.php namespace use ¥lithium¥data¥Connections; Connections::add('default', array( 'type' => 'MongoDb', 'host' => 'localhost', 'database' => 'labo02' )); Copyright © YusukeAndo. 2010 - . All rights reserved. 14
  • 15. Homepage Copyright © YusukeAndo. 2010 - . All rights reserved. 15
  • 16. Blog Tutorial Controller calls PostModel Writing template with pure php. If you use MySQL, need to create schema first. Namespace Namespace Namespace Smaller code than any other Framework. 16
  • 17. app/models/Post.php <?php namespace namespace app¥models; class Post extends ¥lithium¥data¥Model { } Copyright © YusukeAndo. 2010 - . All rights reserved. 17
  • 18. app/controllers/PostsController.php <?php namespace app¥controllers; Importing model and parent class use app¥models¥Post; class PostsController extends ¥lithium¥action¥Controller { public function index(){ $posts = Post::all(); Return vars to return compact('posts'); template } } Copyright © YusukeAndo. 2010 - . All rights reserved. 18
  • 19. app/views/posts/index.html.php <?php foreach($posts as $post): ?> <article> <h1><?=$post->title ?></h1> <p><?=$post->body ?></p> </article> Auto escaping <?php endforeach; ?> Copyright © YusukeAndo. 2010 - . All rights reserved. 19
  • 20. result Copyright © YusukeAndo. 2010 - . All rights reserved. 20
  • 21. Where is flexibility ? Isolatated core classes You can replace any class inside flow. Libraries class is able to load any classes Specify structure by closure Filter system No more callback Less sub class 21
  • 22. 13 Packages of Lithium action security analysys storage console template core test data tests g11n util net 22
  • 23. Typical class tree Provides common structure for Object each classes. For Static class. StaticObject (including any model classes) Provides configuable structure Adaptable 23
  • 24. Unified constructor Object class provides common constructor function __construct(array $config = array()) function __construct(array $config = array()) function __construct(array $config = array()) function __construct(array $config = array()) function __construct(array $config = array()) function __construct(array $config = array()) function __construct(array $config = array()) 24
  • 25. Adapter provides portability Connections Logger Catalog Cache Auth Session Adaptable YourAdapter 25
  • 26. Ready to hack You can use any class you like, even your class or any other component 26
  • 27. Case Studies Doctrine http://marianoiglesias.com.ar/li3-lithium/building-a- blog-with-lithium-and-doctrine/ Twig http://rad-dev.org/li3_twig/source Zend http://rad-dev.org/lithium/wiki/guides/using/zend http://rad-dev.org/projects http://lab.lithify.me/ 27
  • 28. Recap Lithium is lightest and most flexible. Using much PHP5.3 LSB NameSpace Closure Community is still growing up. Documents and plugin will come soon. 28
  • 29. 特報 29
  • 30. 【講演】 The Origin of Lithium 軽量・柔軟な次世代フレームワークLithiumの思想 やコアフィーチャーを開発者が解説 30
  • 31. それが PHP Matsuri 31
  • 32. 開催概要 日程 2010/10/02 (Sat) – 2010/10/03 (Sun) 会場 晴海グランドホテル 募集人数 100名 (スタッフ除く) 参加費用 2万円前後(食事・軽食・懇親会込み) 32
  • 33. タイムスケジュール Time October 2 (Sat) Time October 3 (Sun) 9:00 - 受付 8:00 – 朝食 10:00 9:00 10:00 – 基調講演・ゲストセ 10:00 – 開発タイム 12:00 ッション 12:00 12:00 – 昼食・開発開始 12:00 – 昼食・デモ応募締切 13:00 13:00 13:00 – ワークショップ・セッ 13:00 - デモ発表 18:00 ション 16:00 18:00 – 夕食 16:30 – 表彰・クロージング 20:00 17:00 20:00- お楽しみ 22:00 終日 開発タイム 33
  • 34. 開発コンテスト・ハッカソン 未発表作品・機能のコンテストを開催 PHPに関連している作品(サービス、ツール、ドキュメントなど) チームでの応募も可 開発タイム終了後にデモを実施 各自持ち時間3分でデモ発表 審査員によって各賞を選出 作業スペースは終夜利用可 まとまった開発時間を確保 34
  • 35. オールナイト開催 初日朝9時から開始し、翌日17時に終了 豪華ゲストによるセッション、ワークショップ 開発用スペースでは各自開発や質問が可能 2日目に作品のコンテストを開催 オールナイトでセッション、開発、交流 35
  • 36. 質疑応答 ご静聴ありがとうございました。 Follow @phpmatsuri 36