dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: Is vuejs recommended for the frontend for a big website

  1. #1
    Join Date
    Sep 2006
    Posts
    710

    Question Is vuejs recommended for the frontend for a big website

    Hello

    I am developing a website similar to http://www.magicbricks.com.

    The backend APIs are developed in laravel. For the frontend I am confused whether to use VueJS (all html files to be converted into .vue and use the power of VueJS) or use Laravel's Blade templates and use VueJS for the reactivity part.

    What is the recommended approach?


    PS: I am fairly new to VueJS and this would be my first application in VueJS.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    22,229
    First question I'd ask myself: "Do I really need JavaScript?" (or at least, do I really need lots and lots of JavaScript?). Are you thinking of something like VueJS because you want all sorts of eye candy that at best no users care about and at worst annoys them, or is there some business reason for using it? Or do you have a good reason to make a "single page" app chock-full of JavaScript to handle it -- in which case it probably becomes its own project, which then utilizes your Laravel application purely as an API (all your Laravel views would then just be JSON output)?
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Sep 2006
    Posts
    710
    do you have a good reason to make a "single page"
    > so VueJS is only good for SPAs?

    all your Laravel views would then just be JSON output
    > correct

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    22,229
    Take everything I say with a grain of salt, as I find the current status of the client-side world and the dozens of "new, best, fastest" JavaScript frameworks so confusing, that I just focus on server-side stuff. My very limited understanding of VueJS is that it's sort of a use-as-much-as-you need thing; so it doesn't have to be a single-page app to warrant using it -- but if you do want to pursue the single-page app architecture, then I probably would want to use it, or AngularJS, etc., and treat it as a separate application that consumes data from your Laravel application.

    Or not.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  5. #5
    Join Date
    Feb 2017
    Posts
    1
    Ideal is a good balance. Have Vue.js only where you think it makes sense. Creating an entire SPA with any framework is a lot of work and hence it depends on the requirement and how much is the timeline. I still feel Laravel with a mix and match of vue.js is a good idea. Also, always keep your options open. There can be situations where you can even have a situation that jQuery will be required, hence I think the Laravel workflow is great.

    A lot of things like CSRF token are already bootstrapped into L5.4 and with Dusk you can write browser test cases so all in all a good choice. You can also look at github/amitavroy and the inferno project for some reference. I have Profile image upload as a vue.js component because there was a reason. But profile edit form is simple php forms. That's what I call the mix and match.

  6. #6
    Join Date
    Nov 2016
    Posts
    20
    Just to add to the mix (without going into whether it's a good idea): We've used vue on larger projects and it's been a pleasure to work with. Pretty much saved one particular feature that required a lot of javascript and was turning into a nightmare to manage. What I liked most is that it was easy to drop in on top of existing code, without requiring extensive setup or wanting to take over the entire architecture.

    So, to answer your question, Is vue.js recommended for large projects, then my answer is 'Yes'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center