cozy / cozy-proxy

This repository was part of CozyV2 which has been deprecated - Cozy authentication and routing layer
https://blog.cozycloud.cc/post/2016/11/21/On-the-road-to-Cozy-version-3
GNU Affero General Public License v3.0
26 stars 31 forks source link

Integrate onboarding component into existing application #304

Closed gregorylegarec closed 7 years ago

gregorylegarec commented 7 years ago

Based on PR #303

The main goal of this PR is to integrate previously commited onboarding into existing proxy application.

How it works

The idea is to get standalone and separated objects defining onboarding steps. They are located into the steps directory and listed into steps/config.coffee.

The application requires those steps objects and pass them to the onboarding component.

Steps are minimal at this time, but we will enhance them in the next developments, and add methods dealing with validation logic, data fetching, etc. (if needed).

After that, the application set up the router with specific routes for the steps. This part has been pretty poorly tested and it will surely need adjustment in the next improvements.

The main ideas are :

All those points are of course discussable. However my opinion is that we should use it as it for now and implements one change at a time in the next developments.

Modelisation naive diagram

Diagram

Specific points

StepModel

The StepModel class may be a seen as a useless layer, but its role is to wrap our agnostic Step object to Backbone Model. So we can use it easily in Marionette View.

Next Steps

All this points are of course disccussable.

misstick commented 7 years ago

@gregorylegarec : steps objects is it data, view, controller? Sometimes you speek about abject, sometimes about models; it's confusing :(

misstick commented 7 years ago

@gregorylegarec : could add a schema to explain briefly relations between components? You are adding a lot of notions that are not necessarily obvious in one look; and the documentation isnt explaining me much about that :(

Otherwise : great "big" work :)

misstick commented 7 years ago

@gregorylegarec : I don't see relation between collection/models and application controllerto get data (missing feed arrowbeside listen arrow?)

misstick commented 7 years ago

@gregorylegarec : about step/ directory; shouldnt it be renamed into config/ and then be consistent with your schema?

gregorylegarec commented 7 years ago

@misstick As Application is listenning to Onboarding, to me it implies that it has access to onboarding's data/info. That also why I called this diagram "naive", only main relationships are mentionned.

gregorylegarec commented 7 years ago

@misstick about I prefer steps directory, or at least config/steps but config is too generic. If you're ok with config/steps I may update this, it clarify a little bit the role of those files.

gregorylegarec commented 7 years ago

@misstick I just renamed it.

CPatchane commented 7 years ago

Great! Thanks @gregorylegarec