This might be a dumb question, but what’s the best way to actually use this to make a real application? I’m talking speak to a database and hook up a backend. I’ve enjoyed using vue from a “this is a neat way to make components” but I’ve never successfully been able to do anything with it. I understand it’s just the “view” and not a full MVC like rails but I want that to exist. I want it super opinionated and favor convention over configuration.
I haven’t found anything nice for a guide in building a real world application like this. Maybe it would involve multiple things vue + ? + Postgres or Mongo or some other option. But I want love something that would hold my hand start to finish connecting the dots.
Academind has a great video series on creating a Vue app that uses Firebase as the backend, and anyone can follow along and reproduce the results. He also uses Vuetify for the sake of having some prebuilt UI components.
https://www.youtube.com/watch?v=dIkPb8krORU
Yes you need a lot more tools. A backend framework with a REST API plugged to a data base is common way of doing it. Personally I use Django + Django Rest Framework a lot on the server and axios to query it on the client. But you mileage may vary.
I would love to see a start to finish crud example of the "least" amount of magic and copy paste code for a guide on setting this up. I've messed around with Django and it seemed harder to grasp than rails due to using regex out of the gate to apply a simple route as opposed to get/do or resources.
The whole component russian dolls with data/callback passing is something most beginers have a very hard time to grasp. Add webpack to the mix, make them fight with JSX that doesn't want to do what they need and voila, you get a sad student.
Starting with vue is just: add a script tag, put your template here, now your data here. Done.
Uh, you pass data & callbacks through props in vue also, unless you use a single component. Why not just compare it to using a single component in react then also and be honest?
I disagree. I was going to use react for a personal project and got stuck because of documentation and the various blog posts and tutorials all being different and using different libraries and patterns etc etc. This made getting a basic hello world impossible for me. (I’ve since used react and it’s now trivial but starting out was not easy, barrier to entry is still higher than vue.)
Vue on the other hand was so simple. And the documentation made getting hello world done in a few minutes. This got me off the ground and made me feel productive as I felt I knew right away what vue was doing at a most basic level. Then it was just constant learning on top.
Then it's an unfair comparison. Vue does state management out of the box. React really doesn't. Yeah, it has setState, but that's nothing compared to Vue.
Trainer here. I train in React and in Vue.
My students do 3 times the work with raw vue than in raw react. Every one of them. All the time.
It's not even on the same map.