Note that there are some explanatory texts on larger screens.

plurals
  1. POMVC component GUI approach
    primarykey
    data
    text
    <p>I am interested in general approach for building interactive GUI using MVC3.</p> <p>The idea is to build set of different components that can be integrated (plugged in) into various scenarios.</p> <p>Each <strong>Component</strong> MUST have it's own model definition, controller and views. Component encapsulates not just the view but also behavior through it's controller.</p> <p>All internal implementation details, model, behavior, etc... must reside inside component, so that component becomes independent, modular - black box. This allows component to be changed without breaking anything in context in which component is used. </p> <p>Context in which component runs must not make any assumptions about internal details of component implementation.</p> <p>On the other side the component does not make any assumptions about context in which it will be used.</p> <p>Finally, the component must provide mechanism to "communicate" or "interact" with outside world. Beside internals, component must provide some kind of "external" interface (like parameters, data, functions, events whatever...) which would allow component to be integrated into execution context.</p> <p>The <strong>Context</strong> (or scenario) is part which contains components. Now, the basic challenge for the context is to manage interaction between components.</p> <p>Real-world <strong>Categories component</strong> example:</p> <p>Component displays list of categories and allows user to perform various actions such as sorting, paging and record selection. Internally, it has it's own model which stores relevant information like current page, sort, selection, etc... Internally, it implements all required actions (for basic render, for user actions response, etc...) in it's own controller. Internally, it handles model state persistence in the view and model state restore in it's own controller.</p> <p>Real-world <strong>Products component</strong> example:</p> <p>Component displays list of products and allows user to perform various actions such as sorting, paging and record selection. Internally, it has it's own model which stores relevant information like current page, sort, selection, etc... Internally, it implements all required actions (for basic render, for user actions response, etc...) in it's own controller. Internally, it handles model state persistence in the view and model state restore in it's own controller.</p> <p>Real-world <strong>Dashboard page</strong> (context, scenario) example:</p> <p>Page displays both Categories and Products components. Products component displays all products for the currently selected category and thus must provide external interface (parameter or something) to receive selected category identifier from the context. Categories component must provide some kind of external interface so that context can act when selected category changes and provide selected category identifier for the products component.</p> <p>Technically, communication approach for page updates would mostly go through AJAX but if this is possible without AJAX, it would be even better.</p> <p>In the case of AJAX, I <strong>would like</strong> solution which uses server side controller(s) which decides and renders what should be updated on the client (JSON or something).</p> <p>I would <strong>not like</strong> solution in the client script (client side "like" controller) which decides what actions to call and what parts of page to update - this as said in previous paragraph must be decided by controller(s) on the server.</p> <p><strong>Important:</strong> It is not necessarily for the components to work when directly called via some route.</p> <p>How would you generally implement described system?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload