DEV Community

Cover image for Modeling Data In Quasar Like A BOOOSS With VuexOrm
Luke for Quasar

Posted on

6 1

Modeling Data In Quasar Like A BOOOSS With VuexOrm

It's hard to express the impact VuexOrm has had on my career as a developer.

It's fundamentally changed the way I deal with data on the frontend! At Agripath (where I work), we almost NEVER deal with the store directly.

Most interactions with the store are done with VuexOrm, which gives us a gorgeous API. Stuff like this:

import User from 'models/User'
import Post from 'models/Post'

User.all()

const posts = await indexPosts()
Post.insert({ data: posts })

Post.query()
  .orderBy('rating')
  .with('comments.user')
  .get()
Enter fullscreen mode Exit fullscreen mode

If that code doesn't excite you, either read it again or check your pulse!

Take a look at VuexORM video series to find out more, and learn VuexOrm!

VuexORM App Extension (AE)

Truth be told, it doesn't take too much work to setup VuexOrm with Quasar. However, there are a few things we can do to streamline the setup. Here's some of the features:

  1. Auto import and register models to the "VuexOrm database"!
  2. Easily create new models using Quasar's cli
  3. models alias already registered for you

Once everything is setup, all you have to do to add a new model is run the following command:

quasar run vuex-orm new:model Todo
Enter fullscreen mode Exit fullscreen mode

Now you're ready to insert, find, delete, update etc Todo's to your hearts content!

Give It A Try

Ready to take VuexORM for a spin? Take a look at the VuexOrm App Extension GitHub page and let me know how it goes!

And remember,

You can build anything...

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (1)

Collapse
 
martinr profile image
Martin •

Hi Luke, I started to check options to manage the Data, and I found OrbitJS (orbitjs.com) maybe you want to check it out...
Cheers!

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay