WEKIT-ECS / MIRAGE-XR

MirageXR is a reference implementation of an XR training system. MirageXR enables experts and learners to share experience via XR and wearables using ghost tracks, realtime feedback, and anchored instruction.
Other
28 stars 4 forks source link

Refactor WorkplaceManager #801

Closed wekitecs closed 2 years ago

wekitecs commented 2 years ago

In GitLab by @danielbekhter on Jan 31, 2022, 10:02

wekitecs commented 2 years ago

In GitLab by @danielbekhter on Jan 31, 2022, 10:02

changed due date to February 28, 2022

wekitecs commented 2 years ago

In GitLab by @danielbekhter on Jan 31, 2022, 10:09

Dear colleagues, over the course of the last couple of days, I tested the application and analyzed the existing code. Now I have several questions before I develop a concept for the refactoring of Workplaces and start with the implementation.

  1. As far as I am concerned, the native architecture for applications in Unity, Unreal Engine, etc. is entity-component (ECS). Is there a particular reason why we would like to implement MVC, which is rather typical for 2D web- and mobile applications?
  2. I have looked into the WorkplaceManager script, which currently comprises the WorkplaceLoader and WorkplaceParser functionalities. Since these are all separate in the UML class diagram of the ActivityManager, I am considering separating these functionalities into distinct components for the WorkplaceManager GameObject. Would these components be in line with your vision?
  3. Did I understand correctly that, as of now, the Workplaces are pretty much embedded in the activities and are not meant to be exchanged at runtime? If so, I would assume that this is not related to the refactoring.

@fwild @klamma @BorisJov @BenediktHensen @fominykh

wekitecs commented 2 years ago

In GitLab by @wild on Jan 31, 2022, 11:49

Hi Danylo,

good questions :)

  1. ECS and MVC are not mutually exclusive, but enforcing more strict MVC for our case (where we have a data model that is presented with different views on different platforms) makes a lot of sense. Here are two good postings: MVS vs ECS and EVS

  2. Don't forget that there is also a Workplace data model class - and somewhere there is also some helper functionality for 'calibration' (= recalculating all indoor positions relative to the calibration marker). The new UML diagram that Boris created to guide the refactoring reflects so far all core classes - but we might have to add more, as we go along (e.g. for calibration).

  3. Workplaces very much could be changed at run-time - effectively, the calibration is generating a new (temporary) workplace model. In the future, we might want to offload workplace adaptation to a server-side component as well (e.g. precalculating workplace models where all positions are automatically set on the server side already - based on the user's space available).

wekitecs commented 2 years ago

In GitLab by @BorisJov on Jan 31, 2022, 14:27

For 1. I'd just like to add this article, I think it details what Fridolin said perfectly.

  1. The UML I made is in no way final, it was just a starting point meant for initial organisation. Feel free to discuss changes.
wekitecs commented 2 years ago

In GitLab by @danielbekhter on Feb 1, 2022, 20:26

Dear @fwild and @BorisJov, thank you for your insightful responses. I will try to adhere to the conceptual notion of MVC.

wekitecs commented 2 years ago

In GitLab by @danielbekhter on Feb 7, 2022, 15:18

By the way, I added my suggestions for refactoring, which we discussed during our last meeting, as comments to the WorkplaceManager and the Workplace scripts on the branch danylo/ActivityManagerRefactor.