This comprehensive introduction to Symfony2 will help experienced and new PHP developers understand the power and flexibility of Drupal 8's new development framework. With hands on exercises throughout the day-long training, participants will learn basic Symfony2 concepts, build simple applications, and explore how Symfony2 is used in Drupal 8.
Participants will leave class with a working knowledge of the Symfony2 framework and an introduction to Drupal 8. Topic slides with graphical representations of the material will be expanded to help students understand content areas.
Class begins at 09:00, lunch is at 11:45, class ends at 17:00.
Topic areas are as follows:
- Object Oriented Recap
- Framework or CMS?
- Zend vs. Symfony2
Framework and Tools
- Standard Edition Install
- HTTP requests
- Coding standards
- Debug toolbar
- Exception traces
Configuring the application
- Supported formats: XML, YAML and PHP
- Global config
- URIs global config
- Overriding at the bundle level
- Twig template engine syntax
- Twig and PHP
- Template inheritance
- Template and Action inclusion
- Defining and including slots
- Generating URIs and view helpers
Actions and the end user request
- Controller classes and action methods
- Mapping controllers using routing
- Raw response or template response
- Reading data from the user’s request
- Reading and writing session data
- Multiple config files via inclusion, overrides
- Triggering a 404 error page
Interacting with a relational database
- Introduction to PDO
- Getting a MySQL connection
- Executing a SQL query
- Securing SQL queries
- Factoring business logic into model classes
Interacting with forms
- The form framework
- Basic forms
- Validation rules
- Prototyping form rendering with Twig
- Retrieving validated input
Review and Recap
Symfony2 and Drupal 8
- Console Scaffolding module
Who will gain the most from this course?
Drupal developers who have not begun to learn Symfony2 or prepare for changes in Drupal 8 development. Experienced PHP developers and developers who are new to PHP or moving from .NET or other platforms.
Prerequisites for this course
Working knowledge of PHP or other coding systems. Drupal module development experience will be helpful. Local dev environment and text editor. Netbeans or other equivalent IDE helpful.
Students must bring their own wifi enabled laptops with root access to class. No computers will be provided.