Quantcast
Channel: abstraction – 100% Private Proxies – Fast, Anonymous, Quality, Unlimited USA Private Proxy!
Viewing all articles
Browse latest Browse all 10

Navigation abstraction for JavaFX desktop application

$
0
0

I am trying to abstract some functionality from my desktop application (JavaFX) for changing views. So, what I am thinking is:

Navigator interface with methods like goToAccountsOverview(), goToAccountDetails(Account account) etc. The implementation will depend on a ViewFactory to create the Views and a DisplayingViewChanger to change the view that is being displayed.

There will be multiple navigator interfaces depending on the state of the application, starting with:

  • NotConnectedStateNavigator (goToConnectToDatabase(), goToCreateDatabase() etc)
  • ConnectedStateNavigator (goToAccountsOverview(), goToAccountDetails(Account account) etc)

So each state will have its own navigator and view factory and a common view changer.

The view factories and navigators will not share a common interface (createView(ViewEnum v) and goToView(View view) respectively) because I cannot think of a way to pass parameters (for example for creating the account details view, how would I pass the account model?). I could do it by passing a map of parameters but it seems hacky.

Does this sound ok?

Also, DisplayingViewChanger doesn’t sound like a good name to me but I cant think of anything else. Maybe SceneChanger? Any suggestions?

The post Navigation abstraction for JavaFX desktop application appeared first on 100% Private Proxies - Fast, Anonymous, Quality, Unlimited USA Private Proxy!.


Viewing all articles
Browse latest Browse all 10


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>