Search

You searched for the word(s): userid:448909

Matching Posts

  • Re: Typesafe Reverse Reflection for UpdateModel

    [quote user="dlpowell"] My biggest problem with this is that it's very verbose. What I'd really like to do is this: UpdateModel( entity, new[] { entity.GetMemberName(e => e.Name), entity.GetMemberName(e => e.UnitPrice), } ); where entity somehow supplies the <Product> type. Does anyone have a better idea? [/quote] You could probably also create an extension method to achieve this result. Google extension method generics ( http://www.google.com/search?q=extension+method
    Posted to ASP.NET MVC (Forum) by alexdresko on 9/25/2008
  • Re: How do you conditionally display HTML elements?

    Oh, and HtmlHelpers provide type safety in most cases.
    Posted to ASP.NET MVC (Forum) by alexdresko on 8/19/2008
  • Re: How do you conditionally display HTML elements?

    Simple. HtmlHelpers are testable and ViewPages are not. And since your ViewPages should not contain ANY logic, you're pretty much forced into writing HtmlHelpers if you employ the TDD approach. Personally, I would much rather write <%= Html.Button() %> than <button />, as the former technique can encapulate additional site-wide functionaliy, for example.
    Posted to ASP.NET MVC (Forum) by alexdresko on 8/19/2008
  • Re: How do you conditionally display HTML elements?

    Well, if you wanted to be as true to ASP.NET MVC as possible, you would create an HtmlHelper to contain your logic.
    Posted to ASP.NET MVC (Forum) by alexdresko on 8/19/2008
  • Re: Why the HtmlHelper? (Beginner question)

    Type safety and URL routing engine support are the main reasons I love the HtmlHelper.
    Posted to ASP.NET MVC (Forum) by alexdresko on 8/13/2008
  • Re: Controlling the view?

    ( Yay! Haacked chimed in!) Thanks for posting that link. I was just about to come in here and post a link to "twisting the triad" ( http://aviadezra.blogspot.com/2007/07/twisting-mvp-triad-say-hello-to-mvpc.html ) and noticed that it's also referenced in the link that you posted. (anyone interested in MVC should read all of the links in this thread) So, traditionally, my experience has been with MVP. That's why I'm having a difficult time understanding the differences between
    Posted to ASP.NET MVC (Forum) by alexdresko on 7/24/2008
  • Re: Controlling the view?

    Okay, well how would handle a situation where you want only certain UI elements to appear on a page if the user is in a particular role? It seems like a maintenance nightmare to create two separate nearly identical views to accomodate very minor differences in the UI. In WebForms land, I might create a Panel to contain the role specific stuff and toggle its visibility based on the logged in user. Or, I might directly toggle the visibility of a control on the page. I have an idea for what I would
    Posted to ASP.NET MVC (Forum) by alexdresko on 7/24/2008
  • Re: Controlling the view?

    In my opinion, a view should not be "dumb"... a view CANNOT be dumb, actually. If it were completely dumb, you wouldn't have to write any code to get things to display properly. The moment you begin writing code to display information, you start bluring the lines between code that should be in the view and code that should be in the controller and code that should be in the view. The MVP technique discussed in the link above is much cleaner in this regard. This is the same reason the
    Posted to ASP.NET MVC (Forum) by alexdresko on 7/23/2008
  • Re: Controlling the view?

    To clarify a bit, when I used ASP.NET and MVP (similar to MVC) in the past, it looked something like this: http://haacked.com/archive/2006/08/09/ASP.NETSupervisingControllerModelViewPresenterFromSchematicToUnitTestsToCode.aspx In the link above, you can clearly see that the controller has two way communication with the view and, thus, the view is more testable.
    Posted to ASP.NET MVC (Forum) by alexdresko on 7/23/2008
  • Re: Controlling the view?

    Follow up: Searching for test viewpage mvc yielded sufficient results, I think. Clearly, my old way of thinking was pretty far off. Some people seem to think it's a waste of time or not supported to test the view. But I think I can write custom HtmlHelper thingies and unit test those! Now I have to figure out how to write HtmlHelper thingies.
    Posted to ASP.NET MVC (Forum) by alexdresko on 7/22/2008
Page 1 of 47 (461 items) 1 2 3 4 5 Next > ... Last »