Design patterns to reduce coupling in Swing application

后端 未结 7 1799
刺人心
刺人心 2021-02-09 12:20

Hey all, I\'m currently working on a Java Swing application and I was looking for some guidence. The application is fairly small, but I\'m noticing that as the code base is grow

7条回答
  •  被撕碎了的回忆
    2021-02-09 13:11

    As you already said your intent to use MVC , or you may be already using. Once you have seperated out data (I call it as data model layer). Now you need to apply OBSERVER pattern on these data model classes. All the views (your ui components) using this data model are observing this model objects for any change (Via observer pattern).

    I hope this is what you are looking for.

提交回复
热议问题