Paul Krill
Editor at Large

JetBrains clarifies dependency injection plans for Ktor

news
Mar 21, 20242 mins

Ktor will never require the use of a DI framework or include a DI framework as part of its design, JetBrains said.

Takeoff plane in airport    166183750
Credit: Thinkstock

JetBrains has cleared up confusion over its plans for dependency injection (DI) support in Ktor, which it revealed last week in its 2024 roadmap for the Kotlin-based framework. The company is now assuring users that there will be no requirement to use a DI framework with Ktor.

In a Kotlin blog post published March 18, Garth Gilmour, JetBrains’ developer advocate, said a lot of questions have arisen regarding DI since the roadmap was published on March 12. Users have questioned how Ktor will be changed to support DI and integrate existing DI frameworks. Ktor allows developers to build asynchronous server-side and client-side applications using Kotlin

Gilmour stressed that Ktor will never require the use of a DI framework or include a DI framework as part of its design. “The proposed feature is solely for users who wish to combine DI with their Ktor services,” he said. The company wants to help existing DI frameworks integrate with Ktor as seamlessly as possible. DI will be completely optional and users will be able to use the DI framework’s native syntax if they prefer.

“Our goal is to radically simplify how DI is used within Ktor, without adding any extra complexity,” Gilmour said. Plans call for users to be able to select which DI framework, if any, they want to use in the Ktor Project Generator. Support is eyed for all DI frameworks. Then the Ktor Gradle plugin will automatically find all components managed by that framework.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author