Modularity, the ComponentController and UserControls, a solution.

Last post 06-04-2008 5:26 AM by jwscuba. 3 replies.

Sort Posts:

  • Modularity, the ComponentController and UserControls, a solution.

    06-02-2008, 2:56 PM
    • Member
      638 point Member
    • jbardrof
    • Member since 03-22-2007, 11:47 PM
    • Naples FL
    • Posts 192

     I've been doing some proof of concept work involving modular behavior with independent and swappable user controls.  The two apparent choices we have right now are ViewUserControls and ComponentControllers. 

    Now ViewUserControls can be effective ways to segment presentation into reusable chunks, but for the most part we're forced to make them rely on the ViewPage's ViewData.  It possible to use ajax to monkey around with that some, but of course that is not a solution. Our other option is ComponentControllers.  As I'm sure I'm not alone, I've noticed that the ComponentController has been seemingly left out of the update process.  It can't handle ActionResults, and it requires the use of an aspx page to work.  Another issue I've noticed is that when making calls to it, it can fail in certain instances claiming that it does not implement the IController interface.  This makes it difficult to involve ComponentControllers with ajax behavior since you cannot send calls as you would to a regular controller. 

     
    What are your plans involving modularity? What can we expect going forward?

    I've done a bit of Frankensteining, and I can't say this is the best solution, BUT it seems to be actually working.  I'm going to write it up in a blog post rather than make a long post here.  Feel free to discuss the idea, I'll be posting it shortly.

    Remember if you have gotten your answer to mark your thread as answered.
  • Re: Modularity, the ComponentController and UserControls, a solution.

    06-03-2008, 3:44 AM
    • Member
      103 point Member
    • Ahtesham
    • Member since 04-09-2008, 12:00 PM
    • Posts 100

    plz make a blog then post that address here too , waitin for it

  • Re: Modularity, the ComponentController and UserControls, a solution.

    06-03-2008, 8:49 AM
    • Member
      638 point Member
    • jbardrof
    • Member since 03-22-2007, 11:47 PM
    • Naples FL
    • Posts 192

    I've written up the functionality I modified from RenderComponent to allow us to use ViewUserControls in the same way, but still keep the positive effects of the Controller.  This code works for the very few tests I threw at it but its more a work in progress. Hopefully this is useful.

     Read about it!
     

    Remember if you have gotten your answer to mark your thread as answered.
  • Re: Modularity, the ComponentController and UserControls, a solution.

    06-04-2008, 5:26 AM
    • Member
      133 point Member
    • jwscuba
    • Member since 09-28-2004, 3:23 PM
    • Posts 101

    great job,  I like this. 

Page 1 of 1 (4 items)