Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 05:14
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
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: Tue Sep 24 05:54:48 GMT 2024

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

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

Back to the top