SlideShare a Scribd company logo
1 of 42
Future Proofing your Drupal
Skills

Piyuesh kumar
QED42
Routes {Adding new menu / Access Control / Local
Tasks / Upcasting.}
Forms {Writing new custom form / Writing system settings
form.}
Configuration System.
More Changes for developers.
Drupal 8 Demo module showing all of the above

Topics

Drupal 8 Demo module showing all of the above
Drupal 8 Demo module showing all of the above
Drupal 8 Demo module showing all of the above
Drupal 8 Demo module showing all of the above
Drupal 8 Demo module showing all of the above
Drupal 8 Demo module showing all of the above
2
Terminologies
•

Dependency Injection
Service Container / Dependency Injection
Container
Routing
Controllers
ConfigFactory

ConfigFactory
ConfigFactory
ConfigFactory
ConfigFactory

3
Dependency Injection is a
25 $ term for a 5 ¢ concept

4
Lets take a look at some Wrong code to understand this.

5
OBJECT ORIENTED WRONG CODE

6
INJECTING ITEMS REQUIRED BY THE CLASS

7
THE LESS YOUR CODE
KNOWS ABOUT THINGS
IT NEED THE MORE
REUSABLE IT IS
8
ALL OUR NOTIFIER CLASS NEEDS TO KNOW IS IT NEEDS
SOMETHING ON WHICH IT HAS TO CALL THE SEND METHOD.

9
Learn More about DI

DrupalCon Portland (Kat Bailey)
https://www.youtube.com/watch?v=kocJ6pn9kEc

10
Service Container
A Service Container (or dependency injection container) is
simply a PHP object that manages the instantiation of
services (i.e. objects)

{d8_demo.services.yml}

11
12
Things are about to get geeky!
13
Module Info file

14
Drupal 7
{d7.info}

15
Drupal 8
{d8.info.yml}

16
Routing

hook_menu replaced by
hook_default_menu_links ()
(https://drupal.org/node/20476
33 )

17
Routes
{d7.module}

18
Routes
{d8_demo.module}

{d8_demo.routing.yml}

19
Controllers
•Page

callbacks => Controllers

•namespace

Drupal/lib/<module_name/Controller/<Controller classname.php

What? Why so long?

20
Namespacing & Folder Structure

Name Spacing
• Keeps

it reusable in other project with risk factor for conflict = 0.
Drupal/<module_name>.

• Drupal/<module_name>/Controller

to keep all the Controllers related to
<module_name> grouped in the same place.

Folder Structure
• lib/Drupal/<module_name>/Controller/<classname.php
• lib

directory is used to keep all the php classes seperate from other module/yml files.

• The

Drupal/hello part of the directory path is needed to comply with PSR-0, a
standard that says that the complete class name must be represented on the file
system.

21
Drupal 8 Controller
{d8DemoController.php}

22
Route Access
•
•
•
•

Controlled via yml file iteslf.
_permission
_<access callback>
_options: _access_mode (ALL/ANY)

23
Defining _access_check_admin
•

Register a new service using d8_demo.services.yml

•

tagged with access_check so Drupal can find it when it
loads all access checks

•

Convention to create a unique service name starting with
access_check.

24
d8DemoAccessCheck
Extends
AccessInterface

25
Reusable Requirements
• Allow

everyone
_access: 'TRUE'

• Check

if user is logged in
_user_is_logged_in: 'TRUE'

• Check

if a user has a permission
_permission: 'my permission name'

• Check

if a user has a role
_role: 'role1+role2' (AND)
_role: 'role1, role2' (OR)
26
Menu Local Tasks(Drupal 7)
{d7_demo.module}

27
Menu Local tasks(Drupal 8)
{d8_demo.local_tasks.yml}

28
Upcasting
{d7_demo.module}

Drupal 8

29
Drupal 8 ParamConverter
{d8_demo.routing.yml}

{d8DemoController.php
}

30
Forms
•

Form Api stays the same in Drupal 8. However, forms are now
Classes coz of d8's Object-oriented nature.

•

Base Classes in core:
•

FormBase

•

ConfigFormBase

•

ConfirmFormBase

•

BulkFormBase

•

ViewsFormBase

•

FieldInstanceFormBase
31
FormBase/ConfigFormBase
Example

32
Forms Helper Methods

33
Configuration Management

variable_get()
variable_set()
variable_del()

34
How do i save my configurations now?
•

•

DrupalCoreConfigConfigFactory

Where does this data get saved now?

35
Plugin System
•

Info hooks => Plugins

•

hook_info => annotation based discovery

•

Why annotation based?
•
•

Memory used is released once the file is read.

•

•

Uses php's tokenizer which allows the files to be parsed as text.

Loading the file in as php would mean that allocated memory was
required until the request was finalised.

All info hooks as plugins.
36
Block as Plugins

37
Module/hook system
functions replaced with
module handler service(
https://drupal.org/node/1894
)
38
39
Changes to commonly used Drupal functions/hooks
•

hook_init removed(https://drupal.org/node/2013014)

•

drupal_goto has been
removed(https://drupal.org/node/2023537)e.g.,
drupal_goto($url)=>new RedirectResponse($url);

•

hook_boot has been removed(https://drupal.org/node/1909596)

•

$_GET[‘q'] has been removed(https://drupal.org/node/1659562)

•

drupal_*_form functions replaced with formBuilder service. e.g.,
drupal_get_from => Drupal::formBuilder()->getForm()

•

and many more...(https://drupal.org/list-changes)

40
References
Demo code is available at
https://github.com/piyuesh23/Drupal8-demo
•

https://drupal.org/list-changes

•

http://previousnext.com.au/blog/controlling-accessdrupal-8-routes-access-checks

•

https://drupal.org/node/1800686

•

DrupalCon Portland Videos
(http://www.youtube.com/playlist?
list=PLpeDXSh4nHjRlZKs7cj2L_kLI5osP5ERc)
41
THANK YOU!!

42

More Related Content

Similar to Future Proofing Your Drupal Skills

Intro to drupal_7_architecture
Intro to drupal_7_architectureIntro to drupal_7_architecture
Intro to drupal_7_architectureHai Vo Hoang
 
A new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonA new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonLuca Lusso
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Phase2
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 
Introducing DeploYii 0.5
Introducing DeploYii 0.5Introducing DeploYii 0.5
Introducing DeploYii 0.5Giovanni Derks
 
08 Dynamic SQL and Metadata
08 Dynamic SQL and Metadata08 Dynamic SQL and Metadata
08 Dynamic SQL and Metadatarehaniltifat
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS DrupalMumbai
 
Devel for Drupal 8
Devel for Drupal 8Devel for Drupal 8
Devel for Drupal 8Luca Lusso
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practicesmanugoel2003
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Antonio Peric-Mazar
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMPInria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMPStéphanie Roger
 
From Procedural to Object-Oriented PHP in Drupal
From Procedural to Object-Oriented PHP in DrupalFrom Procedural to Object-Oriented PHP in Drupal
From Procedural to Object-Oriented PHP in DrupalAmber Matz
 
Drupal 8 DX Changes
Drupal 8 DX ChangesDrupal 8 DX Changes
Drupal 8 DX Changesqed42
 
Power shell training
Power shell trainingPower shell training
Power shell trainingDavid Brabant
 
Adop and maintenance task presentation 151015
Adop and maintenance task presentation 151015Adop and maintenance task presentation 151015
Adop and maintenance task presentation 151015andreas kuncoro
 

Similar to Future Proofing Your Drupal Skills (20)

Intro to drupal_7_architecture
Intro to drupal_7_architectureIntro to drupal_7_architecture
Intro to drupal_7_architecture
 
A new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonA new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp London
 
Taking Advantage of Microsoft PowerShell
Taking Advantage of Microsoft PowerShell Taking Advantage of Microsoft PowerShell
Taking Advantage of Microsoft PowerShell
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
Overview of RedDatabase 2.5
Overview of RedDatabase 2.5Overview of RedDatabase 2.5
Overview of RedDatabase 2.5
 
Introducing DeploYii 0.5
Introducing DeploYii 0.5Introducing DeploYii 0.5
Introducing DeploYii 0.5
 
08 Dynamic SQL and Metadata
08 Dynamic SQL and Metadata08 Dynamic SQL and Metadata
08 Dynamic SQL and Metadata
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
 
Devel for Drupal 8
Devel for Drupal 8Devel for Drupal 8
Devel for Drupal 8
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Drupal online training - GoLogica
Drupal online training - GoLogicaDrupal online training - GoLogica
Drupal online training - GoLogica
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMPInria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
 
From Procedural to Object-Oriented PHP in Drupal
From Procedural to Object-Oriented PHP in DrupalFrom Procedural to Object-Oriented PHP in Drupal
From Procedural to Object-Oriented PHP in Drupal
 
Drupal 8 DX Changes
Drupal 8 DX ChangesDrupal 8 DX Changes
Drupal 8 DX Changes
 
Power shell training
Power shell trainingPower shell training
Power shell training
 
Adop and maintenance task presentation 151015
Adop and maintenance task presentation 151015Adop and maintenance task presentation 151015
Adop and maintenance task presentation 151015
 

Recently uploaded

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Future Proofing Your Drupal Skills

Editor's Notes

  1. Clutter-free/Reusable/Testable
  2. Necessary Clutter module_load_include Need to Bootstrap Drupal or at least the class for testing/reusing.
  3. Constructor needs to know about Mailer Class Mailer Class might need arguments in future requiring us to change the constructor of any class implementing it. Or we might not need to send an email in future at all.
  4. Constructor just knows its needs to be supplied with an instance of a Mailer class.
  5. Class can accept anything thats implementing MailerInterface. Inversion of Control. Framework supplies the code with whatever it needs. Rather than code instanting the lib classes and calling the library functions.
  6. Classes: doesn’t know anything about the container. Decoupled. Declaratively expressing their dependencies. Configuration: Contains Service Definitions(Class to intantiate+its dependencies) Injector/Container: Application: Entry point of application. Instantiate the container and ask it for what app needs.