Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Agreed, not personally a fan. Maybe I've just been using MVC for too long to appreciate the benefits, though..


I would agree... but perhaps I am looking at it code first. In the past a ThingController could return multiple Views (with possibly different models) for each action Get/Post/etc.

Get -> return View(GetResponseModel) -> Get.cshtml

Post -> return View(PostResponseModel) -> Post.cshtml

Can the Razor OnGet and OnPost only return one "model" to the "page"? It appears the page can only take one model.

OnGet -> ThingModel -> ThingPage

OnPost -> ThingModel -> ThingPage

The entry point Page (aka a View) seems to dictate the model returned and hence limits what type any "Action" can return. Am I reading this right?

And how about returning other types besides 'Pages' - like JSON (a la JSONResult).


As someone who has really only learned MVC (I've done some old Webform Umbraco-based stuff which is terrible but I think that's probably more Umbraco's fault) from an organization standpoint this feels much cleaner. I think the only piece that's missing that I don't really understand is being able to manipulate the routing to my will.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: