I have an design like this:
- UI Layer
- Component Layer.
The idea is all event handlers like click, painting the dom will be hitting UI layer, which will call the corresponding component layer.
Now imagine on click of a button, the ui layer calls component layer, so the dependencies looks like this:
define(['creationComponent']) //ui layer module
so that on click of button, this module can call creationComponent methods.
Now creationComponent too, in order to paint something, calls the ui layer, so the creationComponent looks like this:
define(['uiLayer']) //create module
and here I go with dependencies cycle, where I'm making mistake in the design process?
Aucun commentaire:
Enregistrer un commentaire