From c3701ceed9af52417f427f4fa32e14c7599eef18 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 6 Jul 2013 00:06:44 +0200 Subject: [PATCH] use a better DI introduction video --- developer_manual/app/appframework/container.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/developer_manual/app/appframework/container.rst b/developer_manual/app/appframework/container.rst index acc150b15..3224cd72f 100644 --- a/developer_manual/app/appframework/container.rst +++ b/developer_manual/app/appframework/container.rst @@ -3,9 +3,9 @@ Runtime configuration .. sectionauthor:: Bernhard Posselt -The App Framework assembles the application by using an Inversion of Control container which does :doc:`../general/dependencyinjection`. Dependency Injection helps you to create testable code. A good overview over how it works and what the benefits are can be seen on `Google's Clean Code Talks `_ +The App Framework assembles the application by using an Inversion of Control container which does :doc:`../general/dependencyinjection`. Dependency Injection helps you to create testable code. For a very simple and good Tutorial, watch the `Dependency Injection and the art of Services and Containers Tutorial on YouTube`_ A broader overview over how it works and what the benefits are can be seen on `Google's Clean Code Talks `_ -The container is configured in :file:`dependencyinjection/dicontainer.php`. By default `Pimple `_ is used as dependency injection container. A `tutorial can be found here `_ +The container is configured in :file:`dependencyinjection/dicontainer.php`. By default `Pimple `_ is used as dependency injection container. A `tutorial can be found here `_ To add your own classes simply open the :file:`dependencyinjection/dicontainer.php` and add a line like this to the constructor: @@ -42,7 +42,7 @@ API abstraction layer .. sectionauthor:: Bernhard Posselt -ownCloud currently has a ton of static methods which is a very bad thing concerning testability. Therefore the App Framework comes with an :php:class:`OCA\\AppFramework\\Core\\API` abstraction layer (basically a `facade `_) which wraps the static method calls inside an object. +ownCloud currently has a ton of static methods which is a very bad thing concerning testability. Therefore the App Framework comes with an :php:class:`OCA\\AppFramework\\Core\\API` abstraction layer (basically a `facade `_) which wraps the static method calls inside an object. .. note:: This is a temporary solution until ownCloud offers a proper API with normal classes that can be used in the DIContainer. @@ -72,7 +72,7 @@ If you find yourself in need to use more ownCloud internal static methods simply } } - + and wire it up in the container: :file:`dependencyinjection/dicontainer.php`