The "right" way to load additional models (to build filtering checkboxes)

I had a look. The TLDR version of my response here would be “Why isn’t your teaching method using dependency injection, like the framework you love so much?”

The longer version follows:

I don’t particularly think guides are good for learners. They take the active role and control away from the learner. They bind too many of the implementation details to the things being taught. Granted that that is the “traditiional” model we have in place for education, but I think it’s really smelly, just like imperative non-DI programming. If you’re going to go to the trouble of building something like this guide, it’s definitely good to really think about its usefulness lifetime and what you’re trying to accomplish.

The cookbook approach puts the control back into the learner’s hands because it separates dependencies, and they can mix and match and stitch together bits and pieces… if the cookbook uses an “assembly” model whereby tiny recipes are reused and combined, then you can get to your “guide” at the top level by referencing a lot of composible recipes which the learner can then decide to modify because the person reading the recipes has a deep understanding of all the moving parts contained within. It’s impossible to read the cookbook recipes and work with them without understanding what’s going on because it’s general, not specific.

Stupidly Simple Point for illustration: someone asks “how do I join ‘Happy’ to ‘Birthday’ with a space between?” You can either give them the specific code, or teach them the general category: string concatenation and interpolation. “Teach a man to fish…”, as the old parable goes.

This is my two cents.

It is possible that maybe Ember’s structure might be too complicated to teach in this way, which actually would be a bit of a warning signal for Ember IMHO. As my good old friend Rich says “If you can’t easily and simply write the manual for it, maybe the thing itself is too complicated and needs simplifying.”

I’m not teaching dependency injection because it’s not necessary to introduce that concept yet. Notice how I haven’t even setup the current user, I’m barely at the POST request. The tutorial is split into parts as to prevent information overload. In technical writing, you should always introduce the concepts sequentially.

The cookbooks have been there for a long time, and they haven’t really solved this problem have they? You already stated their main problem actually, “It’s impossible to read the cookbook recipes and work with them without understanding what’s going on because it’s general, not specific.”

The stuff about taking the active role away from the learner, composable tutorials like they were software modules, and railing against “tradition” is too far left-field for me so I don’t think we’ll see eye-to-eye on this one.

You’ve completely misunderstood me.

I wasn’t saying to teach dependency injection, I was saying to apply dependency injection to the material you were creating.

Oh well, the proof is in the pudding. If your methods work out, all good :slight_smile: You asked for my opinion, so I gave it.

Yeah but I will touch on dependency injection when I get to setting the current user, there’s no need to touch that concept yet.

I didn’t mean code dependencies. I meant the dependencies of your teaching material.