jQuery vs Vue.js: Laravel Master-Detail Form

preview_player
Показать описание
Let's try to create a parent-child form with identical behavior but in two different ways: one page with jQuery, and another with Vue. Which one do you like better?

- - - - -
Рекомендации по теме
Комментарии
Автор

I now try to use Vue for all my projects. Not just because JQuery is not good enough, but to gain as much experience as I can, so that when I am building a larger project I already have encountered and solved lots of problems. Better to be good at one skill than half on two. I chose Vue to be good at. However when you still use libraries like datatables, select2, bootstrap you still need some JQuery knowledge. That's why I am considering to move to the (Vue.js based) Quasar for the whole frontend and leave JQuery behind.

robdorn
Автор

I prefer jQuery in situations where I just have to make simple AJAX request and update little content in the DOM.

nurudeenqoyyumtimilehin
Автор

I would use Vue.js. It feels less cluttered and more readable. I like some breathing room for my code.

SowrenSen
Автор

jQuery is just really simple. I'm not sure why people have started thinking of it as antiquated. I have been using it since it came out and it hasn't failed me yet. That being said Vue.js has its own place. I've created a couple of simple apps with it and it's great also. For simple DOM manipulation you can't go wrong with jQuery.

hobbymanlp
Автор

I agree for small, simple projects Vue.js can seem to be an overkill and jQuery is perfectly acceptable alternative to use. Where Vue.js (in my opinion) really shines is when building an application with a lot of similar interface items, hence component. Organizing your code correctly with Vue you can really see the benefits when large apps can use reusable components.

tannercampbell
Автор

That actually boost confidence that its ok to know and use jQuery and not use VUE for such smaller projects. Respect from Pakistan 🇵🇰

nabeelyousafpasha
Автор

I will use Vue.js because it provides binding data and we can easily manipulate the Array of objects. jQuery is also easy but have to store in variable, write HTML and loop through it.

kumargaurav
Автор

I don’t think there is a right answer to this, depending on the situation. From what I can see, this is in some kind of dashboard, well does that project already use one of the two in different areas, in the pipeline will there be foreseeable additions which could extend this. If this was a blank project and I needed a couple of transforms, sure jquery, why not, but saying that, if it’s that simple, personally it would just be vanilla js, but if there are plans to grow this or it’s already a fairly big project that’s somehow managed to go this long without JS, then adding vue would be good. Tricky question without a lot of context

ashleyredman
Автор

After using Vue.js on a project over the last year, with a Laravel backend API, with over 30 components - looking at the jquery code made me shudder. BUT if you don't have all the vue stuff setup already, it's overkill to switch over to it for this one example. However, given my knowledge of how nice the reactivity in vue js is - for future projects, I would definitely bite the bullet in the vue js setup time to make my future life easier.

paullawton
Автор

Hi Povilas, I see you are pretty much experienced in Laravel. This is a general question: Does Vue JS supports async communication through Laravel PHP? or Laravel supports async communication when working with a front end like Vue JS or React JS? Thanks.

jcolindres
Автор

Alpine js is also a good option for small to medium tasks and vue like syntax

laragram
Автор

As you said, maybe JQuery is good for backend-first apps. But in my opinion, Vanilla ES6 is enough for those kind of things. Otherwise I would go with Vue or another frontend framework.

My opinion in summary: no need for JQuery, you can go with ES6, or for more complex stuff or SPAs go with Vue.

someone-lxmg
Автор

Can you make a video showing how to delete an item from a json array in MySQL. I’m building a real estate project where I want to add a gallery for the listing. The images will be stored in an array In the database. Do you think there’s a better approach? Much appreciated.

gjvidz
Автор

Thank you sir very useful information, what about livewire comparison with livewire vs vuejs. Thank you.

farhanfaraan
Автор

I know this is outside the scope of this video but for as simple as that use cases, I would argue that vanilla JS is a better option.

mgjulesdev
Автор

I would use Vue. It has better coding structure, i would use axios to send post data. Add and remove element is also easier using vue, all i need is only play with the data.

KasminNicko
Автор

Well. If we consider SEO than how can we assign all meta attribute of a website made by vue. Because as long as I know vue render the component inside vue intance el property(eg. app). But the meta attribute placed in head tag that is outside of vue intance el property. Xan u share u idea please.

dekuddus
Автор

I would use vue.js. I like to structure my code and code should be neet and clean.

ajithlal
Автор

Thanks for the video. How about Vue.js with CDN link ? so no compilation (npm install or build) is required. It could be used same way as jQuery but better support for structure and reactiveness. VueJS with CDN is pure Javascript and interchangable with libraries like jQuery.

sshanit
Автор

Rather use Es6 with Axios rather than Jquery. Vue itself is a transferable skill

tanzimibthesam