Upload
jose-lorenzo-rodriguez
View
6.587
Download
0
Tags:
Embed Size (px)
DESCRIPTION
This keynote presented in CakeFest 2013 contains a small summary of the things we have been working on for CakePHP 3.0
Citation preview
WHAT KEPT US BUSYA QUICK SUMMARY OF A YEAR WORKING IN CAKEPHP
CakeFest 2013 @jose_zap
CAKEPHP IS COMMUNITY DRIVENThis is both good and bad. There is a slower pace in what wedo, but the result is a consequence of what the community is
actually asking for based of the collective input.
WE GROW OLDER, BUT WISERIn general, people working in any organization...
JOIN
GET PASSIONATE ABOUT IT
GET EXPERIENCE
GET BORED
GET MARRIED, HAVE CHILDREN
BECOME BUSIER
AND SOME... LEAVE(sad panda face)
THE CORE TEAMHAVE A CONSTANT DREAM AND A PASSION TO MAKE THINGS BETTER
THIS IS A SUMMARY OF THE THINGS WEDREAMT ABOUT
and made its way into the code
HELLO PHP 5.4
NAMESPACESWe hate \ (wrong slash) but we finally converted the virtual
packages into namespacesif (strpos($class, '\\') !== false)
Yes, we'll keep using the plugin syntax and save from writingthings like that
NEW UNIFIED CONFIGConfiguration is passed directly to the classes that are
interested about them
Bye, Bye DATABASE_CONFIG
COMPOSER SUPPORT OUT OF THE BOX
FASTER, BETTER ROUTERReverse routing got extremely fast and now it is possible to
have named routes!
ROUTING PREFIXES USING NAMESPACESInstead of UsersController::admin_index() you will have a
separate Admin\UsersController::index()
FASTER, CONSISTENT AND LEANER EVENTMANAGER
FEATURE RICH HTTPSOCKET CLASS
NEW QUERY BUILDERCreate queries using a fluent interface with automatic type
conversion
$union = (new Query($connection)) ->select(['id', 'title']) ->from(['a' => 'articles']);
$results = (new Query($connection)) ->select(['id', 'comment']) ->from(['c' => 'comments']) ->where(['created >=', new DateTime('1 day ago')]) ->union($union) ->execute();
SMART SQL DIALECT TRANSLATIONYou can use this in both PostgreSQL and MySQL
$query = (new Query($connection))->select(function($q) { return [ 'id', 'full_name' => $q->concat(['first_name', ' ', 'last_name']) ]});
SMART ASSOCIATION EAGER LOADINGThis will use a single query
$table = Table::build('author');$table->hasMany('article', [ 'property' => 'articles', 'strategy' => 'subquery', 'sort' => ['article.id' => 'asc']]);$results = $table->find('all')->contain('article')->toArray();
CHAINABLE CUSTOM FINDERSWoot!?
$articles->latest()->popular()->list()->toArray();
RESULT STREAMING
STOPPABLE FINDSBefore find callbacks can stop the query from being executed
and return cached results
MAP-REDUCE
SCHEMA MIGRATIONS
AND MUCH, MUCH MORE
WELCOME TO CAKEFESTThis is the right place to figure out where we are heading