Main类在MVC模式中的位置和职责
我正在尝试使用 SWING 和 MVC 构建一个简单的货币转换器。我的问题是:在 MVC 模式中,Main 类通常应该位于哪里?它应该在一个单独的包中初始化模型、视图、控制器并设置连接等吗?或者 Main 类应该在 View 包中?换句话说,谁的责任是构建整个系统?
I am trying to build a simple currency converter using SWING and MVC. My question is: in an MVC pattern where should be the Main class generally located? Should it be in a separate package initializing the model, view, controller and setting up the connections etc.? or should the Main class be in the View package? In other words, whose responsibility is to build the whole system?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Main
类应该只充当应用程序的初始化程序,您可以将其放置在名为com.yourcompany.currencyconverter.app.main
是的,如果能将它与其他部分分开就好了。
Main
class should just act as initilizer of the app, you can place it in a package calledcom.yourcompany.currencyconverter.app.main
Yes, it would be nice to have it separated from the rest.