GSE-Project / SS2016-group2

2 stars 3 forks source link

Introduce a way how to deal with the data in the view. #74

Closed skaldo closed 8 years ago

skaldo commented 8 years ago

As the application gets more and more complex, we have to define a way how to deal with the preparation of data for the UI.

Example: We want to have a filtering of the stops in our application.

  1. Should we do it in the controller or in some service?
  2. Should the service have a direct access to the data provided by out CDS, or should it get it from the controller?

Think of the reusability and the coupling and other SE principles :wink:.

After discussing this, we can start with coding it. Only if we all agree on the solution, we can be sure that there's no better one.

This issue is assigned to Steffen, but everyones opinion is valuable! @GSE-Project/group2


Since we agreed upon @themetalone s proposal on 09.06.16 we'll implement the Data Transformation Layer shown in app/providers/transformation/TransformationService

themetalone commented 8 years ago

Haven't found any specific pattern to do this but here are my ideas: First of all, I wouldn't let the controller do data logic work. The transformation from model into view data shouldn't be part of the View Controllers responsibilities.

My Recommendation: New Layer between UI and Data Logic

We simply add another layer to our application. This layer would translate the data model into view model objects as well as filter the data. This would be similar to our very first version of the CDS.

I think this to be the most elegant and flexible approach as well as the one with the least rework effort. I'll prepare a quick demonstration for tomorrows meeting

skaldo commented 8 years ago

Thanks Steffen, I share you thoughts. Please do not spend too much time with the demo preparation. Just take one entity (stops) and prepare a brief demo, including how the search could look like (must not be implemented, though).

Let us discuss the details in the meeting.

themetalone commented 8 years ago

Found a bug that seems to be tied to #80 since it occured after updating the ionic : When entering text into the search bar, the entered text seems to be one character to slow. i.e. entering character by character the word Kirche lead to :

and when removing then character by character

themetalone commented 8 years ago

I'll set this to Review as the implementation and integration are done.

themetalone commented 8 years ago

Further developed in #84