-
Notifications
You must be signed in to change notification settings - Fork 151
Getting Started
Our default policies determine "actions" by first finding classes in your project that end with "Endpoint" or "Endpoints".
Any public method on a class that we've identified as a controller is used. We have a few patterns we follow, though:
- One model in, One Model Out
- Zero Model In, One Model Out
- One Model In, Zero Out
The default or "standard" that the Fubu team looks something like this:
get_something (/something) GET
get_something_else (/something/else) GET
post_something (/something) POST
Given a class "MyModel" with a string property "Name", we could do the following:
get_model_Name(MyModel model)
This would give us the following route: /model/{Name}
You can put them ANYWHERE. FubuMVC matches up views and actions by the output model type. Location is irrelevant.
Spark (FubuMVC.Spark) and Razor (FubuMVC.Razor).
The fastest way to get started is running the following NuGet command:
Install-Package FubuMVC.QuickStart.Spark
This will wire up the bootstrapping for you with our default policies. You will also have a simple Home route and the FubuMVC.Diagnostics package installed.
After running the application (F5), you can navigate to http://localhost:PORT/_fubu for more details about your application.