drupal course 2012 - code driven development

37
Code driven development Sunday 26 January 14

Upload: attila-cs-nagy

Post on 08-May-2015

143 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Drupal Course 2012 - Code Driven Development

Code driven development

Sunday 26 January 14

Page 2: Drupal Course 2012 - Code Driven Development

Why are we using Drupal?

• Content authorization.

• Large set of configurations.

• Lot of modules with huge amount of features

Sunday 26 January 14

Page 3: Drupal Course 2012 - Code Driven Development

Most used modules.

• Views

• Panels

• Context

• Date

• ....

Sunday 26 January 14

Page 4: Drupal Course 2012 - Code Driven Development

So what is code driven development?

Sunday 26 January 14

Page 5: Drupal Course 2012 - Code Driven Development

Export it! Export it all!!

Sunday 26 January 14

Page 6: Drupal Course 2012 - Code Driven Development

Workflows

Sunday 26 January 14

Page 7: Drupal Course 2012 - Code Driven Development

Dev > Staging > Production

Sunday 26 January 14

Page 8: Drupal Course 2012 - Code Driven Development

Why should we use workflows?

Sunday 26 January 14

Page 9: Drupal Course 2012 - Code Driven Development

To prevent the chaos!Sunday 26 January 14

Page 10: Drupal Course 2012 - Code Driven Development

Use version control!Sunday 26 January 14

Page 11: Drupal Course 2012 - Code Driven Development

Version controlling workflows

• http://www.drupal.org

• http://www.github.com

Sunday 26 January 14

Page 12: Drupal Course 2012 - Code Driven Development

github

• http://help.github.com/mac-set-up-git/

• http://help.github.com/fork-a-repo/

Sunday 26 January 14

Page 13: Drupal Course 2012 - Code Driven Development

Features modulehttp://www.drupal.org/project/features

Sunday 26 January 14

Page 14: Drupal Course 2012 - Code Driven Development

Drupal featureSunday 26 January 14

Page 15: Drupal Course 2012 - Code Driven Development

Useful modules for Features

• Strongarm - http://drupal.org/project/strongarm

• Node export - http://drupal.org/project/node_export

Sunday 26 January 14

Page 16: Drupal Course 2012 - Code Driven Development

Chaos toolsexportable api

http://www.drupal.org/project/ctoolshttp://drupal.org/node/928026

Sunday 26 January 14

Page 17: Drupal Course 2012 - Code Driven Development

Entity

Sunday 26 January 14

Page 18: Drupal Course 2012 - Code Driven Development

Drupalize your data!Use Entities!

Sunday 26 January 14

Page 19: Drupal Course 2012 - Code Driven Development

Entities and bundles

Sunday 26 January 14

Page 20: Drupal Course 2012 - Code Driven Development

When should we use entities?

Sunday 26 January 14

Page 21: Drupal Course 2012 - Code Driven Development

hook_entity_info()

Sunday 26 January 14

Page 22: Drupal Course 2012 - Code Driven Development

Entity APIhttp://www.drupal.org/project/entity

Sunday 26 January 14

Page 23: Drupal Course 2012 - Code Driven Development

Compatibility

• Rules

• Search API

• Features

• i18n

• Views

Sunday 26 January 14

Page 24: Drupal Course 2012 - Code Driven Development

CRUD API

• entity_create($entity_type, array $values)

• entity_save($entity_type, $entity)

• entity_delete($entity_type, $id)

• entity_view($entity_type, $entities, $view_mode = 'full', $langcode = NULL, $page = NULL)

• entity_access($op, $entity_type, $entity = NULL, $account = NULL)

Sunday 26 January 14

Page 25: Drupal Course 2012 - Code Driven Development

hook_entity_property_info()

Sunday 26 January 14

Page 26: Drupal Course 2012 - Code Driven Development

UUIDhttp://www.drupal.org/project/uuid

Universally Unique IDentifier

Sunday 26 January 14

Page 27: Drupal Course 2012 - Code Driven Development

UUID API

• entity_uuid_load()

• entity_uuid_save()

Sunday 26 January 14

Page 28: Drupal Course 2012 - Code Driven Development

Install profiles - Distributions

Sunday 26 January 14

Page 29: Drupal Course 2012 - Code Driven Development

Distributions

• Open Atrium

• Aegir

• Drupal Commons

• Pressflow

• Tattler

Sunday 26 January 14

Page 30: Drupal Course 2012 - Code Driven Development

DrushDrupal Shell

http://drupal.org/project/drush

Sunday 26 January 14

Page 31: Drupal Course 2012 - Code Driven Development

Makefilesdrush make

Sunday 26 January 14

Page 32: Drupal Course 2012 - Code Driven Development

Drupal 8

Sunday 26 January 14

Page 33: Drupal Course 2012 - Code Driven Development

Feature freeze2012 december

Sunday 26 January 14

Page 35: Drupal Course 2012 - Code Driven Development

CMI

• Signed file storage

• Active Store

• Configuration API

Sunday 26 January 14

Page 37: Drupal Course 2012 - Code Driven Development

Thank you for your attention!

Sunday 26 January 14