kohana 3.1
DESCRIPTION
Slides I used for a presentation of Kohana 3 and it's features. Of course, there is a lot missed here but you should keep one thing in mind: Kohana is the best PHP framework. End of story :)TRANSCRIPT
![Page 2: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/2.jpg)
Kohana & VS Yii
Two different worlds.
![Page 3: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/3.jpg)
Framework buzz
• 30+ modern PHP frameworks• Different approaches• Hard to choose• Even harder to follow
![Page 4: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/4.jpg)
“Let’s fix what we have”
• EllisLabs’s slow development• Trying to improve CodeIgniter• Community rejection• BlueFlame
![Page 5: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/5.jpg)
“Let’s make it better”
• PHP5• Independant• Faster development
Kohana 2
![Page 6: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/6.jpg)
“Let’s make it much better”
• Complete rewrite• Keep it simple• No magic
Kohana 3
![Page 7: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/7.jpg)
![Page 8: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/8.jpg)
Kohana and I
• Used major frameworks for actual development before:Zend Framework, Symfony, CakePHP, CodeIgniter, etc.• Had to work on a Kohana 3.0.0.
project• “Man, this looks bad”
![Page 9: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/9.jpg)
STRESS
![Page 10: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/10.jpg)
• I have to install new PHP?• Why aren’t method names like in
Zend Framework?• Feels “limited”?• How to use this after ZF which is
so ... awesome and full of everything?• Where is the documentation?
![Page 11: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/11.jpg)
![Page 12: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/12.jpg)
REVELATION
![Page 13: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/13.jpg)
PHP 5.2
Because it was already here.
![Page 14: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/14.jpg)
Strict development and conventions.
Extremely strict.
![Page 15: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/15.jpg)
Code is a symphony
and you feel like an artist writing it
![Page 16: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/16.jpg)
Write your own code
instead of having it generated for you
![Page 17: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/17.jpg)
No magic stuff
because nothing happens out of nowhere
![Page 18: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/18.jpg)
DRY
You should never repeat yourself.
![Page 19: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/19.jpg)
Speed
So fast that no one seems to benchmark against it.
![Page 20: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/20.jpg)
Makes sense
Everything is isolated and in it’s place
![Page 21: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/21.jpg)
Unit tested
Having something safe and tested can’t be bad.
![Page 22: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/22.jpg)
![Page 23: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/23.jpg)
The Core
Only what PHP misses natively
![Page 24: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/24.jpg)
Full UTF-8 support
Because 6 isn’t coming soon
![Page 25: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/25.jpg)
Cascading File System
You don’t know how much you always needed it.
![Page 26: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/26.jpg)
Use Class, extend Kohana_Class
![Page 27: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/27.jpg)
HMVC
(Hierarchical Model-View-Controller)
![Page 28: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/28.jpg)
RFC 2616
![Page 29: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/29.jpg)
Speaking of DRY
![Page 30: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/30.jpg)
Routes help you
not to get lost
![Page 31: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/31.jpg)
Profile
![Page 32: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/32.jpg)
__(‘Internationalization’)
As easy as it can be
![Page 33: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/33.jpg)
HelpersClasses like any others• Powerful toolset
– Arr– CLI– Cookie– Date– Debug– Encrypt– Feed– File– Form– Fragment (caching)– HTML
– I18n– Inflector– Log– Num– Security– Session– Text– Upload– URL– UTF8– Validation
![Page 34: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/34.jpg)
![Page 35: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/35.jpg)
Modularity
Force powered by CFS
![Page 36: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/36.jpg)
Default modules
• Auth• Cache• Codebench• Database• Image• ORM• UnitTest• Userguide
![Page 37: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/37.jpg)
Auth
• Provides basic tools for authentication• Driver support – file auth by default
![Page 38: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/38.jpg)
Cache
• Driver support – all popular drivers• Very easy to use and change driver later
![Page 39: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/39.jpg)
CodeBench
• Easy benchmarking interface on application level
![Page 40: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/40.jpg)
Database
• Powerful object oriented interface• Multiple driver support, MySQL and PDO by
default
![Page 41: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/41.jpg)
Image
• Provides extremely easy interface for image manipulation
• Feels like Photoshop
![Page 42: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/42.jpg)
ORM
• ActiveRecord pattern• Respect and be respected (conventions)
![Page 43: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/43.jpg)
Unittest
• Web interface for running all unit tests from a single place: app, modules, framework
![Page 44: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/44.jpg)
Userguide
• All framework documentation in one place• Application’s API documented “on-the-fly”• Perfect for collaboration and new developers
arriving to the project
![Page 45: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/45.jpg)
![Page 46: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/46.jpg)
Community modules
• 500+ modules• Use Zend Framework or any other library as a
module• Obvious Kohanas’ affection on module
authors’ code quality
![Page 47: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/47.jpg)
![Page 48: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/48.jpg)
People behind Kohana
Small, yet very elite community
![Page 49: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/49.jpg)
Rasmus Lerdorf
is well known for “hating” frameworks
![Page 50: Kohana 3.1](https://reader036.vdocuments.us/reader036/viewer/2022081505/555671abd8b42abc5a8b4d6a/html5/thumbnails/50.jpg)
Thank you
Please join the Kohana workshop