Generally speaking, Fubu is designed based on One Model In - One Model Out. i.e you as developer have to define a type of object as input argument (model) and define another type of object as return value.
The example below explains more in code.
public class HomeAction
{
public HomeViewModel Execute(HomeInputModel model)
{
return new HomeViewModel();
}
}
public class HomeInputModel
{
}
public class HomeViewModel
{
}
Every Action/Controller class should have Execute method, in order to run. While this method as mentioned above, should have unique object as input and output.
By default, Fubu's routing engine runs HomeAction's execute method when it reaches the url like this:
http://MyPrject.Com/Home.
As stated in previous posts, all suffixes like action,Command, Query... is ignored due to simplicity of Fubu's routing system. Jeremy fully explained the routing system's internals in this post.
No comments:
Post a Comment