Best practices for GUI applications

I am going to launch an application with console and GUI interfaces. What I did not achieve is the FULL disconnection of the application logic from the interface. In the future, I can also add a web interface, and I do not want to change anything in my application.

Is there a good example (maybe some kind of open source project) where I can find out how it should be done correctly .... I will also be grateful for tips / recommendations on how to do this.

thanks

+6
java model-view-controller swing
source share
3 answers

A good method of logic and decoupling is the View Presenter model and its variants (passive viewing and control controller). There are martin fowler writings, as well as many blog posts that represent these patterns.
I also suggest you look for another MVP option called Presenter First . theres a good article on this, as well as a good java code example (see Java example)

+4
source share

Fowler has a great overview of graphical interfaces: http://martinfowler.com/eaaDev/uiArchs.html

I personally use the PresentationModel construct in all my applications - it keeps the presentation side completely separate from the business logic.

+2
source share

Build your core functionality (1) and your command line version (2) first (to the point where they are more or less functionally complete). Take care to carefully develop / document your API. Thus, you cannot mix logical and graphic parts at an early stage.

An example of a good command line descriptor / GUI application is, for example, mplayer (although it can be argued that it looks like a command line application with a graphical interface enabled).

+1
source share

All Articles