Permalink
Browse files

Updated the readme file

  • Loading branch information...
thecodejunkie committed Aug 17, 2011
1 parent b1aadf1 commit 75b45b661a317946eac558a8436f9cdb7d1c5a70
Showing with 11 additions and 63 deletions.
  1. +11 −63 readme.md
View
@@ -1,47 +1,25 @@
# Meet Nancy
-Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aims to deliver a low ceremony approach to building light, fast web applications.
+Nancy is a lightweight HTTP framework for the .Net platform and Mono. The ethos of Nancy is to strive for simplicity and elegance, all features to be easy and ready to use right out-of-the-box.
+
+Simplicity means that a feature should requires little or low-ceremony to use, there should always be sensible default configurations, behaviors and conventions available.
+
+The elegance comes from an easy to use and light syntax, combined with letting the framework be responsible for a lot of things that developers should not have to worry about or re-implement in each application you create.
+
+We call this the super-duper-happy-path.
## 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_
-* Abstracted away from ASP.NET / IIS so that it can run on multiple hosting environments (planned [OWIN](http://bvanderveen.com/a/dotnet-http-abstractions "Read more about the Open Web Interface for .NET") support), such as (but not limited to) ASP.NET, WCF, Mono/FastCGI and more (ASP.NET and WCF currently supported out-of-the-box)
-* Ultra lightweight action declarations for GET, HEAD, PUT, POST and DELETE requests
-* View engine integration
+* Run anywhere. Nancy is not built on any specific hosting technology can can be run anywhere. Out of the box, Nancy supports running on ASP.NET/IIS, WCF, Self-hosting and any [OWIN](http://owin.org)
+* Ultra lightweight action declarations for GET, HEAD, PUT, POST, DELETE and OPTIONS requests
+* View engine integration (Razor, Spark, NDjango, dotLiquid and our own SuperSimpleViewEngine)
* 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<Stream> 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
## Usage
-Set up your web.config file:
-
- <httpHandlers>
- <add verb="*" type="Nancy.Hosting.NancyHttpRequestHandler" path="*"/>
- </httpHandlers>
-
- <system.webServer>
- <validation validateIntegratedModeConfiguration="false"/>
- <handlers>
- <add name="Nancy" verb="*" type="Nancy.Hosting.NancyHttpRequestHandler" path="*"/>
- </handlers>
- </system.webServer>
-
-Start adding your Nancy modules containing your actions:
-
- public class Module : NancyModule
- {
- public Module()
- {
- Get["/"] = x => {
- return "This is the root";
- };
- }
- }
-
-Start your application and enjoy! Swap out Get with either Put, Post or Delete to create actions that will respond to calls using those request methods.
-
-If you want to get fancy you can add parameters to your paths:
-
public class Module : NancyModule
{
public Module()
@@ -52,27 +30,6 @@ If you want to get fancy you can add parameters to your paths:
}
}
-The _{name}_ parameter will be captured and injected into the action parameters, shown as _x_ in the sample. The parameters are represented by a _dynamic_ type so you can access any parameter name straight on it as a property or an indexer. For more information on action parameters please refer to the [Nancy introduction post](http://elegantcode.com/2010/11/28/introducing-nancy-a-lightweight-web-framework-inspired-by-sinatra "Read the Nancy introduction post at elegantcode.com") over at my blog on [ElegantCode](http://elegantcode.com "Visit ElegantCode).
-
-Nancy also supports the idea of _module paths_, where you assign a root path for all actions in the module and they will all be relative to that:
-
- public class Module : NancyModule
- {
- public Module() : base("/butler")
- {
- Get["/greet/{name}"] = x => {
- return string.Concat("Hello ", x.name);
- };
- }
- }
-
-Notice the _base("/butler")_ call to the NancyModule constructor. Now all action paths that are defined in the module will be relative to _/butler_ so in order to greet someone you could access _/butler/greet/{name}_, for example _/butler/greet/thecodejunkie_
-
-## Bootstrappers
-
-The bootstrapper projects for third party IoC containers are only temporarily in the source code. These will be removed when the IoC integration design has been proven stable. They will be moving into a contrib-style project and/or the Nancy wiki. The reason they
-won't ship with Nancy is because we do not want to be tasked each time there is a new version of the containers released.
-
## Community
You can find lot of Nancy users on the [Nancy User Group](https://groups.google.com/forum/?fromgroups#forum/nancy-web-framework). That is where most of the discussions regarding the development and usage of Nancy is taking place. You can also
@@ -93,15 +50,6 @@ Nancy are:
* Code quality
* Sample applications
-## View Engines
-
-There is a rich set of view engines in the .net space and most of them have been design in such a away that they are framework agnostic, all that is needed is a bit
-of integration work to get it running in Nancy. Currently there are support for [Razor](http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx "Read more about the Razor view engine"),
-[Spark](http://sparkviewengine.com "Read more about the Spark view engine"), [NDjango](http://ndjango.org "Read more about the NDjango view engine") and a static file engine. There used to be an [NHaml](http://code.google.com/p/nhaml "Read more about the NHaml view engine")
-engine but it was removed since the view engine project appears to have come to a dead halt. Let us know if that change! WebForms engine.. well let's just say that if you have a need to use WebForms with Nancy then _we accept patches_!
-
-All view engine integrations are still very early implementations and more work will be put towards them to bring as many of the features, as possible, into Nancy! If you have any experience with either of the engines, grab a fork and start coding!
-
## Contributors
Nancy is not a one man project and many of the features that are availble would not have been possible without the awesome contributions from the community!

0 comments on commit 75b45b6

Please sign in to comment.