GithubHelp home page GithubHelp logo

whitepoplar022 / nancy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nancyfx/nancy

0.0 2.0 0.0 44.04 MB

Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono

Home Page: http://nancyfx.org

License: MIT License

C# 95.98% PowerShell 0.07% Shell 0.05% Liquid 0.48% HTML 1.63% JavaScript 1.63% CSS 0.15% Visual Basic 0.01%

nancy's Introduction

Meet Nancy NuGet Version Slack Status

Nancy is a lightweight, low-ceremony, framework for building HTTP based services on .NET Framework/Core 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.

Nancy is designed to handle DELETE, GET, HEAD, OPTIONS, POST, PUT and PATCH requests and provides a simple, elegant, Domain Specific Language (DSL) for returning a response with just a couple of keystrokes, leaving you with more time to focus on the important bits.. your code and your application.

Write your application

public class Module : NancyModule
{
    public Module()
    {
        Get("/greet/{name}", x => {
            return string.Concat("Hello ", x.name);
        });
    }
}

Compile, run and enjoy the simple, elegant design!

Features

  • Built from the bottom up, not simply a DSL on top of an existing framework. Removing limitations and feature hacks of an underlying framework, as well as the need to reference more assemblies than you need. keep it light
  • Run anywhere. Nancy is not built on any specific hosting technology can be run anywhere. Out of the box, Nancy supports running on ASP.NET/IIS, WCF, Self-hosting and any OWIN
  • Ultra lightweight action declarations for GET, HEAD, PUT, POST, DELETE, OPTIONS and PATCH requests
  • View engine integration (Razor, Spark, dotLiquid, our own SuperSimpleViewEngine and many more)
  • Powerful request path matching that includes advanced parameter capabilities. The path matching strategy can be replaced with custom implementations to fit your exact needs
  • Easy response syntax, enabling you to return things like int, string, HttpStatusCode and Action elements without having to explicitly cast or wrap your response - you just return it and Nancy will do the work for you
  • A powerful, light-weight, testing framework to help you verify the behavior of your application
  • Content negotiation
  • And much, much more

The super-duper-happy-path

The "super-duper-happy-path" (or SDHP if you’re ‘down with the kids’ ;-)) is a phrase we coined to describe the ethos of Nancy; and providing the “super-duper-happy-path” experience is something we strive for in all of our APIs.

While it’s hard to pin down exactly what it is, it’s a very emotive term after all, but the basic ideas behind it are:

  • “It just works” - you should be able to pick things up and use them without any mucking about. Added a new module? That’s automatically discovered for you. Brought in a new View Engine? All wired up and ready to go without you having to do anything else. Even if you add a new dependency to your module, by default we’ll locate that and inject it for you - no configuration required.
  • “Easily customisable” - even though “it just works”, there shouldn’t be any barriers that get in the way of customisation should you want to work the way you want to work with the components that you want to use. Want to use another container? No problem! Want to tweak the way routes are selected? Go ahead! Through our bootstrapper approach all of these things should be a piece of cake.
  • “Low ceremony” - the amount of “Nancy code” you should need in your application should be minimal. The important part of any Nancy application is your code - our code should get out of your way and let you get on with building awesome applications. As a testament to this it’s actually possible to fit a functional Nancy application into a single Tweet :-)
  • “Low friction” - when building software with Nancy the APIs should help you get where you want to go, rather than getting in your way. Naming should be obvious, required configuration should be minimal, but power and extensibility should still be there when you need it.

Above all, creating an application with Nancy should be a pleasure, and hopefully fun! But without sacrificing the power or extensibility that you may need as your application grows.

Community

Nancy followers can be found on Slack NancyFx team. You can also find Nancy on Twitter using the #NancyFx hashtag.

Help out

There are many ways you can contribute to Nancy. Like most open-source software projects, contributing code is just one of many outlets where you can help improve. Some of the things that you could help out with in Nancy are:

  • Documentation (both code and features)
  • Bug reports
  • Bug fixes
  • Feature requests
  • Feature implementations
  • Test coverage
  • Code quality
  • Sample applications

Continuous integration builds

Platform Status
AppVeyor (.NET & .NET Core) Build Status
Travis (Mono) Build Status

To get build artifacts of latest master, please use our MyGet feed

Contributors

Nancy is not a one man project and many of the features that are available would not have been possible without the awesome contributions from the community!

For a full list of contributors, please see the website.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Contribution License Agreement

Contributing to Nancy requires you to sign a contribution license agreement (CLA) for anything other than a trivial change. By signing the contribution license agreement, the community is free to use your contribution to .NET Foundation projects.

.NET Foundation

This project is supported by the .NET Foundation.

Copyright

Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors

License

Nancy is licensed under MIT. Refer to license.txt for more information.

nancy's People

Contributors

thecodejunkie avatar grumpydev avatar khellang avatar jchannon avatar damianh avatar phillip-haydon avatar prabirshrestha avatar horsdal avatar xt0rted avatar jrsconfitto avatar mmozuras avatar cemremengu avatar 06b avatar liddellj avatar andypike avatar jasonmead avatar tpluscode avatar marcusoftnet avatar thefringeninja avatar richardprice avatar daveaglick avatar sloncho avatar nico-francois avatar graemef avatar asbjornu avatar robertthegrey avatar blairconrad avatar simoncropp avatar logicbomb avatar codeprogression avatar

Watchers

James Cloos avatar 记忆者 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.