Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Challanges Implementing MVP (What to be careful about concerning Model View Presenter in Eclipse RCP product)
Challanges Implementing MVP [message #1745378] Sun, 09 October 2016 11:35
Daniel   is currently offline Daniel Friend
Messages: 29
Registered: July 2014
Junior Member
Hello there!

i am currently playing around with implementing Model-View-Presenter in an Eclipse RCP product.

Please consider following story:

  • SearchParameterView - Presenter throws Event to trigger search with Parameters entered in ViewModel
  • SearchResultView - Presenter listens to searchEvent, gets triggered, searches and updates resultlist in ViewModel, triggers displayEvent to display Details of first Searchresult
  • SearchResultDetailsView - Presenter listens to displayEvent, gets triggered and displays what has to be displayed via updating ViewModel so that View gets updated via Databinding

Considering now that this scenario is built upon 3 ViewParts with each having its own Presenter and ViewModel ... i would like to ask some questions:

  1. is this "a correct design" or did i take some wrong turn wiring the stuff?
  2. how do i assure that each presenter is active and able to listen to the events all the time? (think of lazy loading a viewpart ... like the non-visible part in a folder of two parts)
  3. how do i keep presenters clean for testability? - i want to be as rcp-code-free as possible in my presenter but at the same time i want to be able to react to / throw events that interact with other views in the presenter (think throwing/registering for events to/from other presenters)

A little background of things already looked at for inspiration:

  • consumed Patric Paulins great presentation concerning his way of organizing/implementing MVP ViewParts/Presenters/Models.
  • found someones way of "pre"-wiring viewpart/presenter/viewmodel via some xml configuration which has to be run at the startup of the eclipse.product.
  • my own share of experiences concerning lazy loading of eclipse-rcp-elements and examples of databinding viewmodel/presenters or throwing/catching events between presenters

cheers
Daniel
Previous Topic:Common Navigator: icon & text overlap, no icon for subtree
Next Topic:How do I use third party library in my RCP project?
Goto Forum:
  


Current Time: Sun Sep 23 02:44:14 GMT 2018

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

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

Back to the top