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

More Decks by Alexander Beletsky

Other Decks in Programming


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

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

  3. Who is Nancy?

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

  5. “ Sinatra is DSL for quickly creating web applications in

    Ruby with minimal effort “
  6. using Nancy; public class Module : NancyModule { public Module()

    { Get[“/”] = “Hi Nancy”; } }
  7. Created by: thecodejunkie (Andreas Håkansson) grumpydev (Steven Robbins) and community..

  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. “
  9. Micro Micro Framework Framework Minimum functionality Minimum functionality Minumum dependenices

    Minumum dependenices Minumum configurations Minumum configurations
  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
  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
  12. None
  13. Modules primary Nancy concept • Inherited from NancyModule • Root

    to the root • HTTP handlers in constructor
  14. Routes method + pattern • GET, POST, PUT, DELETE •

    Literal, Capture, RegExp • Built in runtime
  15. Actions do something.. • Lambda expression • Receives “parameters” dynamic

    • Creates the response
  16. Views renders the model • Different view engines • HTML,

    Razor, Spark, SuperSimple • Selected on runtime
  17. Model Binding bind model :) • Nancy.ModelBinding • Query string,

    request body.. • XML, JSON
  18. Bootstrapper DSL on top of IoC • Mythical unicorn •

    TinyIoC default container • Ninject, AutoFac, Windsor
  19. Responses • JSON, XML • Redirect, Image • Response by

  20. Everything is very simple

  21. Other side of the Moon

  22. Pre-mature Pre-mature • version 0.9 version 0.9 • lack of

    commutity “knowledge lack of commutity “knowledge base” base” • documentation documentation
  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
  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
  25. Well, why should I learn it?

  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
  27. Thank you. http://beletsky.net @alexbeletsky