Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Applying MVC with the DI framework(Query on how to fit View communications within MVC)
Applying MVC with the DI framework [message #1696522] Wed, 27 May 2015 01:14
Eclipse UserFriend
Hi

This is a beginner RCP question and perhaps I have given it a misleading title from not knowing enough about RCP.

Having started on a RCP client, I am having difficulty understanding how to fit the communications between the UI components and the controlling logic to MVC principles.

Currently in my UI a user clicks on a button in a Part, which instantiates a class that performs some logic and returns data .......ugh Sad . The Part then uses IEventBroker to send this to another Part for display. This works but does not fit MVC principles.

I want to move the logic that acts on the button click and generates the data to a singleton Controller class, but it seems to me this will obviously be outside the DI framework and so does not have access to IEventBroker.

One solution seems to be to have the Activator inject IEclipseContext into the singleton Controller class and then that class can get IEventBroker.

However, this seems to require the Activator to set a Logger class in IEclipseContext, which is not API and flagged as discouraged access.

The above seems to me a simple and common Use Case of RCP. What is Best Practice?

Thank you very much!


Previous Topic:programatically detach a view in 4.2
Next Topic:Access workbench.xmi Information through code?
Goto Forum:
  


Current Time: Fri Jul 18 13:53:46 EDT 2025

Powered by FUDForum. Page generated in 0.06873 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top