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

Nancy FX - web development framework for rest of us

Nancy FX - web development framework for rest of us

Nancy FX - web development framework for rest of us

The speech I gave on Kiev ALT.NET

Alexander Beletsky

February 24, 2012
Tweet

More Decks by Alexander Beletsky

Other Decks in Programming

Transcript

  1. Nancy FX
    web development framework
    for the rest of us

    View Slide

  2. Hi
    Hi, my name is
    , my name is
    @alexbeletsky
    @alexbeletsky

    View Slide

  3. Who is Nancy?

    View Slide

  4. require 'sinatra'
    get '/hi' do
    "Hi Frank!"
    end

    View Slide

  5. “ Sinatra is DSL for
    quickly
    creating web applications
    in Ruby
    with minimal effort “

    View Slide

  6. using Nancy;
    public class Module : NancyModule
    {
    public Module() {
    Get[“/”] = “Hi Nancy”;
    }
    }

    View Slide

  7. Created by:
    thecodejunkie (Andreas Håkansson)
    grumpydev (Steven Robbins)
    and community..

    View Slide

  8. “ 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. “

    View Slide

  9. Micro
    Micro
    Framework
    Framework
    Minimum functionality
    Minimum functionality
    Minumum dependenices
    Minumum dependenices
    Minumum configurations
    Minumum configurations

    View Slide

  10. NuGet Driven
    NuGet Driven
    Development
    Development
    Core is almost “useless”
    Core is almost “useless”
    Features by NuGet packages
    Features by NuGet packages
    Adopting ruby Gem's approach
    Adopting ruby Gem's approach

    View Slide

  11. Super-duper-
    Super-duper-
    happy-path
    happy-path
    Kind of philosofy behind the Nancy FX
    Kind of philosofy behind the Nancy FX

    “It just works”, “It is easy”, “Low friction”
    It just works”, “It is easy”, “Low friction”
    You have pleasure and fun
    You have pleasure and fun

    View Slide

  12. View Slide

  13. Modules
    primary Nancy concept

    Inherited from NancyModule

    Root to the root

    HTTP handlers in constructor

    View Slide

  14. Routes
    method + pattern

    GET, POST, PUT, DELETE

    Literal, Capture, RegExp

    Built in runtime

    View Slide

  15. Actions
    do something..

    Lambda expression

    Receives “parameters”
    dynamic

    Creates the response

    View Slide

  16. Views
    renders the model

    Different view engines

    HTML, Razor, Spark,
    SuperSimple

    Selected on runtime

    View Slide

  17. Model Binding
    bind model :)

    Nancy.ModelBinding

    Query string, request body..

    XML, JSON

    View Slide

  18. Bootstrapper
    DSL on top of IoC

    Mythical unicorn

    TinyIoC default container

    Ninject, AutoFac, Windsor

    View Slide

  19. Responses

    JSON, XML

    Redirect, Image

    Response by convention

    View Slide

  20. Everything
    is
    very
    simple

    View Slide

  21. Other side of the
    Moon

    View Slide

  22. Pre-mature
    Pre-mature

    version 0.9
    version 0.9

    lack of commutity “knowledge
    lack of commutity “knowledge
    base”
    base”

    documentation
    documentation

    View Slide

  23. Development
    Development

    not “really” TDD oriented
    not “really” TDD oriented

    testing is possible, but hard
    testing is possible, but hard

    lack of infrastrucure
    lack of infrastrucure

    View Slide

  24. Performance?
    Performance?
    (I might be wrong here)
    (I might be wrong here)

    everything is so “dynamic”
    everything is so “dynamic”

    custom pipeline
    custom pipeline

    views rendering
    views rendering

    View Slide

  25. Well,
    why should
    I learn it?

    View Slide

  26. To prototype fast (er)
    To prototype fast (er)
    To enjoy super-duper-
    To enjoy super-duper-
    happy path
    happy path
    To be better developer
    To be better developer

    View Slide

  27. Thank you.
    http://beletsky.net
    @alexbeletsky

    View Slide