JeremyBP

SCE01_gif

03 Dec: StarCellar E01: Getting Started with Apizr

4 years and counting between Apizr v1 and its latest v6.4. This resilient Refit manager has been developped and maintained for my own needs, but open sourced and published on NuGet for free from the begining. That said, I did not took the time to show how to use each and every features of it, so that’s what I’m trying to do now by creating this series. I’ll build a MAUI sample app called StarCellar to manage a wine cellar (I’m french after all 🙂 ), both with and without Apizr to show what’s different while requesting a minimal API. So let’s get started!

APIZR-V5

11 Sep: Apizr v6.0, Refit’s resilient manager – What’s new

Apizr has been updated to v6.0, still getting all the things ready to use for web API client requests, with the more resilience we can, but without the boilerplate. It relies on Refit, pushing things further by adding a lot more capabilities like fault handling, connectivity check, cache management, authentication handling, log tracing, priority management, file transfer management and so on… This new v6.0 release brings many enhancements, new features and some fixes, so let’s take a look!

APIZR-V5

22 Jun: Apizr v5.0, resilient api client manager – What’s new

The goal of Apizr v5.0 is still the same: getting all the things ready to use for web API client requests, with the more resiliency we can, but without the boilerplate. It’s still based on Refit, so what we can do with Refit could still be done with Apizr too. But Apizr push it further by adding more and more capabilities (retry, connectivity, cache, auth, log, priority, transfer…). All the slices of the cake I needed until now to make my projects tasty, well, resilient actually 🙂 Let’s take a look!

Apizr

11 Apr: Apizr v4.0, Refit based resilient api client – Highlights

The goal of Apizr v4.0 is still to get all ready to use for web api requesting, with the more resiliency we can, but without the boilerplate. It’s based on Refit, so what we can do with Refit could be done with Apizr too. But Apizr has more to offer, with at least: Working offline with cache management Handling errors with retry pattern and global catching Handling request priority Checking connectivity Tracing http traffic Handling authentication Mapping model with DTO Using Mediator pattern Using Optional pattern Anyway, this post is about changes only, but we published a series about Apizr already which you can find here. If you want to know how to get started or how to configure it, please read the brand new documentation: Anytime, feel free to browse code and samples too: LIBRAIRIES Apizr features are still provided by several NuGet packages, depending on what you need,…

apizr5

01 Feb: Apizr – Part 5: Requesting with Optional pattern

This article is part of a series called Apizr: Apizr – Part 1: A Refit based web api client, but resilient Apizr – Part 2: Resilient core features Apizr – Part 3: More advanced features Apizr – Part 4: Requesting with Mediator pattern Apizr – Part 5: Requesting with Optional pattern (this one)   OPTIONAL PATTERN Apizr offers an integration with OptionalAsync, following the Optional pattern, for those of you guys using the extended approach with MediatR integration activated. OptionalAsync offers a strongly typed alternative to null values that lets you: Avoid those pesky null-reference exceptions Signal intent and model your data more explicitly Cut down on manual null checks and focus on your domain It allows you to chain Task<Option<T>> and Task<Option<T, TException>> without having to use await As there will be a dedicated Playground blog post about it, I won’t discuss further the what and why here. SETUP In order to…

apizr4

25 Jan: Apizr – Part 4: Requesting with Mediator pattern

This article is part of a series called Apizr: Apizr – Part 1: A Refit based web api client, but resilient Apizr – Part 2: Resilient core features Apizr – Part 3: More advanced features Apizr – Part 4: Requesting with Mediator pattern (this one) Apizr – Part 5: Requesting with Optional pattern   MEDIATOR PATTERN Apizr offers an integration with MediatR, following the Mediator pattern, for those of you guys using the extended approach. Mediator pattern ensures to keep all the thing as loosely coupled as we can between our ViewModel/ViewControler and our Data Access Layer. As everything should be loosely coupled between you Views and your ViewModels (MVVM) or ViewControlers (MVC) thanks to data binding, MediatR offers you to keep it all loosely coupled between your VM/VC and your DAL to. Please read the official documentation to know more about MediatR. As there will be a dedicated Playground…

apizr3

18 Jan: Apizr – Part 3: More advanced features

This article is part of a series called Apizr: Apizr – Part 1: A Refit based web api client, but resilient Apizr – Part 2: Resilient core features Apizr – Part 3: More advanced features (this one) Apizr – Part 4: Requesting with Mediator pattern Apizr – Part 5: Requesting with Optional pattern   After Part 1 with general presentation and Part 2 with core features walk-through, this time we’ll go deeper into some advanced scenarios. ADVANCED CORE FEATURES The options builder provide you some advanced core features. BASE ADDRESS The WebApi attribute let you define the base address with a simple attribute decoration over your api interface. But sometime, we need to change the endpoint, targeting dev, test or production server uri. To deal with it, the builder expose a method called WithBaseAddress to let you set it by code, like: // For both ways options.WithBaseAddress(Constants.MyConfigurationAwareAddress) // Or for…

apizr2

14 Jan: Apizr – Part 2: Resilient core features

This article is part of a series called Apizr: Apizr – Part 1: A Refit based web api client, but resilient Apizr – Part 2: Resilient core features (this one) Apizr – Part 3: More advanced features Apizr – Part 4: Requesting with Mediator pattern Apizr – Part 5: Requesting with Optional pattern   In Part 1, we’ve seen basic requesting features offered by Apizr. Some classic and well known request designs if you get some Refit skills, plus some built-in CRUD exclusive apis. In this Part 2, we’ll go through what exactly Apizr has to offer beyond its requesting main features, to reach our goal of something easily resilient. Here are some of its core features: Connectivity checking Authenticating Policing Prioritizing Caching Mapping Logging OPTIONSBUILDER While initializing, Apizr provides a fluent way to configure many things with something called OptionsBuilder. Each initialization approach comes with its OptionsBuilder optional parameter,…

apizr1_full

17 Dec: Apizr – Part 1: A Refit based web api client, but resilient

This article is part of a series called Apizr: Apizr – Part 1: A Refit based web api client, but resilient (this one) Apizr – Part 2: Resilient core features Apizr – Part 3: More advanced features Apizr – Part 4: Requesting with Mediator pattern Apizr – Part 5: Requesting with Optional pattern   Into this Apizr blog post series, I’ll try to demonstrate all features offered by the Apizr library, starting from core and going further with integration packages. Apizr project was motivated by this 2015 famous blog post about resilient networking with Xamarin. You should read it if you didn’t yet, because it’s old but still valid. My focus with Apizr was to address at least everything explained into this old article, which mean: Easy access to restful services Work offline with cache management Handle errors with retry pattern and global catching Handle request priority Check connectivity Fast…