JSUG - Inversion Of Control by Florian Motlik

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    JSUG - Inversion Of Control by Florian Motlik - Presentation Transcript

    1. Inversion of Control Dependency Injection Florian Motlik 13.10.2008 JSUG - Treffen 1 WS 08/09
    2. Inversion of Control Don't call us, we call you. Trennung Kontrolle und Ausführung Generische Kontrollklasse und spezifische Implementierung Iterator vs Code Block/Closure stooges = ['Larry', 'Curly', 'Moe'] foreach (stooge in stooges) {print stooge + \"\\n\"} Kontrolle der Iterierung in Hand des Programmierers stooges.each {|stooge| print stooge + \"\\n\"} each Methode kontrolliert Iterierung. Interne Iterierung. Event-driven programming - z.B. Swing Gui Listener
    3. Dependency Injection Anwendung von IOC Kontrolle über Dependencies Kopplung von App zu SortImpl verringern Kein direkter Aufruf eines SortImpl Konstrukturs Sorter wird \"Injected\" in App durch Framework Setter & Constructor based Injection
    4. Vorteile/Nachteile Vorteile Weniger Abhängigkeiten (Kapselung) Kein lookup Code nötig Zwang zu Interfaces -> bessere Struktur Test/Run Konfiguration möglich und nur einmal zu machen. Nachteile Möglicherweise viel Konfiguration (XML Hell) Zusätzliches Framework Abhängigkeiten zum Framework (vermeidbar) Refaktorisierung umständlich/fehleranfällig (IDE) Weniger Code Transparenz
    5. Links http://en.wikipedia.org/wiki/Dependency_injection http://en.wikipedia.org/wiki/Inversion_of_control http://en.wikipedia.org/wiki/Strategy_pattern http://en.wikipedia.org/wiki/Closure_(computer_science) http://martinfowler.com/articles/injection.html Licensed under CreativeCommons Attribution + ShareAlike (by-sa) http://creativecommons.org/licenses/by-sa/3.0/at/

    + Christoph PicklChristoph Pickl, 9 months ago

    custom

    348 views, 0 favs, 0 embeds more stats

    visit http://jsug.fsinf.at

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 348
      • 348 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 2
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories