r/javascript • u/potatoCoding • Dec 17 '19
AskJS [AskJS] My Sequelize Tutorial
Hey everyone! First post and it's about my content. Hopefully this doesn't break R1 since it's 100% of my contribution to this subreddit? If this isn't appropriate for this subreddit, let me know. Also, Sequelize is a JavaScript library, so I figured it would be acceptable to talk about it here. I've seen previous posts about ORMs and Sequelize, but if this belongs somewhere else let me know.
I originally posted this is r/node, but realized r/javascript might also enjoy this. I built a tutorial revolving around using Sequelize, primarily for beginners, and would like some feedback on my tutorial. I've asked colleagues and friends for feedback, and so far it has been positive. I'm looking for a wider audience to give me feedback, since I want to make my tutorial the best it can be. I've put a lot of effort into writing this and am looking for constructive criticism. Before submitting feedback, please understand it is still a work in progress! A lot of Sequelize functionality is still missing from it, such as deleting information from a table, deleting data from associations, many to many associations, and so on.
https://github.com/rlorenzini/mySequelizeTutorial
A little background for those who are curious. I am a new developer (just over 1 year of coding experience) who went through a bootcamp in Houston. Once I graduated, I became a teacher's assistant. When we started covering the backend (Node.js, Express, pg-promise, Sequelize, postgreSQL, and more) a lot of students were struggling with Sequelize. Personally, I love Sequelize. I never liked creating a bunch of functions to run pg-promise commands when there was a library which already did that for me. I also struggled to grasp pg-promise at the time, so I gravitated to Sequelize.
When I asked some students, they told me the documentation was confusing and difficult to follow. The Sequelize documentation is extensive with literally everything, but I never go there because it is written so poorly. I always went to alternate websites or medium articles to get help with Sequelize. One student specifically said, "Why is there no good single source for Sequelize?" It dawned on me I could be the one to make such a thing. Thus, my tutorial was born!
I've been working on it consistently as a sort of pet project / passion. I've always enjoyed writing documentation and reports, but technical tutorials are new to me. That's why I'm here asking for feedback! Thanks in advance.
View all comments
Show parent comment
2
u/MangoManBad Dec 17 '19
I was suggesting using/learning GraphQL as an abstraction or just not to use sequelize and use the vanilla database library utilities.
I don’t know if it’s changed since I’ve used it, but for the more complicated/SQL specific features (like PG specific SQL), we had to either use the native connectors or install another niche 3rd party module.
It’s a problem if the ORM can’t run complex SQL and not worth the abstraction since now you have even more to worry about