Note that there are some explanatory texts on larger screens.

plurals
  1. POBackbone Marionette modules as Widgets similar to Twitter Flight
    text
    copied!<p>I'm reading up in choosing the correct client-side framework to segment/modularize my frontend code in Widgets. </p> <p>Basically what I have/want is: </p> <ul> <li>a complex website with multiple pagetypes, so no single-page application. </li> <li>all pages are able to render a complete page WITHOUT the use of javascript. IOW: javascript is used as enrichment only. </li> <li>Lots of pages have a very dynamic way in which widgets can be shown on screen. To overcome complexity at the server-side I've modularized my code into widgets (composite pattern), where each widget is responsible for it's own: <ul> <li>server-side controller code</li> <li>server-side templating (using hogan/mustache) </li> <li>routing endpoints, should it need to be called from the client</li> <li>structural css (css converning the structure of the widget as opposed to the look&amp;feel)</li> </ul></li> <li>a server-side RegionManager ultimately decides which widgets are rendered and where they are rendered on screen. Endresults is that the RegionManager spits out the entire html (server-generated) as the composite of the rendering of all of it's widgets. </li> </ul> <p>Now, some of these widgets DO have client-side logic and need rerendering on the client. Take a searchpage for instance, which needs to be able to update through ajax. (I've described this process, which uses DRY templating on client and server, <a href="https://stackoverflow.com/questions/7370056/accessibility-and-all-these-javascript-frameworks/7371629#7371629">here</a>)</p> <p>What I ultimately want is that, given I already use the composite pattern on the server, to extend this to the client somehow so that a Widget (1 particular logic block on the screen) contains all mentioned server-side code, plus all needed client-side code. </p> <p>I hope this makes sense. </p> <p>Would Marionette be suited to be used as a client side framework in this scenario? I'm asking since I'm not 100% sure if the concept of a Marionette Module is what I describe as being a Widget in above scenario. (I'm mentioning Twitter Flight in my question, since I believe this would be a fit, but it currently is so new that I'm hesitant to go with it at the moment_</p> <p>I think basically what I'm asking is if anybody has some experience doing something along these lines.</p>
 

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