Dependency Injection in C++## 20 24 September 15 - 20 ## +24 ## Dependency Injection in C++ A Practical Guide ## PETER MULDOON # Dependency Injection in C++: A Practical Guide Engineering CppCon 2024 September 18, 2024 Pete and be able to use it ## Where will we be going? - Talk will be about inserting meaningful Dependency Injection in applications - Using various DI methods to achieve functionality swapping / instrumentation just giving up) • Talk is rooted in a real-world system not theory ## Basic Definitions ## Dependency Injection : 1. Decreases coupling between functionality blocks 2. Used to make a class/function independent0 码力 | 106 页 | 1.76 MB | 1 年前3
Libraries: A First Step Toward Standard C++ Dependency ManagementFirst Step Toward Standard C++ Dependency Management ## BILL HOFFMAN & BRET BROWN ## 20 23 October 01 - 06 ## Libraries: A First Step Toward Standard C++ Dependency Management October 3, 2023 Bloomberg Projects as portable as the code they contain! ✓ Projects should be “cattle,” not “pets”! ## Why dependency management? Consensus: Managing dependencies == way too hard Q: Which of these do you find frustrating What's a dependency bug? Missing interfaces: fangorn.cxx:2:10: fatal error: jsonlog/core.hxx: No such file or directory This could be caused by other root problems! Pain: What's a dependency bug?0 码力 | 82 页 | 4.21 MB | 1 年前3
Spring Framework 1.2.4 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 289 页 | 1.49 MB | 2 年前3
Spring Framework 1.2.1 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 244 页 | 1.30 MB | 2 年前3
Spring Framework 1.1.2 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 199 页 | 1.14 MB | 2 年前3
Spring Framework 1.2.8 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 290 页 | 1.49 MB | 2 年前3
Spring Framework 1.1.5 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 223 页 | 1.22 MB | 2 年前3
Spring Framework 1.2.7 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 290 页 | 1.49 MB | 2 年前3
Spring Framework 1.2.5 Reference1.2. Usage scenarios ..... 2. Background information ..... 2.1. Inversion of Control / Dependency Injection ..... 3. Beans, BeanFactory and the ApplicationContext ..... 3.1. Introduction ..... 3.2.5. To singleton or not to singleton ..... 3.3. Properties, collaborators, autowiring and dependency checking ..... 3.3.1. Setting bean properties and collaborators ..... 3.3.2. Constructor Argument Resolution ..... 3.3.3. Bean properties and constructor arguments detailed ..... 3.3.4. Method Injection ..... 3.3.5. Using depends-on ..... 3.3.6. Autowiring collaborators ..... 3.3.7. Checking0 码力 | 290 页 | 1.49 MB | 2 年前3
Retiring the Singleton Pattern## Drawbacks of a Singleton • Acts as hidden dependencies in functions that use it • No dependency injection for testing • Initialization is out of your control • Multiple runs can yield different be - at least - source compatible • Express the involvement of outside agencies • Allow dependency injection for testing purposes // processor.h Response sendData(const Data& data, function must be source compatible ✓ • Express the involvement of an outside agency ✓ • Allow dependency injection for testing purposes ✗ // New wrapper class to replace singleton - CommWrapper.h class CommWrapper0 码力 | 70 页 | 1.59 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
依赖注入模板继承函数接口dependency managementlibrariesC++package managersCMakeSpring FrameworkDependency InjectionDAOAOPORMPOJOsBeanFactoryHibernateWeb MVCMVC frameworkORM supportCore packagetransaction managementDAO supportORM packageAOP packageSingleton PatternSource CompatibilityStateful GroupingsInterdependent Singletons













