2. I am Kalin Chernev
Web developer @EC
Interests: APIs, tooling and reusability
Bragging rights: 1st Drupal site in 2007
Ping me: @kalinchernev
Hello!
3. Agenda
◉ Style guides
◉ 3 focus areas
◉ Drupal building blocks
◉ 3 steps to implement components
◉ Layouts
7. Style guides: overall picture
◉ General-purpose standardization
◉ Focus on re-usability of components
◉ Useful in large projects
◉ Live documentation of design principles
◉ Fits well into the world of Agile
8. Additional resources on SG
◉ Google for John Albin, Drupal, style guides
◉ Go to styleguides.io
◉ Next Europa style guide (in progress)
◉ Decoupling Drupal Without Losing Your Head
19. Drupal 7 building blocks
What Define / Specify Alter / Configure View / Render
Element hook_element_info() hook_element_info_alter() theme_element()
Block hook_block_info() hook_block_configure() hook_block_view()
Field (Field API) hook_field_info() hook_field_settings_form() hook_field_prepare_view()
Field (DS) hook_ds_field_info() hook_ds_field_settings_form() Callback function
Entity hook_entity_info() Field API || Display suite hook_entity_view()
20. But wait! What about Drupal 8?
Different code, but same concepts.
Aim for universal content modelling!
Entities + Fields + View modules
23. Implementation strategy
1. Define: hook_field_formatter_info()
2. Configure: hook_field_formatter_settings_form()
3. View: hook_field_formatter_view()
Site building: enable the user to configure the number of nav items.
Development: Field Formatter API: a convenient layer on top of Field API.
Business: reusable Drupal tool to apply styling on secondary information.