开发者

Software design pattern MVC window creation strategies

I would like to hear some opinions on window strategy creation with MVC. I'm writing a game and I want to integrate MVC into it.. And one of the questions I have is should I create all the windows and register them within controller o开发者_运维问答n the start of the application and fill them when appropriate event is fired or should I create them along only when they needed? If I should create the windows only when it needed, who should be in charge of creation?

Thanks in advance, Serhiy.


I'd create them as they are needed and let the Controller be in control of creating the window.


you can consider the Swing's architecture, a modified MVC.

http://java.sun.com/products/jfc/tsc/articles/architecture/


  1. Create the model
  2. Create the controller
  3. Link controller to model.
  4. Create view
  5. Link view to model.
  6. Link view to controller.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜