Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building HTTP APIs With Carter

Building HTTP APIs With Carter

In 2007 Sinatra was debuted, a DSL, written in Ruby, for building websites, web services, and web applications.
This spawned a movement towards using a minimalistic approach to building web applications, and numerous "Micro-frameworks" were created.

What is a micro-framework?
Are there any benefits of using a micro-framework?
What are some examples of when it's right to use a microframework instead of a full framework for custom software development?

In this session, Richard will discuss the differences between frameworks and micro-frameworks.
Demonstrate the benefits of a micro-framework using Carter, a routing library for use with ASP.Net Core.
Richard will show you how to get up and running with Carter, go through some examples of how Carter could benefit your product.
You will also see how easy it is to test your Carter modules using Microsoft.AspNetCore.TestHost TestServer.

Carter enables you to build performant HTTP APIs quickly, giving you the ability to rapidly pivot your product if required.

Richard Tasker

July 02, 2019
Tweet

More Decks by Richard Tasker

Other Decks in Programming

Transcript

  1. [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
  2. Agenda • Minimalist Web Frameworks • Frameworks Vs Micro-Frameworks •

    Introducing Carter • Getting Started With Carter • Features Of Carter • Testing Your Modules [email protected] @ritasker
  3. “ 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
  4. 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
  5. [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
  6. [email protected] @ritasker Recap • 2007, Sinatra was released • Sinatra,

    inspired NancyFx • Compared Frameworks & Micro-Frameworks • Small & Flexible • Micro-Frameworks need extending
  7. [email protected] @ritasker Key Features • Model Binding/Validation Fluent Validation –

    • Before/After hooks • IStatusCodeHandler • IResponseNegotiator • Support for OpenAPI Specification
  8. Summary [email protected] @ritasker • The history of minimalist frameworks •

    Compared frameworks vs micro-frameworks • Introduced Carter • Extended Carter • Tested our Carter modules