#dependencyinjection

2026-01-27

Dependency Injection is a very practical technique for writing testable code and swappable implementation.

dev.to/hongster85/dependency-i

#bestpractices #coding #codingprinciples #designpattern #programming #dependencyinjection

Sven Jacobs :androidHead:svenjacobs@androiddev.social
2026-01-26

After several hours of concentrated work, a lot of repetitive copy/paste and search/replace as well as a bit of semi-successful utilization of AI agents, I migrated our Android application from dependency injection via Hilt to Metro (by @ZacSweers). 580 files were touched in this process 😅

I already appreciate the concise syntax and Anvil-esque aggregation ❤️

#Android #AndroidDev #Hilt #Dagger #Metro #Anvil #DependencyInjection

Yasmanyyasmramos
2026-01-08

⚡ Veld Framework v1.0.3: Compile-Time Dependency Injection

Key innovation: ASM bytecode weaving only for @inject on private fields.
Zero runtime reflection. Everything else is pure method calls.

Performance: 5.9M ops/ms | startup: 1μs | memory: 2.1MB

🏗️ All contributors are welcome!

GitHub: github.com/yasmramos/Veld

Level Up Your SharePoint Skills: SPFx Best Practices for Coders

784 words, 4 minutes read time.

The world of SharePoint development is constantly evolving, and mastering the skills required to build robust and scalable applications is crucial for any serious coder. With the rise of SPFx, it’s essential to stay up-to-date with best practices and patterns that can help take your skills to the next level.

Introduction

The SharePoint Framework (SPFx) has revolutionized the way developers build custom applications for Microsoft 365. With its powerful combination of web development, DevOps, and business intelligence capabilities, SPFx offers a unique opportunity for coders to create innovative solutions that can transform businesses. In this article, we’ll explore some essential best practices for SPFx developers, providing practical guidance on how to level up your skills and build high-quality applications.

Understanding the Power of Modularize

import { declareCustomElement } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';@declareCustomElement({name: 'MyWebPart',metadata: {description: {type: String,default: 'This is a custom web part'}}})export class MyWebPart extends BaseClientSideWebPart {render() {return Hello World!;}onInit() {this.properties.description = 'This is an updated description'; }}

Modularize is a powerful pattern in SPFx development that allows you to break down complex applications into smaller, reusable components. By doing so, you can improve maintainability, scalability, and overall quality of your codebase. In this article, we’ll explore the benefits of modularize and provide guidance on how to implement it effectively.

Using Dependency Injection for Loose Coupling

import { injectable } from 'tsyringe';@injectable()export class MyService {private logger: Logger;constructor(logger: Logger) {this.logger = logger;}public doSomething() {this.logger.log('Doing something');}}

Dependency injection is a design pattern that allows you to decouple components from each other, making it easier to test, maintain, and extend your codebase. In SPFx development, dependency injection is particularly useful when working with services and libraries that need to be injected into your web part or component. In this section, we’ll explore the benefits of using dependency injection in SPFx and provide guidance on how to implement it effectively.

Optimizing Performance with Caching

import { CacheManager } from 'sp-core-library';const cache = new CacheManager();cache.add('myKey', 'myValue');console.log(cache.get('myKey')); // Output: 'myValue'

Optimizing performance is crucial in any web application, and SPFx is no exception. One effective way to improve performance is by using caching mechanisms. In this section, we’ll explore the benefits of caching in SPFx and provide guidance on how to implement it
effectively.

Best Practices for Unit Testing

import { TestBed } from '@angular/core/testing';import { MyService } from './my.service';describe('MyService', () => {beforeEach(() => {TestBed.configureTestingModule({providers: [MyService]});});it('should do something', () => {const service = TestBed.get(MyService);expect(service.doSomething()).toBe(true);});});

Unit testing is an essential part of any software development workflow. In SPFx, unit testing allows you to ensure that your components and services are working as expected, reducing the risk of bugs and errors in your application. In this section, we’ll explore best practices for unit testing in SPFx and provide guidance on how to write effective tests.

Conclusion / Next Steps

In this article, we’ve explored essential best practices for SPFx developers, including modularize, dependency injection, caching, unit testing, and more. By following these guidelines, you’ll be able to build high-quality applications that are scalable, maintainable, and efficient.

Next steps include implementing the patterns and techniques discussed in this article. Start by identifying areas where you can apply modularize, then experiment with dependency injection and caching mechanisms. Finally, take some time to learn about unit testing best practices and apply them to your existing codebase. With dedication and persistence, you’ll become a master SPFx developer in no time.

Call to Action

If this post sparked your creativity, don’t just scroll past. Join the community of makers and tinkerers—people turning ideas into reality with 3D printing. Subscribe for more 3D printing guides and projects, drop a
comment
sharing what you’re printing, or reach out and tell me about your latest project. Let’s build together.

Sources

Disclaimer:

The views and opinions expressed in this post are solely those of the author. The information provided is based on personal research, experience, and understanding of the subject matter at the time of writing. Readers should consult relevant experts or authorities for specific guidance related to their unique situations.

Related Posts

#agileMethodology #bestPractices #businessIntelligence #caching #ClientSide #codingPatterns #collaborationPlatform #customApplication #dependencyInjection #devops #enterpriseSoftware #microsoft365 #modularize #performanceOptimization #serverSide #SharePoint #SharePointDevelopment #SharePointFramework #softwareDevelopment #SPFx #testDrivenDevelopment #unitTesting #WebDevelopment #webPart #workflow

Developer working on SPFx project
Piotrek Jeremiczpiotrekjeremicz
2025-12-11

Let's assume we now have two approaches to in our community:

1. An where the extension on the container type defines registration. 🔄

2. A that is responsible for the type registration process. 📦

2025-12-04

Ra mắt ioc-arise: DI container không dùng decorator, tự động đăng ký thành phần bằng cách phân tích AST. Khắc phục việc phải import @inject và viết boilerplate. Hỗ trợ đối tượng, factory, lớp (interface/abstract), quản lý vòng đời (singleton/transient) qua comment. Giúp code sạch, hiệu quả hơn.
#ioc_arise #DI #DependencyInjection #AST #Programming #Development #LậpTrình #PhátTriển

reddit.com/r/SideProject/comme

Nicos Nicolaou :androidHead:nicolaou_nicos@androiddev.social
2025-11-26

🚀 Koin 4.2.0-alpha3 is out!

✅ Navigation 2.x scope support
🧹 Cleaner, better examples
🐛 Fix for Nav3 metadata args

🔗 github.com/InsertKoinIO/koin/r

#Kotlin #AndroidDev #Compose #Koin #DependencyInjection #Android
#MobileDev

Michał Cichońmcichon
2025-11-25

Just published a new post on Dependency Injection in Swift.
I compare three approaches: initializer-based, property, and method injection, and show how they affect testability, modularity, and code clarity.

Do you use DI in your Swift/iOS projects?

📖 michalcichon.github.io/softwar

Alessandra Sierralambdasierra@hachyderm.io
2025-10-25

[com.stuartsierra/component "1.2.0"]

‘Component’ is a #DependencyInjection and lifecycle management framework for #Clojure.

This release makes SystemMaps Closeable, so you can use them in `with-open`.

Having dredged up the steps to deploy on Clojars and, miraculously, still having all the right credentials, I made a new release, the first in over 2 years!

github.com/stuartsierra/compon
clojars.org/com.stuartsierra/c
github.com/stuartsierra/compon

Mohsen Mirhoseini 🍀🤖👨‍💻mohsenoid@androiddev.social
2025-10-09

Is your Koin configuration slowing down your Kotlin/Android app? 🐌

My new interview with @kotzilla is LIVE!

We dive into their AI Performance Monitoring platform that catches issues & automatically generates contextual fix prompts for Gemini/Copilot. ✨

The future of DI is self-healing! 🩺

youtu.be/4fFOQZVlsjA

#Kotlin #AndroidDev #Koin #AIPerformance #DependencyInjection

Snapp Mobile iOS Newsletterios_newsletter_snapp
2025-09-17

Are you sure you're getting Dependency Injection right in SwiftUI?

A thought-provoking analysis of common mistakes in DI within SwiftUI, exploring three key patterns for managing dependencies.

🔗: azamsharp.com/2025/09/08/why-9 by @azamsharp

2025-07-15

Suffering from the scourge of insomnia? Want to fall asleep to the sounds of a Haskell application being assembled component by component?

If so, you're in luck. In this 1-hour video I give a demo of how to use the "cauldron" library to wire all the components of a Haskell application at the composition root.

youtube.com/watch?v=9ZJLK0iM-2

#Haskell #dependencyinjection #di

2025-07-11

🎤 Speaker announcement!
Pimcore Community Dev Days

We're excited to announce that Alexander M. Turek will be joining us at the Pimcore Community Dev Days on 13 November!

In his talk, 'Deep Dive into @symfony’s Dependency Injection Component', Alexander will unpack the magic behind Autowiring, Autoconfiguration, and Service Discovery. You'll get practical insights and deeper understanding of Symfony’s core features.

Whether you're building with Pimcore, Symfony, or any modern PHP stack—this session is for you.

📍 Frankfurt am Main
📅 13 November 2025

ℹ️ Find out more 🔗 t1p.de/exsej
🎟️ Get your ticket 🔗 t1p.de/hlbkj
👔 LinkedIn Event Page 🔗 t1p.de/6xssv

#Pimcore #Symfony #DependencyInjection #PHP #TechEvent #WebDevelopment #DeveloperCommunity #PCCD25

Announcement graphic for Pimcore Community Dev Days 2025, featuring speaker Alexander M. Turek. On the left, event details including the session title 'Deep Dive into Symfony's Dependency Injection Component' and logos for +Pluswerk and Pimcore Dev Days. On the right, a photo of Alexander M. Turek and his logo '[AMT]' against a background of binary code.
SelAromDotNetselaromdotnet
2025-06-26

If you're diving into , understanding is crucial. I should know, this just tripped me up on a project (blog post about it coming soon!) Check out this article for best practices across and link.content360.io/gfpb5ki

Taras Kovalenkotkovalenko
2025-06-09

Relay your dependency injection to the next level! A powerful, fluent library that extends Microsoft.Extensions.DependencyInjection with adaptive patterns for conditional routing, multi-relays, adapter chains, and dynamic service resolution.

github.com/TarasKovalenko/Relay

Relay - Adaptive Dependency Injection

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst