New to RedwooJS and modern JS paradigm (my experience primarily have been in mobile and cloud but have basic understating of web/browser/DOM tech) - literally just watched few YT videos and went through some docs.
I am considering it for re-writing my current web app for my startup. It is a SaaS platform that provides multiple services.
I want to take this step-by-step. Firstly would want to just update the frontend - that is the web part of the framework - without touching the backend part. I just want to use the React-Storyboard-Jest part of the framework.
However I found the concept of DataCell interesting:
declarative way to render based on various states
generated mock data and storyboard classes
repeatable pattern - managed by CLI
Now the problem is I can’t do the same (offcourse the doing HTTP part is easier - but I want other goodies too!) for REST APIs for my existing cloud server. Has anyone built something similar for REST with generator? Is it planned in RW roadmap? is redwood-cli extendable (went through redwood/packages/cli at main · redwoodjs/redwood · GitHub looks like it is not)?
Although this is not a deal-breaker. I like (alteast from distant, haven’t got my hands dirty yet) the “Redwood-ic” way of doing things - therefore anything I will do will not be as good for it!
Let’s call it RestCell or HttpCell - keeping the namespace different because if RW doesn’t want to implement it I (or anyone who knows better) can do its on:
Similar to DataCell we have a command to generate them - with cell class MyRestCell.js, MyRestCell.test.js, MyRestCell.mock.js, MyRestCell.stories.js
Everything mentioned above will be same as DataCell except in the MyRestCell.js instead of QUERY, beforeQuery and afterQuery (whose name and functionality are GraphQL specific) we will have REST based equivalent alternatives - URL, METHOD, beforeRequest, afterRequest, etc.
Same as DataCell the actual component will be “generated” - if my understanding of how it works under-the-hood is not wrong.
“unified” approach - making DataCell work with RestAPI concepts like URL, METHOD
“abstract” approach - abstracting out the Cell part and making it exentable - refactor DataCell to implment it without breaking compatibility - add new RestCell - additionally can make it customisable by end-user as well.