Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

View with js plugin/widget rendering flow #840

Open
danielesalvatore opened this issue Dec 12, 2014 · 0 comments
Open

View with js plugin/widget rendering flow #840

danielesalvatore opened this issue Dec 12, 2014 · 0 comments

Comments

@danielesalvatore
Copy link

Hi everyone,

I would like to know what is the best work-flow and code organization to render a page with a UI widget in it (any of the UI graphic library, e.g. a dropdown, image gallery or whatever).

My current configuration/flow is:

(router triggers page change, dispatcher listen to it and initialize Module Controller)
Controller initialization.
Controller action invocation.
Within this action, the view is instantiated and set as controller property.
Controller call a view method to render third party UI object (a different call from the automatic call of render(). Given that i pre-load the template with RequireJS this should be always a sync call ).
Within this view's method, the third party lib is called and the UI object rendered.

I would appreciate some feedback about this flow or the best practice to do so.
Would it be better to override the render() method?

Thank you very much for your support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant