Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Proposal: use ORM for interacting with the database #42

Open
Mygod opened this issue Oct 25, 2020 · 5 comments
Open

Proposal: use ORM for interacting with the database #42

Mygod opened this issue Oct 25, 2020 · 5 comments

Comments

@Mygod
Copy link
Contributor

Mygod commented Oct 25, 2020

Why ORM: less manually written boilerplate code => less likely to make errors. Currently Pokemon populated by DataParser is sometimes incorrect (see also #40). This is partially addressed by #41 but not completely.

I do not have the relevant expertise in this yet but this looks like a promising start: https://medium.com/javascript-in-plain-english/best-orm-libraries-for-javascript-8674c4d49119

Any thoughts on this?

@versx
Copy link
Collaborator

versx commented Oct 29, 2020

I don't have much experience with JS ORM's but I use them in C# and prefer them. Although there's a small performance impact it streamlines a lot of the hassle and reduces boilerplate code imo.

@Mygod
Copy link
Contributor Author

Mygod commented Oct 29, 2020

The performance hit should be minimal. Also we can always optimize later. Personally I just cannot be bothered to look at 600+ lines of boilerplate code in pokemon.js (especially since I cannot attach a debugger) and figure out where the bug is so this would be great. 👍

@versx
Copy link
Collaborator

versx commented Oct 29, 2020

The performance hit should be minimal. Also we can always optimize later. Personally I just cannot be bothered to look at 600+ lines of boilerplate code in pokemon.js (especially since I cannot attach a debugger) and figure out where the bug is so this would be great. 👍

Why can't you attach a debugger? (no devices?)

@Mygod
Copy link
Contributor Author

Mygod commented Oct 29, 2020

Exactly. 😛

(and yes I debug MapJS by staring down the code too)

@versx
Copy link
Collaborator

versx commented Oct 29, 2020

I'll send you a device if you want 👀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants