redwoodjs/learn.redwoodjs.com

The explanation "Undoing a Generator with a Destroyer"

adriatic opened this issue · 3 comments

The paragraph

Most generate commands (i.e., everything but yarn rw generate dataMigration) can be undone by their corresponding destroy command. For example, yarn rw generate cell can be undone with yarn rw d cell.

should be prominently mentioned in both Our First Page tutorial section and Quick Start section. The absence of such an explanation cost me a lot of lost time.

My advice here is based on my firm belief that the success to became a great company depends on the documentation clarity a lot more than a world-class implementation of the product itself

I did not create a PR for this because I am not sure that @cannikin will agree with my proposal above.

We give the exact commands to run during the tutorial and (as far as I know) they're all correct, so if following along you shouldn't ever need the destroy command. If we tried to anticipate everything that could possibly go wrong we'd never get through it!

Did you have an issue during the tutorial or later on in your own project? If you make a typo in the name of the model you're trying to create, you'll get an error and the create will fail (model doesn't exist). I can't think of anything else you can get wrong on the command line to generate the "wrong" cell...

Thanks for your explanation, @cannikin. While I found the need to go back while typing in the code and instructions from Tutorial 1 (always for the same reason - forgetting to do something in the previous tutorial section), more often than not, this could be just my preference.

I initially took the dumbest approach and simply started the Tutorial from scratch, When I got bored with such an approach. I started to use GitHub as a "undo manager", by making each Tutorial section a separate commit, so I could walk backward by commits. I even discussed this approach with David (Price) as he told me that he used GitHub for the same reason.

I briefly discussed a more modern solution, where VSCode "understands" all generators so the RW application development on a higher (Meta) level is done via VS code extension which implements RW application development steps as a workflow, with all benefits of such metaphor. I believe that independently of my dreams, Aldo Bucci is already working on that idea. As far as I know, there is no other competitive implementation of this approach.

All this is just daydreaming (although I worked for several months on such a high-level programming development tool that never became more than an interesting prototype). It is the existence of the VSCode extensions framework that might make this workflow more realistic.