Presentation patterns to use with Ext

前端 未结 2 1259
别那么骄傲
别那么骄傲 2021-02-06 04:34

Which presentation patterns do you think Ext favors or have you successfully used to achieve high testability and also maintainability?

Since Ext compon

2条回答
  •  离开以前
    2021-02-06 05:29

    2 yeas have passed since this question was aksed and now Ext-JS 4 has a built-in implementation of the MVC pattern. However, instead of an MVP (which I prefer), it favors a straight controller because the views attachment themselves to the models through stores.

    Here's the docs on the controller:

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.app.Controller

    Nonetheless it can be made to act more like a supervising controller. One nice aspect of Ext-JS is the global application objects ability to act like an event bus for handling controller to controller communication. See this post on how to do that:

    http://www.sencha.com/forum/showthread.php?176495-How-to-listen-for-custom-events-fired-in-application

    Of course the definitive explanation of all these patterns can be found here:

    http://martinfowler.com/eaaDev/uiArchs.html

提交回复
热议问题