Caveat: some people will find this specific topic strange and some other difficult understand. If you are in these groups, please ignore it
This topic is based on several (slightly off-topic) discussions in post-v1-roadmap-feedback-wanted thread:
Started by @adriatic here introducing the concept of
reversible generators - without defining what a reversible generator is). This will be clarified later in this text. First two responders were @zpeters and @bitshift, followed by @ajoslin103 here.
@adriatic posted a more detailed explanation, followed by a very cool comment by @dthyresson - concept that is close to ideal solution as I can imagine (will talk about this more later).
Last comments came from @ajoslin103 here and here.
Project Monterey (high level definition)
A very simple (and abstract) approach would be that some (external) entity, (named Monterey in memory of my first app of this kind, worked on for Aurelia community) watches all keystrokes, generators invocation, manual editing in between generator invocation and creates a special log, that can be rerun again (by that same watcher - which is implemented as an vscode extension, entity that can have complete control of our development process).
Stopping here to write the whole document at once - it will take a few days to do that. I will not go too deep into details, as I do not want to force feed my ideas; the following write-up should just start the discussion amongst the folks that expressed interest so far.
Let’s measure your interest by counting likes - simpler than running a poll.
@adriatic When I first started with RW, this idea was appealing to me. I was spinning up cells and components, hooking things together, messing things up, and wanting to reverse. Thus, I read your ideas on this topic with interest. Since that time, however, I suppose my familiarity with RW and my general mental models have improved. I now have trouble finding the real desire for this. I still appreciate the concept for the overall technical challenge, or puzzle, that it poses. I suppose, if it was silently running in the background and would let me reverse individual named cells or other rw components at will, that I would install it and have it there for those times when I want to back something up and try over.
As an aside, I like the idea of the logging engine with time as a variable captured. Toss the log into each git commit, then that commit could be ‘replayed’ in the future… seems like an editor extension would be needed to use the log this way. However, it would be neat for someone like me, as a relatively novice programmer, to be able to watch an advanced programmer build out a system or a component in ‘real-time’ without the other person having to create a youtube video for me to watch. If the extension could mirror all actions within vscode, such as file open/close, window splits, etc. that would be amazing. With timestamps, a sort of timeline could be created that would let users visualize the session, skip gaps, change replay speed, jump around, etc. Finally, if it could allow concurrent edits while the replay is going, then it could be a sort of post-hoc pair programming session. That would be cool for remote workers, student/teacher, tutorials, etc.
Am I glad that you intercepted me in the promised to wait some time before continuing this post:
will not go too deep into details, as I do not want to force feed my ideas
Thanks for your thoughts, @PantheRedEye - your vision based on a very little data is nearly identical to mine, with a great improvement:
If it could allow concurrent edits while the replay is going, then it could be a sort of post-hoc pair programming session.
One of my “open questions” seems to be resolved by this
concurrent edits idea, which I find brilliant: this tool needs to be implemented as a vscode extension.
More tomorrow …
The just posted article About RedwoodJS apps and databases is one example that lead me to this reversible app idea. In addition the opinion by @PantheRedEye:
When I first started with RW, this idea was appealing to me. I was spinning up cells and components, hooking things together, messing things up, and wanting to reverse. Thus, I read your ideas on this topic with interest. Since that time, however, I suppose my familiarity with RW and my general mental models have improved. I now have trouble finding the real desire for this
describes my current view about the need for the reversible apps - until you read feedback:
Finally, if it could allow concurrent edits while the replay is going, then it could be a sort of post-hoc pair programming session. That would be cool for remote workers, student/teacher, tutorials, etc.
Things are becoming interesting again.
@PantheRedEye sorry for not following up on my promise. Your ability to extrapolate from my original post made me wait a bit more hoping that someone with a similar ability may follow up your response.
Nobody but @PantheRedEye, so let me describe one more situation I encountered in running the Redwood Tutorial - the section Creating a Post Editor:
yarn rw g scaffold post resulted with
- Created several pages in
EditPostPage for editing a post
NewPostPage for creating a new post
PostPage for showing the detail of a post
PostsPage for listing all the posts
- Created a layouts file in
web/src/layouts/PostsLayout/PostsLayout.tsx that serves as a container for pages with common elements like page heading and “New Posts” button
- Created routes wrapped in the
Set component with the layout as
PostsLayout for those pages in
- Created three cells in
EditPostCell gets the post to edit in the database
PostCell gets the post to display
PostsCell gets all the posts
- Created four components, also in
NewPost displays the form for creating a new post
Post displays a single post
PostForm the actual form used by both the New and Edit components
Posts displays the table of all posts
- Added an SDL file to define several GraphQL queries and mutations in
- Added a services file in
api/src/services/posts/posts.ts that makes the Prisma client calls to get data in and out of the database.
Does this reminds anyone with the command that created the whole giant space:
Let there be light!
Now, being often described as “this dude is really difficult to understand” let me make sure that by writing this I am not mocking a terrific forward looking generators. Instead, I am presenting this as yet another reason for thinking about
Reversible App Creation.