简体   繁体   中英

Is MVC the only acceptable way to develop a desktop application with a GUI?

还是存在其他普遍接受的模式来创建具有图形界面且没有网络连接的通用业务应用程序。

还有另一种相似的模式可以完全分隔各层, n层体系结构虽然易于理解,但一旦您设法分离出逻辑,如果您想进一步扩展它,则可以使硬件分离更加容易。

I use the Observer quite a bit. A similar example in the wild is RCP's selection service .

It isn't the only acceptable way, but the concepts in an MVC design will provide you with a good foundation. The Computer Science community has built these design patterns because of the years and decades we have developing applications. After dealing with the same problems over and over, we've built up these design patterns to avoid the problems in future development.

If you don't want to follow these design patterns, you can.... but you're setting yourself up for pain. There isn't a good reason to reinvent the wheel. It's better to take a cue from all of the developers who came before you. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM