Hello everyone. After working with Rails full-stack for several years, in the past year I realize that using a JS front-end framework with Rails back-end is the way I want to develop the next applications.
Among the available framework I have picked up Ember mainly because of its routing system (I do believe that UI development should be url-driven).
So, few months ago I started creating a couple of “dummy” apps to learn Ember basic and watching all the screencasts I could and now I feel it is time to work on something more “serious”.
At my company, we have an aging Rails (2.3) app that seems to be the perfect candidate to be updated using Ember. My initial plan is to make the controllers respond to json (touching as less as possible), remove all the UI stuff (views, js, css), and make it talk to an new Ember app.
The application has (of course) some peculiarities that I’m still not sure how to address. So I’d love to hear from you guys how I may tackle them.
Let me provide some context without going into too many details that for this conversation could be useless (please, feel free to ask for more if you think I’m missing anything).
The app (only) displays analytical results imported daily though a rake task from a legacy system. To get to the results the user browses through a series of steps in which he selects one or more options among the available ones. According to the values selected during the previous steps, the last one displays the desired results. The steps are the ones below:
- Product(s)
- Specification
- Batches
- Test
At the first step the user selects one or more products he’s interested in, for instance Product1 and Product3.
At the second step the user selects the specification he’s interested in among the ones used to analyze Product1 and Product3, for instance IS.
At the third step the user selects the batches he’s interested in among the ones of Product1 and Product3 analyzed with IS, for instance 001-14, 002-14, and 004-14.
At the fourth step the user select the test he’s interested in among the ones common to batches 001-14, 002-14, and 004-14, for instance pH.
At this point the pHs of the 3 batches are displayed.
As I mentioned at the beginning, I love the fact Ember is built around urls so I’d like to be able to have a different url for each step and the url should include the selections done until that point. In this way users may share urls.
I’m thinking to have a template and controller for each step but I’m not sure how to organize them in a way to be able to store the selected values in the route (in some step the user may select dozens of elements). Moreover, I’m not sure where I should store the selections done in each step in order to be able to retrieve them at the next one.
What do you guys think about?
Thanks for reading through this and I appreciate any suggestions.