Categories: Industry Trends
Tags: NuGet, Skills, Software Development
What is a NuGet Package, and Why is it Useful?
What is a NuGet package?
It kind of sounds like a sweet, so I’ll use a sweet to illustrate.
Imagine you are making a cake. You could make it from scratch by getting the flour, sugar, and baking powder out of the cupboard, or you could pick up a cake mix with all the dry ingredients included. This package would allow you to create the cake with less time and energy expended.
So, what does that have to do with NuGet packages? NuGet packages are “packages” of code that enable developers to perform certain tasks without having to write the code themselves. Instead, they are able to download the specific code they need from a free online repository.
Here are a few common packages:
- AutoMapper – a simple library built to solve a deceptively complex problem – getting rid of code that mapped one object to another.
- AutoFixture makes it easier for developers to do Test-Driven Development by automating non-relevant Test Fixture Setup, allowing the Test Developer to focus on the essentials of each test case.
- FluentValidation a small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules.
- FluentDateTime allows cleaner DateTime expressions and operations.
- FluentAssertions a very extensive set of extension methods that allow you to more naturally specify the expected outcome of TDD or BDD-style unit tests.
- FluentScheduler automated job scheduler with fluent interface for the .NET platform.
- Refit the automatic type-safe REST library for .NET Core, Xamarin, and .NET
- FeatureFlags provide a way for ASP.NET Core applications to turn features on or off dynamically.
- HangFire incredibly easy way to perform fire-and-forget, delayed, and recurring jobs inside ASP.NET applications.
- SignalR is a library for ASP.NET developers that makes it incredibly simple to add real-time web functionality to your applications.
- Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers, and quantities.
- CsvHelper a library for reading and writing CSV files. Extremely fast, flexible, and easy to use. Supports reading and writing of custom class objects.
- Swashbuckle seamlessly adds a Swagger to WebApi projects!
- Serilog is a diagnostic logging library for .NET applications. It is easy to set up, has a clean API, and runs on all recent .NET platforms.
- Respawn is a small utility to help in resetting test databases to a clean state.
- Scrutor assembly scanning and decoration extensions.
- DateTimeExtensions including natural date difference text (precise and human rounded), holidays, and working days calculations on several culture locales.
- Result abstraction that can be mapped to HTTP response codes if needed.
- NSubstitute is designed as a friendly substitute for .NET mocking libraries.
The packages listed above are easy to use and helpful – whether you’re looking for problem-solving assistance, a cleaner and organized look, a place to handle all the little details, or ways to automate processes.
At Swan, we have an experienced team of .NET developers who use NuGet packages on projects. They help us reach our goal of exceeding our clients’ expectations. If you’d like to discover how we can help you on an upcoming project, contact us!