2024: Domino Containers - The Next Step. News from the Domino Container commu...
CakeFest 2013 keynote
1. WHAT KEPT US BUSY
A QUICK SUMMARY OF A YEAR WORKING IN CAKEPHP
CakeFest 2013 @jose_zap
2. CAKEPHP IS COMMUNITY DRIVEN
This is both good and bad. There is a slower pace in what we
do, but the result is a consequence of what the community is
actually asking for based of the collective input.
3. WE GROW OLDER, BUT WISER
In general, people working in any organization...
14. NAMESPACES
We hate (wrong slash) but we finally converted the virtual
packages into namespaces
if (strpos($class, '') !== false)
Yes, we'll keep using the plugin syntax and save from writing
things like that
21. NEW QUERY BUILDER
Create 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();
22. SMART SQL DIALECT TRANSLATION
You 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'])
]
});
23. SMART ASSOCIATION EAGER LOADING
This 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();