Closed gregorylegarec closed 7 years ago
@gregorylegarec : steps objects
is it data, view, controller? Sometimes you speek about abject, sometimes about models; it's confusing :(
@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 :)
@gregorylegarec : I don't see relation between collection/models
and application controller
to get data (missing feed arrow
beside listen
arrow?)
@gregorylegarec : about step/
directory; shouldnt it be renamed into config/
and then be consistent with your schema?
@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.
@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.
@misstick I just renamed it.
Great! Thanks @gregorylegarec
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 intosteps/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
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.