Should You Switch from Laravel-only to Vue+SPA?

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 108

  • @LaravelDaily
    @LaravelDaily  4 роки тому +9

    Undecided and want to try out the SPA-way? I have a full 2-hour course with a practical project "Vue.js + Laravel: CRUD with SPA": laraveldaily.teachable.com/p/vue-laravel-crud-spa

    • @RexArvind
      @RexArvind 3 роки тому

      awesome advice, thanks

    • @franklinpaulino58
      @franklinpaulino58 3 роки тому +1

      Greetings teacher could do a tutorial on laravel echo socket

  • @ifahddev1034
    @ifahddev1034 4 роки тому +13

    welcome everybody
    I am back after last my comment before tow months ago, i worked two projects using the nuxt.js framework for frontend and laravel for backend and summarize my experience with the following points:
    pros:
    - one API for web app, mobile app.
    - easy to use for example to create a route. Just create a .vue file inside the pages folder.
    - switch between universal or spa.
    - fast when switch bettwen page.
    cons:
    - Inappropriate for small projects.
    - duplicate 70% from work like (middleware, routes ...etc) on both.
    - when supports multi language (ssr not working perfect).
    - you can't editable after dist.
    - spend more time with diffrents (languages, framework).
    back to blade with (vue when i need it)
    sorry my english not 100% 😅

  • @matrixlander85
    @matrixlander85 4 роки тому +22

    You have made a lot of solid points. If you are build JUST A WEBSITE then use purely Laravel with Blade templates.
    Once your website turns into some sort of application where data needs to be rendered dynamically in any section of the application, then use the JS Frontend + Laravel API Backend approach is 10x better.
    The API Controller code will be cleaner and your frontend will be less complicated to maintain. That has been my experience over the past 10 years of build PHP based websites and applications.

    • @andrewkorneychuk586
      @andrewkorneychuk586 4 роки тому +1

      Totally agree. I come from web development background and develope online applications now. Laravel is totally fine for website with minimal jquery but when it comes to actual application development u MUST have some sort of js framework like vue. It allows u do certain things faster more structure and with 10 times less code.

    • @AhsanKhan89
      @AhsanKhan89 3 роки тому

      Dear, i am starting a job portal project like indeed and in future my company is planning a mobile application also. So should i use frontend js framework ? I will have to learn vue or react if it is recommended.

    • @ttufox
      @ttufox 3 роки тому

      @Jim Newt I think you can but not using SQL

    • @andywong2244
      @andywong2244 Рік тому

      @@AhsanKhan89 how did this project go buddy? did you eventually use vue or react for it?

    • @JamesAutoDude
      @JamesAutoDude 11 місяців тому

      Idk with Livewire nowadays, I would say this isn't really true anymore. It could be purely Laravel

  • @ifahddev1034
    @ifahddev1034 4 роки тому +6

    i spent the past two months learning vuejs, and I quickly adjusted to it and thought it was taking my time.
    Also, i recommend using Nuxtjs to save a lot of time and solve several problems, the most important of which is the seo problem for spa applications.

    • @bf-xi3om
      @bf-xi3om 4 роки тому +1

      Google index spa pages ( or JavaScript rendering pages) since 2014 .

  • @jcltracker6756
    @jcltracker6756 4 роки тому +8

    Great video!
    I thought you would also mention Inertia JS, it allows you to write Vue while leveraging Laravel’s auth, routing, etc

  • @stormcorexz
    @stormcorexz 4 роки тому +2

    this vid is like a breath out , i was very pressed to get into vue js and frankly , I have saw so many videos try things but never made even one project by myself,
    that 's because
    ---
    - the different mind set between laravel or PHP and java-script , making that mixed up files (maybe the vue js is a bit organized but react , express, or node is total mixed up for me).
    - the ecosystem is different and versatile, you can use vue-cli and there is a web view for vuew-cli ,and i can use vue in single page or write components , that make so many option to evaluate which lead to hard decision to kick off.
    - the difficulties is face as a backender to handle simple things , like pagination, validation , authentication and authorization, and in this point most of youtube videos do not get into that and leave it as a small surprise for you.
    - the idea of SPA itself and handling links (vue router) and handling props and the need of thing like vuex to take care of component data sharing and shared storage handling.
    ------
    also i agree about the other points of longer development time and higher cost.
    all that stuff is to much too digest and can not be covered in one simple video series, which make it very to follow and when you are working already your time is always limited.

  • @FISS007
    @FISS007 2 роки тому +3

    My countless years of building software have taught me this: Divide to conquer.
    The more you divide your software project into smaller pieces the better is. But you should never divide for the sake of dividing. Reactive web apps which are ux intensive must be done in vue angular or whatever. SEO dependent websites must be done in a server side framework. And keep in mind that you can have both, the seo dependant part in full laravel or whatever and when the user enters the app part he gets redirected to the SPA and everyone is happy.

    • @ufdiu3n8s2
      @ufdiu3n8s2 2 роки тому +1

      So whats in your opinion is best way to make ecommerce when maybe in future i would like to have mobile app?

    • @FISS007
      @FISS007 2 роки тому

      @@ufdiu3n8s2 It's an excellent question. Personally, i would have a pure api to serve the web app, mobile app or what have you, for the seo part, i would build an invisible server side website which will act as a SEO trapper.
      Another approach is to have the website fully rendered on the server consuming the api that other types of front ends might consume as well.
      We need to keep in mind that there is no silver bullet solution, we need to figure out what works best and is potentially cost effective.

    • @JamesAutoDude
      @JamesAutoDude 11 місяців тому

      So it's possible to have both a regular Laravel app, views, routes + API/SPA through the same project??

  • @MrDragos360
    @MrDragos360 3 роки тому +7

    From what I read about Vue, SPA, SEO I could say that: Vue SPA should stay mostly as "internal" app, like something that will never be seen by those who are not registered. For example I am making a project for college that have 3 parts: 2 parts are public and I make them in Blade + jQuery(landing page and online store) and an administration side that I make in VueJS as a SPA. Laravel acts as a backend for all of them.

  • @mohamedshuaau632
    @mohamedshuaau632 3 роки тому +4

    I started from react native to angular to react to vue to backbone and finally back to react. I had a rough childhood

  • @muzainmubarak8876
    @muzainmubarak8876 3 роки тому +1

    Thanks for the insight. I am good with Laravel but recently started learning Vue as I want to create SPA (or maybe because as you pointed "Trend"). But also had the confusion whether should I explore Livewire directly rather than leaning Vue. Your video did explain what I want to know.

  • @dathirdsugian2689
    @dathirdsugian2689 3 роки тому +7

    As a beginner, I've never been in love with web development until I learned Laravel + React 💯🔥

    • @muhammadzainnadeem3965
      @muhammadzainnadeem3965 3 роки тому +2

      Any tutorials for react and laravel ?

    • @RustyNox
      @RustyNox 3 роки тому +1

      @@muhammadzainnadeem3965 They might mean, Laravel backend (API) & React frontend?

  • @gkiokan
    @gkiokan 4 роки тому +1

    Now you can jump into Livewire which actually leaves you in blade but with all the benefits from Vue + SEO optimized. So a truly win win situation for all.

  • @drakandriel
    @drakandriel 4 роки тому +1

    yes, I tried this on my personal blogsite. It was running Wordpress. I converted it with Vue SPA + Laravel. Laravel with Corcel (Wordpress package) and for the FrontEnd I use SPA Vue. And so far it has been a great practice in my end. For the SEO part I did a trick to handle the Meta Tags, I find the V8JS engine quite tricky to implement (Laravel SSR) and my hosting provider would not want me to install it with my current package plan.

  • @bumblebity2902
    @bumblebity2902 3 роки тому +1

    One strong drawback Vue+Spa is Authentication/Authorization. You must inplement state management, found Vue package responsible for authorization logic maintenance.

  • @kamiru2012
    @kamiru2012 4 роки тому +4

    You can leave stuff that easy to deal with php to Laravel and put Vue components where you want. Bootstrap and Jquery is extremly heavy for SEO. Just dont do SPA on critical information pages. By compiling Laravel and Vue you can do very good OOP based apps and websites.
    And yes, its a lot of stuff to know before starting development. Things go easiear if you devide your code to modules. Would have to see videos from you how to deal with that if you have such experiense.

  • @joshmanhuwa2475
    @joshmanhuwa2475 3 роки тому +1

    Bro i am happy you brought this up. i am in the valley of decision making, on which path to take Laravel + Vue Js or Laravel + React, my concern has been mostly tied around SEO, but i am working on towards developing web apps that require SEO. so yeah i think this is quite important. i will be follwing

  • @MohanMishraAstroboy
    @MohanMishraAstroboy 4 роки тому +2

    Very useful point you mentioned here....

  • @Unclaimed3172
    @Unclaimed3172 4 роки тому +4

    I read someone said, Javascript pages are harder to be indexed by Google. So use blade file for SEO and Vue.js for application.

    • @peymanGhaderkurehpaz
      @peymanGhaderkurehpaz 4 роки тому +2

      Nuxt.js supports server side rendering ( ssr )

    • @taghwomillionaireo.5543
      @taghwomillionaireo.5543 4 роки тому

      peyman Ghader kourehpaz you can’t compare this to normal html SEO

    • @bf-xi3om
      @bf-xi3om 4 роки тому

      Google index spa pages ( or JavaScript rendering pages) since 2014 .

  • @hazimdds
    @hazimdds 4 роки тому +9

    i want to use ajax for CRUD then i saw Vue on youtube it look so easy and fast to make things so i learn it for one week, but when i try to create something i found that Vue is just getting complicated you need to learn Vuex Vue-Router then i reach to something called Nuxt.js so i said stop big NO for me, it is indeed awesome for big Application and frontend developer.
    so i see livewire that was great i just start using it, livewire is just what i want, combining with Alpine.js livewire is a very productive technology.

    • @tomas95go
      @tomas95go 4 роки тому +1

      Well, you can just use it as the "Old JS" type of thing, where you call the VueJS CDN and use simple Vue on every page that needs it (Instead of say, jQuery or Vanilla JS).

  • @winter-survivor
    @winter-survivor 3 роки тому +3

    This topic continues pretty up to date in 2021.
    Hey you, reading this comment... think very carefully before buying the ticket for the SPA train.
    Just add sprinkles of VueJS sause in your blade templates and stay sane.

  • @dopplereffect7325
    @dopplereffect7325 4 роки тому +3

    I did an Instagram like application a few years back I got to the point where I had to implement the thumbs up and down feature, I did that with laravel but you would refresh before a reaction I displayed. the user experience was bad and was able to solve that with VueJs, I find vuejs useful, in situations where you want to return or update some information from the backend without refreshing your page. my point; learn VueJs if you know it will be useful to you.

    • @pietrosavastano9940
      @pietrosavastano9940 3 роки тому

      could also use jquery and ajax for not refreshing page

    • @CerebralRiches
      @CerebralRiches 3 роки тому

      @@pietrosavastano9940 only learn jquery and ajax if you develop in wordpress or else its hella useless and outdated.

  • @BionixMC
    @BionixMC 4 роки тому +6

    I think you work for Google or Facebook or FBI because in the past month you posted videos only about the exact things that I was thinking or talking with my dev friends about. I know those companies are listening to us but I didn't know you do it too 😂 😂 😂. Anyways, take it as a joke and keep up the good work because you have one of the best Laravel/Vue/Web Development channels out here !

  • @HoracioDegiorgi
    @HoracioDegiorgi 4 роки тому +1

    Thanks for your opinions. Is a confusing time right now.

  • @midteknologi
    @midteknologi 4 роки тому

    I am totally agree with your opinion..

  • @Daaboo
    @Daaboo 7 місяців тому

    Yeah I totally agree. I was trying to transform my e-com page to vue and vuetify because.... employeers always are so hooked up on everything needs to be API nowdays.
    But I soon realised its so dumb sitting and creating routes and logic in vue just to do what laravel and blade files do so much easier and faster....
    So I decided to just use vue where I use jquery and ajax instead.
    If I want to do a SPA I need to redo the whole project from scratch. Which would take enormous amount of time....
    Like you said maybe if there will be a mobile app in the future but then I would just use laravel and flutter and skip vue....

  • @MimisK88
    @MimisK88 4 роки тому +2

    I hate Javascript. But I have to acknowledge the convenience of a front-end framework.
    I still haven't dared to take the step towards a framework, but I see that it needs to be done at some point.

  • @47Lancelot
    @47Lancelot 4 роки тому +2

    I’m building complex application for government needs using laravel and vue as spa. I need this juicy JavaScript to make that thing both beautiful visually and functionally. Time isn’t a problem as well as my lack of skills in certain areas in this particular case...

    • @47Lancelot
      @47Lancelot 4 роки тому

      David Basil I don’t have experience with blade so I don’t care

    • @ChrisS-nj3ye
      @ChrisS-nj3ye 4 роки тому

      I'm currently doing the same but for a private company. This would be a nightmare to build without a JS front end.

  • @ward7576
    @ward7576 4 роки тому +2

    Lol, David.
    1. There's easy to use options for pre-loading Vue render data components. Both as additional components, as well as doing it yourself by loading blade first and subsequent re-renders with Vue.
    2. Vue is much easier than any described front-end frameworks you mentioned
    3. Not much of a productivity loss due to easy learning curve and delightful syntax
    4. Vuex, also not difficult to learn.
    Looks like one of those people who say X suck, but can't properly explain why with at least some reasoning, but I guess we are all super biased towards using something we specialize in.

    • @ifahddev1034
      @ifahddev1034 4 роки тому

      i agree with you
      i spent the past two months learning vuejs, and I quickly adjusted to it and thought it was taking my time.
      Also, i recommend using Nuxtjs to save a lot of time and solve several problems, the most important of which is the seo problem for spa applications.

    • @tanzimibthesam5861
      @tanzimibthesam5861 4 роки тому

      I think he is a complete backend guy and has advanced with the html css n bit of jquery. He does not want to adapt

    • @ward7576
      @ward7576 4 роки тому +1

      @@ifahddev1034 actually, started a hands-on project with NuxtJS yesterday (e-commerce). So far, so good.

  • @j.oliveira
    @j.oliveira 4 роки тому +4

    Good video. But that article against Livewire is very badly written IMO. It fails to grasp many things LiveWire does. It even says LiveWire is not testable. Not all items he speaks about are addressed. Please read the reply from Caleb to that article.

  • @ijazali9736
    @ijazali9736 3 роки тому

    A really good video and explanation. I totally agree with you.

  • @crushfire2004
    @crushfire2004 4 роки тому +1

    The reason that always correct is money, where your job require you to switch to fullstack even use another language or there's diminishing work on php & mpa and high demand of fullstack js (node, express, react/vue).
    So sad that work on laravel start to fade in my country.

  • @tanzimibthesam5861
    @tanzimibthesam5861 4 роки тому +2

    For SEO we can use NUXT JS. Excellent video.Also you didnt mention if your application needs more traffic Vue n Laravel is an awesome combo

    • @pitisradu
      @pitisradu 4 роки тому

      Then why not use Nuxt with express and that's that? no more php

    • @tanzimibthesam5861
      @tanzimibthesam5861 4 роки тому

      @@pitisradu Well every language has its benefits if you are fine with Express go for express. If you are even fine with Django go for it.Node was supposed to replace PHP it didn't.

    • @tanzimibthesam5861
      @tanzimibthesam5861 4 роки тому

      @@davidbasil2727 Well if needed you will have to do. Otherwise everything would have been html CSS PHP or Java .net. you can also do it in WordPress which eventually might not need any coding

    • @pitisradu
      @pitisradu 4 роки тому

      @@davidbasil2727 this is what i'm trying to say. I'm not bashing any framework here, but we should always choose the easiest way to get to our destination(the product). In this discussion I wanted to talk more about new projects, not old ones that already are in php and has 0 sense to change just because of the language

    • @tanzimibthesam5861
      @tanzimibthesam5861 4 роки тому

      0.8% of the projects are in Node JS which needs heavy asynchronous tasks. Development is always a hassle no matter what you choose. If my site is a static 5 page website or a simple e commerce site we can use Wordpress.

  • @suhpc82
    @suhpc82 3 роки тому

    I mostly do internal applications where no SEO is involved. From my experience, it's better to go with Vue + Node or Vue + Laravel for those kinds of applications.

  • @huhornet
    @huhornet 4 роки тому +4

    Hi Povilas ... Do you know IntertiaJS (inertiajs.com/)? With this package, you have a wrapper to build Vue/React/Angular SPAs the old way. Authentification for example ist still handled by Laravel.

    • @Peter-J-Thomson
      @Peter-J-Thomson 4 роки тому

      Inertia treats Vue as if they were Blade Views. Great way to get best of both worlds.

    • @BackfronAcademy
      @BackfronAcademy 4 роки тому

      I found Inertia very convenient, speeds up my workflow... laravel still handle routes, auth, etc. while keeps Vue separated enough to don't violate separation of concerns.

  • @vincej151
    @vincej151 2 роки тому

    BIG THANK YOU for this video. I have a large business app built in Laravel with SSR and mountains of JS/JQuery on the front end. I have more modules to build. I am exhausted with JS/JQuery, and so would really like build those new modules with Vue ie end up with a hybrid system. Your video tells me that this could be a very difficult thing to achieve and quite complex. As much as I hate JS, your video tells me I am better off to continue as is. I am really disappointed, but what should I do. I am not a fan of Livewire for the long term.

  • @KevinMorales-ln6eg
    @KevinMorales-ln6eg 4 роки тому +1

    So a web application for drawing would be a SPA, and an example of using laravel in the traditional way would be an eCommerce store. What about a Job Board site? Would need seo for regional listing, but also I can see it as a SPA since you just want to list job post and maybe filter like UpWork.

    • @PovilasKorop
      @PovilasKorop 4 роки тому

      It's complicated and there's no one right answer. Applications like Upwork with filters are done probably in a "mixed" way with server-side rendering, while still keeping the URLs.

    • @JoseDlucca
      @JoseDlucca 3 роки тому

      For that case I will say that dont use a SPA, but use Vue as a library in specifyt parts of your web where you want a better UX for example posting a job or doing some filtering in Real time (sorry for my english)

  • @hafizmohsinbarkati8657
    @hafizmohsinbarkati8657 3 роки тому

    Agree with your idea

  • @ahmedamin3362
    @ahmedamin3362 2 роки тому

    so what is your opinion about nuxtjs and vue compansation api

  • @bondburton
    @bondburton 2 роки тому

    Yeah, Have to point

  • @RexArvind
    @RexArvind 3 роки тому

    love it

  • @afuwapesunday5423
    @afuwapesunday5423 4 роки тому +1

    Hi thanks for the video can you do a full laravel sanctum and vuejs tutorial that covers authentication and fetching data after authentication including managing user level with middlware in back end and vuejs frontend thanks

  • @npcsolution9493
    @npcsolution9493 3 роки тому

    Agree.

  • @josuebarros-desenvolvedorw2490
    @josuebarros-desenvolvedorw2490 3 роки тому

    Nuxt or Next? Gridsome or Gatsby?

  • @rahul900day
    @rahul900day 4 роки тому

    I have question that we can use blade almost every time but sometimes like changing widget from a dashboard is not possible without Api. Then how we can authenticate on that api ? cuz we have not any api token to authenticate. On the other hand if we have full API based system we will store the token in the time of login.

    • @PovilasKorop
      @PovilasKorop 4 роки тому

      I can't easily answer, it depends on a lot of factors. In short, I would advise to probably use Laravel Sanctum for authentication from the same domain.

  • @marks.4405
    @marks.4405 4 роки тому

    Do you have a video for Laravel for impersonation usage? Thanks

  • @anapesantren001
    @anapesantren001 2 роки тому

    Im full stack and using vue spa with laravel without passport or sanctum.
    Prefer using spa, just because I don't like it when I click on the link the page will disappear for a moment..
    anyways this just change blade to vue

  • @ChrisS-nj3ye
    @ChrisS-nj3ye 4 роки тому +5

    Most people who are against using a JS front end are those that lack the skills to do so.

  • @BackfronAcademy
    @BackfronAcademy 4 роки тому

    What about Inertiajs?

  • @houssemflutter2722
    @houssemflutter2722 4 роки тому

    Best master in the word , websocket with redis and echo pleas pleas pleas realy it's greate subject 💯👍

  • @bf-xi3om
    @bf-xi3om 4 роки тому +1

    Who the hell thinks vue js is not good for seo ? Google index spa pages since 2014. I have several spa eCommerce websites and they are correctly indexed.

    • @AlphyGacheru
      @AlphyGacheru 4 роки тому

      Do you have a link supporting that I can read more?

    • @bf-xi3om
      @bf-xi3om 4 роки тому

      ​@@AlphyGacheru There are plenty articles about this in medium.

  • @403gtfo
    @403gtfo 4 роки тому

    T_T I am just super confused.
    I really wanna just stick with Laravel, I do like it. But everyone is doing JS in some flavor..... I kinda feel like a relic

    • @PovilasKorop
      @PovilasKorop 4 роки тому +7

      That's exactly my message in this video. Don't look at *everyone*. Look at your clients, your projects, and your team if you have it - what do they need.

  •  3 роки тому

    I like all your content, is always on point, very clever, very up to date (the questions devs have in mind), and I think you would make 10 times more money if you hired someone else to do the voices. I follow many youtubbers and courses just because their tone help me to learn, like the Flutter course from London App Brewery, the voice is just perfect

    • @martomystery
      @martomystery 2 роки тому +1

      I disagree.I actually like his tone of voice

    •  2 роки тому +1

      @@martomystery goof for you

  • @ayenewyihune
    @ayenewyihune 3 роки тому

    I'm gonna try Inertia

  • @ayenewyihune
    @ayenewyihune 3 роки тому

    I always hated SPA authentication

  • @aminedaimallah310
    @aminedaimallah310 4 роки тому +2

    i think with alpine-js and livewire we don't have to

  • @aleksd286
    @aleksd286 4 роки тому

    How is this even a question? Vue is FE, Laravel is BE. One does not replace the other

  • @bru6626
    @bru6626 4 роки тому

    Im a beginner and im always scared to jump to any js frame works bcause syntax is really weird and hard for me to understand. i use basic ajax and it give me headache. Any tips guys i think its the time for me to do front ent with js frame works for my projects but still cant decide

    • @PovilasKorop
      @PovilasKorop 4 роки тому +3

      If you don't NEED js frameworks, then don't jump. What would be the reason to jump? Because it's "sexy"? That's exactly what I'm talking about, in this video. Now, if you have projects which would NEED those frameworks, then you should be motivated enough to switch.

    • @nikkolumahang
      @nikkolumahang 4 роки тому

      @@davidbasil2727 Your statement shed some light to me. Thanks

    • @tanzimibthesam5861
      @tanzimibthesam5861 4 роки тому +1

      Don't get scared Development takes time. First learn Es6 core JavaScript vanilla Js then switch on to a framework. For backend you have many choices but for web you need JS on front end. For more simple site just use WordPress or CMS

  • @SapanKumarDas
    @SapanKumarDas 3 роки тому

    a lot mobile developerare also used

  • @JohnSmith-zl8rz
    @JohnSmith-zl8rz 4 роки тому

    Laravel Components

  • @robiparvez
    @robiparvez 4 роки тому

    reactjs is by far better than vuejs