T4MVC, is it outdated? Still good? If not what else to use?
Asked Answered
E

1

8

Folks,

As of today should I introduce T4MVC in my project or use strongly typed goodness from MvcContrib?

return RedirectToAction(MVC.MyController.MyAction());

or

return RedirectToAction<MyController>(c => c.MyAction());

Trying to stick with standard/mainstream and stay up to date.

I know, there are Q&A on this site, I am interested to hear what is latest & greatest, rather than what was 2 years ago.

Thanks in advance.

Erl answered 15/8, 2012 at 15:4 Comment(3)
We are using ReSharper 6 in all of our MVC projects and with the MVC support and nice refactoring tools we never had any problems with using strings as action and controller names. So 1 vote for none of them :)Amadis
@Amadis Thanks, good observation. Sorry for leaving no choice, I didn't really consider this option having used to externalize every possible magic from applications. I am coming from non-web world, so its understandable. Thanks again.Erl
Resharper doesn't cater to HtmlHelper.GenerateLink, etc, which is a larger pain point of refactoring than Redirect methods.Caldarium
H
5

Both techniques are acceptable today and I haven't heard that one would be deprecated. T4MVC has the advantage of performing better which is one of the reasons why those strongly typed helpers taking lambda expressions are actually not part of the ASP.NET MVC core.

Hague answered 15/8, 2012 at 15:13 Comment(2)
thanks for prompt response. Does it mean T4MVC is a clear-cut choice, or it has some disadvantages? or ask another way, if there's T4MVC around, why strongly typed helpers are even created?Erl
Those are subjective questions that I cannot answer. Some people prefer T4MVC, others prefer the strongly typed helpers and some are just happy with magic strings.Hague

© 2022 - 2024 — McMap. All rights reserved.