[Epic] Reusable Queries & JS (Code Packages)
## Problem Today, all actions (API, DB Query, JS functions) created within Appsmith are page-scoped. This means that they are only accessible from within the page and not across pages within the same application. Often, this confuses users. They expect actions to be global to the entire application. This is because in normal coding practices, that is what they expect. In order to resolve this, we need to create a way for users to create actions that are accessible across pages and are scoped within the application instead of the page. ## Why were Actions page-scoped in the first place? During dynamic binding, we want to give users a consistent experience. If they are able to bind `Input.text` in the UI canvas they should also be able to bind `Input.text` in the API pane. If we treat Actions as pure functions, that would mean the action requires variables to be passed into it. This breaks the users mental model of how Appsmith works. Unfortunately, a side-effect of this is that if the user has bound `Input1.text` in the API, they can't re-use this API with other inputs. This leads to: - Lot of repetition of actions. To the user, it feels like they are violating the best practices of DRY. - Increases the cost of maintaining actions as the user now needs to modify the same action in multiple places. ## Goals: 1. Giving the user a consistent discoverable way of binding across the entire product. If I can bind `Input1.text` in one place, I should be able to logically bind
Posted by mohanarpit on Nov 25, 2020, 12:35 PM
Tags
Related issues
- Fake websites pretending to be legitimate websites in order to steal your passwords was considered a HUGE problem.
- 3.5 Flash was always too expensive for a "flash" model.
- I don't think the realistic alternative here was “hire a team for a month and get a better semantic conversion” For a rewrite of this si...
- I was hosting on a PC at home like 10 years ago.
- I live in walking distance of all these things, and the farthest I’ve gotten my kid to do things alone is to walk to and from school (a w...
- It was a long time ago, so I don't remember.
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
pricing (E-commerce)
Fake websites pretending to be legitimate websites in order to steal your passwords was considered a HUGE problem.
3.5 Flash was always too expensive for a "flash" model.
I don't think the realistic alternative here was “hire a team for a month and get a better semantic conversion” For a rewrite of this si...
I was hosting on a PC at home like 10 years ago.
I live in walking distance of all these things, and the farthest I’ve gotten my kid to do things alone is to walk to and from school (a w...
It was a long time ago, so I don't remember.
I still like to buy my cheap and esoteric Chinese stuff from Amazon.
My local area used to be great to find old used woodworking tools for cheap.
[Epic] Reusable Queries & JS (Code Packages)
## Problem Today, all actions (API, DB Query, JS functions) created within Appsmith are page-scoped. This means that they are only accessible from within the page and not across pages within the same application. Often, this confuses users. They expect actions to be global to the entire application. This is because in normal coding practices, that is what they expect. In order to resolve this, we need to create a way for users to create actions that are accessible across pages and are scoped within the application instead of the page. ## Why were Actions page-scoped in the first place? During dynamic binding, we want to give users a consistent experience. If they are able to bind `Input.text` in the UI canvas they should also be able to bind `Input.text` in the API pane. If we treat Actions as pure functions, that would mean the action requires variables to be passed into it. This breaks the users mental model of how Appsmith works. Unfortunately, a side-effect of this is that if the user has bound `Input1.text` in the API, they can't re-use this API with other inputs. This leads to: - Lot of repetition of actions. To the user, it feels like they are violating the best practices of DRY. - Increases the cost of maintaining actions as the user now needs to modify the same action in multiple places. ## Goals: 1. Giving the user a consistent discoverable way of binding across the entire product. If I can bind `Input1.text` in one place, I should be able to logically bind
Comments (0)
No comments yet. Start the discussion.