Separating? Good idea. Separation of the UI is more important than other parts of separation, in part due to social/market reasons: the are too many different UI systems and libraries, and they change faster then other parts of the software, as well as requirements, so you need to be able to quickly adopt them.
To start with, I suggest you learn and analyze applicability of the following
architectural patterns (
http://en.wikipedia.org/wiki/Architectural_pattern_(computer_science)[
^]):
MVVM — Model View View Model,
http://en.wikipedia.org/wiki/Model_View_ViewModel[^],
MVC — Model-View-Controller,
http://en.wikipedia.org/wiki/Model-view-controller[^]),
MVA — Model-View-Adapter,
http://en.wikipedia.org/wiki/Model–view–adapter[^],
MVP — Model-View-Presenter,
http://en.wikipedia.org/wiki/Model-view-presenter[^].
Pay attention for the motivation of those architectures. If you understand it, you will be able to properly approach the design for a particular application.
—SA