I’m about to start an application which will have both console and GUI interfaces. What I wan’t to achieve is COMPLETE decoupling of application logic from interface. In future, I may also add web interface, and I don’t want to change anything in my application.
Is there a good example (perhaps some open source project) where I can learn how this should be done properly…. also I’d appreciate advices/guidelines on how to do this.
Thanks
a good technique for logic and ui decoupling is the Model View Presenter patterns and its variants (Passive View and Supervising Controller). There are writings by martin fowler and also many blog posts that present these patters.
I also suggest you to look for another variation of MVP, called Presenter First. theres a good article about it, and also a good java code sample (look for java example)