Slide 1

Slide 1 text

Building HTTP APIs With Carter

Slide 2

Slide 2 text

[email protected] @ritasker About Me ● DotNet Developer for 11yrs ● Pier 8 Software Ltd. ● HTTP APIs, Hypermedia, Microservices, RMQ, Dockernetes ● OSS Contributer & Maintainer ● https://richardtasker.co.uk

Slide 3

Slide 3 text

Agenda ● Minimalist Web Frameworks ● Frameworks Vs Micro-Frameworks ● Introducing Carter ● Getting Started With Carter ● Features Of Carter ● Testing Your Modules [email protected] @ritasker

Slide 4

Slide 4 text

require 'sinatra' get '/frank-says' do 'Put this in your pipe & smoke it!' end [email protected] @ritasker

Slide 5

Slide 5 text

[email protected] @ritasker

Slide 6

Slide 6 text

“ Nancy is a lightweight, low-ceremony, framework for building HTTP based services on .NET and Mono. The goal of the framework is to stay out of the way as much as possible and provide a super- duper-happy-path to all interactions. ” [email protected] @ritasker

Slide 7

Slide 7 text

Frameworks & Micro- Frameworks Whats the difference? What are the benefits? When to use a Micro- Framework? [email protected] @ritasker

Slide 8

Slide 8 text

Frameworks Micro-Frameworks ● Is a collection of libraries ● Provide everything you need ● Rigid ● Slower learning curve ● Versitile ● Is considered a library ● Provide only the essentials ● Flexible ● Quick leaning curve ● Specific [email protected] @ritasker

Slide 9

Slide 9 text

[email protected] @ritasker Small Footprint Flexibility ● Fast & efficent ● Less boilerplate code ● Simple maintainable ● Quicker to learn ● Start dev earlier ● Provide the basics ● Opt-in mentality ● You choose the tools ● Can pivot quicker

Slide 10

Slide 10 text

[email protected] @ritasker

Slide 11

Slide 11 text

[email protected] @ritasker Recap ● 2007, Sinatra was released ● Sinatra, inspired NancyFx ● Compared Frameworks & Micro-Frameworks ● Small & Flexible ● Micro-Frameworks need extending

Slide 12

Slide 12 text

[email protected] @ritasker Introducing Carter

Slide 13

Slide 13 text

[email protected] @ritasker Key Features ● Model Binding/Validation Fluent Validation – ● Before/After hooks ● IStatusCodeHandler ● IResponseNegotiator ● Support for OpenAPI Specification

Slide 14

Slide 14 text

Summary [email protected] @ritasker ● The history of minimalist frameworks ● Compared frameworks vs micro-frameworks ● Introduced Carter ● Extended Carter ● Tested our Carter modules

Slide 15

Slide 15 text

[email protected] @ritasker Thanks For Listening https://github.com/ritasker/CarterDemos https://speakerdeck.com/ritasker/building-http-apis-with-carter https://github.com/CarterCommunity/Carter https://docs.microsoft.com/en-us/aspnet/core/fundamentals/ routing?view=aspnetcore-2.2