2 ms·
I see your point on Next.js being considered a full-stack solution, given it can execute server code. When referring to full-stack frameworks, I had in mind sol
by matijash 4y ago
I see your point on Next.js being considered a full-stack solution, given it can execute server code. When referring to full-stack frameworks, I had in mind solutions that also immediately pick and setup a db layer for you. But I agree that is not given and will look into clarifying that in our docs.
Besides db coming out-of-the-box, the biggest difference of Wasp over Next.js is that data models (aka entities in Wasp) are more deeply integrated throughout the whole stack. That means you don't have to implement your typical CRUD API to deal with data. E.g. Once you define your entities (User, Post, ...) and queries/actions that operate on them (getUser, updatePost, ...), you can immediately invoke them from the client (Wasp generates RPC under the hood) without any extra work.
Since Wasp has understanding of your data models (we actually parse the psl, prisma schema language, used for data model definition) it can also provide more help such as automatic cache invalidation [1] (e.g. if you run an action that updates Task entity, Wasp will immediately know it needs to refresh all queries that depend on Task entity, unless you specified differently) and a native support for optimistic UI updates [2].
[1] https://wasp-lang.dev/docs/tutorials/todo-app/03-listing-tasks#wasp-declaration https://wasp-lang.dev/docs/tutorials/todo-app/03-listing-tas...
[2] https://wasp-lang.dev/blog/2022/11/30/optimistic-update-feature-announcement https://wasp-lang.dev/blog/2022/11/30/optimistic-update-feat...