Top Banner
Kohana VS Yii By Kemal Delalic ([email protected])
50

Kohana 3.1

May 16, 2015

Download

Technology

Kemal Delalić

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 :)
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Kohana 3.1

Kohana VS Yii

By Kemal Delalic ([email protected])

Page 2: Kohana 3.1

Kohana & VS Yii

Two different worlds.

Page 3: Kohana 3.1

Framework buzz

• 30+ modern PHP frameworks• Different approaches• Hard to choose• Even harder to follow

Page 4: Kohana 3.1

“Let’s fix what we have”

• EllisLabs’s slow development• Trying to improve CodeIgniter• Community rejection• BlueFlame

Page 5: Kohana 3.1

“Let’s make it better”

• PHP5• Independant• Faster development

Kohana 2

Page 6: Kohana 3.1

“Let’s make it much better”

• Complete rewrite• Keep it simple• No magic

Kohana 3

Page 7: Kohana 3.1
Page 8: Kohana 3.1

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

STRESS

Page 10: Kohana 3.1

• 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
Page 12: Kohana 3.1

REVELATION

Page 13: Kohana 3.1

PHP 5.2

Because it was already here.

Page 14: Kohana 3.1

Strict development and conventions.

Extremely strict.

Page 15: Kohana 3.1

Code is a symphony

and you feel like an artist writing it

Page 16: Kohana 3.1

Write your own code

instead of having it generated for you

Page 17: Kohana 3.1

No magic stuff

because nothing happens out of nowhere

Page 18: Kohana 3.1

DRY

You should never repeat yourself.

Page 19: Kohana 3.1

Speed

So fast that no one seems to benchmark against it.

Page 20: Kohana 3.1

Makes sense

Everything is isolated and in it’s place

Page 21: Kohana 3.1

Unit tested

Having something safe and tested can’t be bad.

Page 22: Kohana 3.1
Page 23: Kohana 3.1

The Core

Only what PHP misses natively

Page 24: Kohana 3.1

Full UTF-8 support

Because 6 isn’t coming soon

Page 25: Kohana 3.1

Cascading File System

You don’t know how much you always needed it.

Page 26: Kohana 3.1

Use Class, extend Kohana_Class

Page 27: Kohana 3.1

HMVC

(Hierarchical Model-View-Controller)

Page 28: Kohana 3.1

RFC 2616

Page 29: Kohana 3.1

Speaking of DRY

Page 30: Kohana 3.1

Routes help you

not to get lost

Page 31: Kohana 3.1

Profile

Page 32: Kohana 3.1

__(‘Internationalization’)

As easy as it can be

Page 33: Kohana 3.1

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
Page 35: Kohana 3.1

Modularity

Force powered by CFS

Page 36: Kohana 3.1

Default modules

• Auth• Cache• Codebench• Database• Image• ORM• UnitTest• Userguide

Page 37: Kohana 3.1

Auth

• Provides basic tools for authentication• Driver support – file auth by default

Page 38: Kohana 3.1

Cache

• Driver support – all popular drivers• Very easy to use and change driver later

Page 39: Kohana 3.1

CodeBench

• Easy benchmarking interface on application level

Page 40: Kohana 3.1

Database

• Powerful object oriented interface• Multiple driver support, MySQL and PDO by

default

Page 41: Kohana 3.1

Image

• Provides extremely easy interface for image manipulation

• Feels like Photoshop

Page 42: Kohana 3.1

ORM

• ActiveRecord pattern• Respect and be respected (conventions)

Page 43: Kohana 3.1

Unittest

• Web interface for running all unit tests from a single place: app, modules, framework

Page 44: Kohana 3.1

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
Page 46: Kohana 3.1

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
Page 48: Kohana 3.1

People behind Kohana

Small, yet very elite community

Page 49: Kohana 3.1

Rasmus Lerdorf

is well known for “hating” frameworks

Page 50: Kohana 3.1

Thank you

Please join the Kohana workshop