Skip to content
jmarnold edited this page Feb 1, 2013 · 4 revisions

What do I name my "controllers"?

Our default policies determine "actions" by first finding classes in your project that end with "Endpoint" or "Endpoints".

How do I make a controller action?

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

What are my urls? How do I map the routes?

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

How do I use route params?

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}

Where do I put my views? How do I specify which one to use?

You can put them ANYWHERE. FubuMVC matches up views and actions by the output model type. Location is irrelevant.

What view engines are supported?

Spark (FubuMVC.Spark) and Razor (FubuMVC.Razor).

What's the fastest way to create an application?

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.