| dbpprop:abstract
|
- Inversion of control, or IoC, is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to procedural programming. In traditional programming the flow is controlled by a central piece of code. Using Inversion of Control this central control as a design principle is left behind. Although the caller will eventually get its answer, how and when is out of control of the caller. It is the callee who decides to answer how and when. The principle of Inversion of Control is also known as the Hollywood Principle. Inversion of Control as a design guideline serves the following purposes: There is a decoupling of the execution of a certain task from implementation. Every system can focus on what it is designed for. Every system does not make assumptions about what other systems do or should do. Replacing systems will have no side effect on other systems.
- Der Begriff Inversion of Control bezeichnet ein Umsetzungsparadigma, das in der objektorientierten Programmierung Anwendung findet. Dieses Paradigma beschreibt die Arbeitsweise von Frameworks: eine Funktion eines Anwendungsprogramms wird bei einer Standardbibliothek registriert und von dieser zu einem späteren Zeitpunkt aufgerufen. Das wird manchmal als eine Anwendung des „Hollywood-Prinzips“ bezeichnet: "don't call us, we'll call you" : Statt dass die Anwendung den Kontrollfluss steuert und lediglich Standardfunktionen benutzt, wird die Steuerung der Ausführung bestimmter Unterprogramme an das Framework abgegeben. Ein einfaches Beispiel einer solchen Umkehrung sind Listener, aber auch Java-Applets und Servlets folgen diesem Entwurfsmuster. Plug-ins und Rückruffunktionen (callback) sind weitere Beispiele dafür, die Steuerung einzelner Programmteile einem (Framework-)Objekt zu überlassen. Häufig ist auch bei Bibliotheken, die mit Dependency Injection arbeiten, von Inversion of Control zu lesen. Hier geht es aber vorwiegend um die Erzeugung von Objektnetzen.
- Inversión de control (Inversion of Control en inglés, IoC) es un metodo de programación en el que el flujo de ejecución de un programa se invierte respecto a los métodos de programación tradicionales, en los que la interacción se expresa de forma imperativa haciendo llamadas a procedimientos (procedure calls) o funciones. Tradicionalmente el programador especifica la secuencia de decisiones y procedimientos que pueden darse durante el ciclo de vida de un programa mediante llamadas a funciones. En su lugar, en la inversión de control se especifican respuestas deseadas a sucesos o solicitudes de datos concretas, dejando que algún tipo de entidad o arquitectura externa lleve a cabo las acciones de control que se requieran en el orden necesario y para el conjunto de sucesos que tengan que ocurrir. En cierto modo es una implementación del Principio de Hollywood, una metodología de diseño de software, cuyo nombre proviene de las típicas respuestas que se les dan a los actores amateurs en las audiciones que tienen lugar en la meca del cine : no nos llames a nosotros; nosotros te llamaremos a tí. Es el principio subyacente a la técnica de Inyección de Dependencias, siendo términos frecuentemente confundidos.
- L'inversion de contrôle (Inversion of Control, IoC) est un patron d'architecture commun à tous les frameworks (ou cadre de développement et d'exécution). Il fonctionne selon le principe que le flot d'exécution d'un logiciel n'est plus sous le contrôle direct de l'application elle-même mais du framework ou de la couche logicielle sous-jacente. L'inversion de contrôle est un terme générique. Selon la problématique, il existe différentes formes, ou représentation d'IoC. Le plus connu étant l'inversion des dépendances (dependency inversion principle) qui est un patron de conception permettant, en programmation orientée objet, de découpler les dépendances entre objets.
- Az inversion of control (röviden IoC) főleg objektumorientált programozási nyelvekben használt technika a komponensek összeillesztésére, konfigurálására és kezelésére.
- Per Inversion of Control (IOC - inversione di controllo) si intende un pattern di programmazione relativamente nuovo, che ha avuto presa sulla comunità dei programmatori grazie al framework Spring, secondo il quale si tende a tener disaccoppiati i singoli componenti di un sistema, in cui le eventuali dipendenze non vengono scritte all'interno del componente stesso, ma gli vengono iniettate dall'esterno: non si segue il normale flusso di controllo dei linguaggi imperativi, in cui, nel momento del bisogno, si richiamano funzioni di classi o librerie esterne, gli oggetti quindi non istanziano e richiamano gli oggetti dal quale il loro lavoro dipende, ma queste funzionalità vengono fornite da un ambiente esterno tramite dei contratti definiti da entrambe le entità. La Dependency Injection è una delle tecniche con le quali si può attuare l'IOC. Essa prende il controllo su tutti gli aspetti di creazione degli oggetti e delle loro dipendenze. Spring usa molto diffusamente la Dependency Injection con il risultato, tra le altre cose, di eliminare dal codice applicativo ogni logica di inizializzazione. Normalmente, senza l'utilizzo di questa tecnica, se un oggetto necessita di accedere ad un particolare servizio, l'oggetto stesso si prende la responsabilità di gestirlo, o avendo un diretto riferimento al servizio, o individuandolo con un "Service Locator" che gli restituisce un riferimento ad una specifica implementazione del servizio. Con l'utilizzo della dependency injection, l'oggetto ha in se solamente una proprietà che può ospitare un riferimento a quel sevizio, e quando l'oggetto viene istanziato, un riferimento ad una implementazione di questo servizio gli viene iniettata dal framework esterno, senza che il programmatore che crea l'oggetto sappia nulla sul suo posizionamento del servizio o altri dettagli sullo stesso.
- 制御の反転(Inversion of Control、IoC)は抽象化原則の一種で、手続き型プログラミングと比較したとき、システムの制御の流れが逆転しているソフトウェアアーキテクチャ設計を表している。 従来からのプログラミングでは、フローはコードの中核部分で制御されている。IoCを使うと、これが全く変わってくる。呼び出し側は応答を得るが、いつどのようにして応答を得るかは呼び出し側が制御できない。逆に呼び出された側がいつどのようにして応えるかを決定する。このため、制御の反転はハリウッドの原則 (Hollywood Principle) とも呼ばれる。設計ガイドラインとしてのIoCは以下のような目的で使われる。 あるタスクの実行を実装から分離する場合。 全てのシステムが設計目的に集中できる場合。 全てのシステムが他のシステムが何をするかを仮定しない場合。 システムの置換が他のシステムに全く副作用を与えないようにする場合。
- Odwrócenie sterowania (ang. Inversion of Control, IoC) - paradygmat (czasami rozważany też jako wzorzec projektowy lub wzorzec architektury) polegający na przeniesieniu na zewnątrz komponentu (np. obiektu) odpowiedzialności za kontrolę wybranych czynności.
- Inversão de controle ou Inversão de controlo (Inversion of Control ou IoC, em inglês) é o nome dado ao padrão de desenvolvimento de programas de computadores onde a sequência (controle) de chamadas dos métodos é invertida em relação à programação tradicional, ou seja, ela não é determinada diretamente pelo programador. Este controle é delegado a uma infraestrutura de software muitas vezes chamada de container ou a qualquer outro componente que possa tomar controle sobre a execução. Esta é uma característica muito comum à alguns frameworks.
- Инверсия управления (Inversion of Control, IoC) — важный принцип объектно-ориентированного программирования, используемый для уменьшения связности в компьютерных программах. IoC также известен как Dependency Injection Principle. Приём Dependency Injection используется почти во всех framework'ах. Он применяется программистами, использующими такие объектно-ориентированные языки программирования, как Smalltalk, C++, Java или языки платформы . NET.
- Inversion of Control eller IoC är en inom programmering ett designmönster (eller utvecklingsmetod) för att hantera beroenden samt konfigurering av beroenden för ett visst objekt. Istället för att låta objektet själv instansiera en viss typ av klass känner objektet endast till ett visst interface - som bestäms av klienten. Exempel: Objektet "Stereo" är beroende av objektet "Power" (energikälla) för att fungera. Men istället för att låta Stereo instansiera och referera till en specifik "Power"-klass innehar det endast en deklaration till ett "Interface" som kan utgöras av flera typer av "Power". Exakt vilken implementation av "IPower" som används är upp till klienten att avgöra så detta objekt skickas in till Power-klassen antingen genom dess konstruktor (Constructor Injection) eller via en setter-metod (Setter Injection). På grund av detta förfarande kallas IoC även för Dependency Injection (DI). Ex i c#: Istället för att låta klienten själv instansiera objektet används ofta en sk "Container" som kan konfigureras för att använda olika typer av interface-implementationer. Några exempel på sådana är: PicoContainer(styrs med kod) NanoConatiner (bygger på Pico men kan konfigueras via xml) NFactory (PuzzleFramework) En mer utförlig artikel om Inversion of Control och Dependency Injection kan ni läsa om på Swesecure på adressen: Swesecure artikel om IoC och DI
- 控制反转(英文缩写为IoC),也叫做依赖注入(Dependency Injection)。简称DI。是一个重要的面向对象编程的法则来削减计算机程序的耦合问题。
|
| rdfs:comment
|
- Inversion of control, or IoC, is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to procedural programming. In traditional programming the flow is controlled by a central piece of code. Using Inversion of Control this central control as a design principle is left behind. Although the caller will eventually get its answer, how and when is out of control of the caller.
- Der Begriff Inversion of Control bezeichnet ein Umsetzungsparadigma, das in der objektorientierten Programmierung Anwendung findet. Dieses Paradigma beschreibt die Arbeitsweise von Frameworks: eine Funktion eines Anwendungsprogramms wird bei einer Standardbibliothek registriert und von dieser zu einem späteren Zeitpunkt aufgerufen.
- Inversión de control (Inversion of Control en inglés, IoC) es un metodo de programación en el que el flujo de ejecución de un programa se invierte respecto a los métodos de programación tradicionales, en los que la interacción se expresa de forma imperativa haciendo llamadas a procedimientos (procedure calls) o funciones.
- L'inversion de contrôle (Inversion of Control, IoC) est un patron d'architecture commun à tous les frameworks (ou cadre de développement et d'exécution). Il fonctionne selon le principe que le flot d'exécution d'un logiciel n'est plus sous le contrôle direct de l'application elle-même mais du framework ou de la couche logicielle sous-jacente. L'inversion de contrôle est un terme générique. Selon la problématique, il existe différentes formes, ou représentation d'IoC.
- Az inversion of control (röviden IoC) főleg objektumorientált programozási nyelvekben használt technika a komponensek összeillesztésére, konfigurálására és kezelésére.
- Odwrócenie sterowania (ang. Inversion of Control, IoC) - paradygmat (czasami rozważany też jako wzorzec projektowy lub wzorzec architektury) polegający na przeniesieniu na zewnątrz komponentu (np. obiektu) odpowiedzialności za kontrolę wybranych czynności.
- Inversão de controle ou Inversão de controlo (Inversion of Control ou IoC, em inglês) é o nome dado ao padrão de desenvolvimento de programas de computadores onde a sequência (controle) de chamadas dos métodos é invertida em relação à programação tradicional, ou seja, ela não é determinada diretamente pelo programador.
- Инверсия управления (Inversion of Control, IoC) — важный принцип объектно-ориентированного программирования, используемый для уменьшения связности в компьютерных программах. IoC также известен как Dependency Injection Principle. Приём Dependency Injection используется почти во всех framework'ах.
- Inversion of Control eller IoC är en inom programmering ett designmönster (eller utvecklingsmetod) för att hantera beroenden samt konfigurering av beroenden för ett visst objekt. Istället för att låta objektet själv instansiera en viss typ av klass känner objektet endast till ett visst interface - som bestäms av klienten. Exempel: Objektet "Stereo" är beroende av objektet "Power" (energikälla) för att fungera.
- 控制反转(英文缩写为IoC),也叫做依赖注入(Dependency Injection)。简称DI。是一个重要的面向对象编程的法则来削减计算机程序的耦合问题。
|