Friday, February 18, 2011

FubuMVC - Startup Conventions

FubuMVC is working based on conventions. Although some conventions are set as default in the heart of framework, you as a developer may want to extend or install a brand new convention. That makes programming very easy and efficient. There is no need to tell the code which controllers' method should be execute on and on.

Look how we can configure the fubu :



In the first lines, I tell the framework that configuration only applies to MyProject.dll and MyProject.Data.dll.
Then all classes that ends with action are my controllers. (with mvc literature). 
Then ignore all namespaces for action classes also ignore certain suffixes, for example, if an action class is deep in the project like (MyProject.UI.Actions.Exchange.AddExchangeAction), for routing just call AddExchange.

All Views that are using the model on their back, should have the same name as their models.
This stuff is set when the application starts and no needs to reconfigure for each situation.

No comments:

Post a Comment