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
GUI means Graphical User Interface. It is the common user Interface that includes Graphical representation like buttons and icons, and communication can be performed by interacting with these icons rather than the usual text-based or command-based communication. A common example of a GUI is Microsoft operating systems.
A graphics-based operating system interface that uses icons, menus and a mouse (to click on the icon or pull down the menus) to manage interaction with the system.
GitKraken is one of the best-known Git GUI tools for Windows, Linux, and Mac. Specialists favor this software for its reliability and efficiency, and its stylish interface also helped this solution become so popular.
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)
Fowler has a great overview of GUI architectures: http://martinfowler.com/eaaDev/uiArchs.html
I personally use the PresentationModel construct throughout my apps - it keeps the presentation side of things completely separate from the business logic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With