• Miscellaneous
  • 2 MINUTES READ

Moving from Waterline to Sequelize

  • POSTED ON
  • January 21, 2020
  • POSTED BY
  • Muhammad Asim
  • POSTED ON January 21, 2020
  • POSTED BY asim

By the time we were working on project the backend structure was not in a good shape. As the project was live so we were not supposed to do drastic changes in backend structure. Previously it was using Sails Framework with Waterline ORM. Things were complicated; there were enormous raw queries that were written on

By the time we were working on project the backend structure was not in a good shape. As the project was live so we were not supposed to do drastic changes in backend structure. Previously it was using Sails Framework with Waterline ORM. Things were complicated; there were enormous raw queries that were written on the backend. Model associations was no used effectively. As the time goes and project gets bigger the API response time was getting increased. So, we thought to revamp our backend. After doing some analysis we figured out that, we should get rid from sails as it is a wrapper over express. So, why don’t use express simply? Express is core framework for backend and it provides all the features. According to the Stack Share community, ExpressJS has a broader approval, being mentioned in 843 company stacks and 760 developers stacks; compared to Sails.js, which is listed in 32 company stacks and 12 developer stacks.

We decided to switch to Express core with Sequelize ORM rather than using Sails.js with Waterline ORM. Besides this framework is more popular than the Waterline. It got bigger community good support and awesome features. Here’s the analysis of Waterline vs Sequelize.

title countalt

Waterline

According to google trends the usage of this ORM is too much higher than the Waterline ORM because It’s the most popular ORM that is being used at the moment. It is far ahead than Waterline when it comes to performance, usage, community, developers and support .

has no built-in migration system. Tables are created automatically. There two settings though: one where the tables are created based on the model’s definitions (the tables are re-created when the models change), the second (called “safe”) where nothing is done automatically. This is the mode you want to use in production.

Sequelize

  has a built-in migration system (up, down, create…). There is also a mode where tables are created automatically but it is safer than waterline’s. Tables are created only if they do not exist (you can force sequelize to re-create tables when your models change, therefore making it work like waterline).

ABOUT THE AUTHOR

Muhammad Asim

Regulations can present a big challenge for fintech product managers. Build compliance into your development process from the start, with these tips from a leading financial product manager. Regulations can present a big challenge for fintech product managers.

0 Comments

Leave a Reply

More Related Article
We provide tips and advice on delivering excellent customer service, engaging your customers, and building a customer-centric business.