ga-wdi-boston / ember-resources

Performing handling 'actions' in Ember, and using them to perform CRUD on the model.
Other
0 stars 112 forks source link

ga-wdi-boston/ember-resources #20

Open jrhorn424 opened 8 years ago

GA-MEB commented 8 years ago

9:40 - 12:40, 1:40 - 3:00 => roughly 4.5 hours

jrhorn424 commented 8 years ago

This was actually NINE units.

The first morning I didn't get very good CFUs on components, and I had to go into detail on binding (from routes to view templates, and from there to components, ad infinitum). I covered Ember Data and the store, how it talk to the API through the adapter and translates JSON responses in the serializer. (3 units)

We made the decision as a team to not pull one-to-many into a separate lesson, and it didn't make sense for the Listr app anywyay. Feedback since then has been that a wider variety of relationships should be covered (from @gaand).

The next day we toggled and persisted UI state (done: true with strikethrough). We also deleted an item. Also reviewed binding again. Discussed form objects and almost completed creating an item from within the child component. (3 units)

The third day we reviewed bindings, this time for action references, which are bound down, but execution must be manually passed up through components. Understand this flow took two units and was reviewed in the following diagram after lunch:

template_hbs_ _components_listr-list_item_new_ __users_jeffh_wdi_training_ember-resources

The final unit was spent actually modifying the item adapter to deal with nested API routes, and finally performing the create.

jrhorn424 commented 8 years ago

On the plus side, IMO these lessons made https://github.com/ga-wdi-boston/ember-auth/issues/1 go smoothly. The CFUs for that went well.

jrhorn424 commented 8 years ago

Actual 8 units. 3 in the morning before a workshop, 3 in the morning the following day, and 2 in the afternoon same day.

In the first part of the lesson, we reviewed components and re-implemented functionality from the components lecture, but this time using the Ember Store (from ember-data). This cleared up confusion about models, model hooks, and how Ember uses adapters and serializers to handle communicating with an API. Though we didn't add any new features from a CRUD perspective, we did actually get toggling a property to persist injecting the Store directly into a component. CFUs from components and the Store went very well.

In the second part, we focused on refactoring by moving the "toggleDone" action on list items up into the list route. This provided several examples of binding and we discussed DDAU again, but this time in greater detail. After moving "toggleDone", we started in the Route for the create action, worked our way down through binding into the component. Then, we noted how we needed to actually pass a reference to the edited item back up to the route, which we accomplished with the second argument to the sendAction method available in components. We also implemented deleting items in the same fashion.

In the last part, we added create, delete, and finally update actions for lists themselves. This was the first time I actually demoed and taught update in this lesson since its rewrite. I think with appropriate scaffolding code this unit could be compressed into 6 units. We could have accomplished exactly what was taught last time in 6 units, but I felt since we scheduled 9 units a good use of the time would be to demo update, and continue practicing other CRUD actions on a second model (list, since we started with item). See 012/training branch for a few commits.

gaand commented 8 years ago

9 points: All of items CRUD and editing lists.

My first time. Used ember-components/solution as starter code and refactored from there.

payne-chris-r commented 7 years ago

Woof city. 13-14 Actual. All day Monday. All of tuesday (minus outcomes). Wednesday morning. Why? See below: I stopped and did too many CFUs in an attempt to make it easier to understand but didn’t DO it enough times before the CFUs, so people hadn’t seen the pattern enough and were confused. (I think this accounts for about ~10-15% over). It was also my first time and I made some mistakes (~10%). I also KNEW that we had extra slack built into the week so I didn’t feel as rushed and felt comfortable EXPLAINING more and DOING less—this was a mistake. (~10%). I didn’t think about WHO I was asking to live code with me, and gave some people a chance to live code with me that weren’t getting it which just wasted everyone’s time (~5%). I love Ember, really wanted them to love it too, and was having fun (~5%).

raq929 commented 7 years ago

One full day and a long morning, so 10 actual? Got through it with time to spare, but it needed more framing. Drew an awesome diagram which Cathy copied mostly correctly. (In an issue.)