4 . 14 . 2015
with your host, Derek DeRaps!
Take-aways: Drupal theming sucks (hear Zack cheer). Use REST to deliver data to the front-end. Writing actual HTML markup > template preprocessors and all that junk.
I like the idea of presentations on stuff like this that represents a big part of our day. Cue Alex for recap.
I only saw the first half of this two-session presentation. It was great. Adam Hoenich (phenaproxima) is a mad scientist/genius, and he worked with Angie to write the Module Upgrader.
Brought to you by yours truly and the traitorous but still brilliant Kendall Totten.
Did not see it, but just plugging as a potential path for our Vagrant project. Kalabox 2.0 already uses Docker, just saying.
A pretty tasty session.
Simpletest dies. Rise of the PHP Unit. But Behat?? This is going to be tough.
A plug for our overlords to watch.
Presented by the usual suspects.
Migrate in Core (Mike Anello is a facilitator for the initiative). Matt Davis worked with Doug Green, Adam, and Mike to fix a migration script. Had signoff by Chx before the end of the day. I stacktraced some issues in Benjy's iFrame Migrate Example module.
Swanky co-working digs on the up-and-coming Atlanta Westside.
Symfony Core Team Member. US Office Head & Trainer for KnpLabs, Co-author of the Symfony2 documentation and "More with Symfony." Brilliant instructor.
After-party with good food and beers. Was great to see folks I’ve never met before. I lost pool four times to Matt Davis and then we “lost” once to Dave and Paul.
A yaml version of hook_menu().
A page callback.
Same thing as page callbacks. They perform some fancy logic (invented by you) and return markup, render arrays, etc.*
They translate and sanitize text, create links, log messages, query the database, etc. They depend on the services provided by functions such as: t(), l(), watchdog(), db_*(), etc.
"But," you say, "most of those old functional programming methods are gone! What are we to do?"
The services they provided to us (translation, sanitization, link handling, logging etc.) are replaced with objects whose methods do the same thing.
Two types of classes:
Actions vs. Data
(Services vs. Entities)
It’s a useful object. Collections of related methods to accomplish tasks that we all use a regular basis.
So far, we know that our controllers depend on these new things called Services… how do we go about using them?
We reach into a big bag of all the available Services (aka the Service Container) and select it by name.
The Service Container is just collection of the useful objects we need to do our job.
In the Controller’s create() method, we accept the Service Container as an argument. We use it to grab all the services we will need later on (in the actual page callback) and assign to class variables for later use.
Guess what you just did: You took your Controller and injected some of Services (useful objects) that it depends on. Dependency Injection isn’t so scary!
Why go through the hassle of injecting?
Why not just query the Services Container directly in our Controller's page callback when it’s time to use a given Service?
$conf['mail_system'] = array('default-system' => 'DevelMailLog');
$conf['cache_default_class'] = 'MemCacheDrupal';
The Drupal Console is a suite of tools that you run on a command line interface (CLI) to generate boilerplate code and interact with a Drupal 8 installation.
composer install vs.
composer update
You can update just a single project instead of the whole project.
E.g., composer update symfony/symfony
To add a project easily: composer require guzzlehttp/guzzle
~2.6.2 vs. 2.6.*
Makes our life easier, and adds more magic into IDEs like PHPStorm.