Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Business rules, resourceApi.js and collectionApi.js to TypeScript #2621

Open
maxpatiiuk opened this issue Dec 13, 2022 · 2 comments
Open
Assignees
Labels
1 - Request Improvements or extensions to existing behavior

Comments

@maxpatiiuk
Copy link
Member

... and make them follow closer the React philosophy

This will add TypeScript coverage to the most crucial files of Specify

As part of the rewrite, should also extend the unit tests and integration tests.

Also, get rid of the event triggers in favor of creating new objects and letting it propagate downward like in react components

@maxpatiiuk maxpatiiuk added 1 - Request Improvements or extensions to existing behavior pri:unknown labels Dec 13, 2022
@maxpatiiuk maxpatiiuk added this to Unsorted in DevOps & Housekeeping via automation Dec 13, 2022
@maxpatiiuk
Copy link
Member Author

maxpatiiuk commented Dec 13, 2022

FYI, fixing this and #2622 would allow to get rid of jQuery, Backbone and Underscore.js dependencies

@maxpatiiuk
Copy link
Member Author

I begun writing down few features to consider adding/chaning when doing the rewrite:

/*
* FEATURE: add agent and accessible collections to store
* FEATURE: don't reRun format() unless changed
* FEATURE: evaluate relevancy of resource collection
* FEATURE: cache formatted resources
* REFACTOR: integrate with useCollection when rewriting the ORM
*/
/*
* REFACTOR: experiment with an object singleton:
* There is only ever one instance of a record with the same table name
* and id. Any changes in one place propagate to all the other places where
* that record is used. Record is only fetched once and updates are kept track
* of. When requesting object fetch, return the previous fetched version, while
* fetching the new one.
* FEATURE: when creating an object singleton, support not just existing resources
*/

I likely won't have time to finish this (or likely to even start this), so I will make sure to expand on this with much more detail on what I see as a good design for the refactored version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Request Improvements or extensions to existing behavior
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants