Posts tagged with vue

Comparing Vue with other frameworks

Recently I stumbled upon a page in the VueJs docs where Vue is compared against all other similar frameworks. I'm impressed with the fact that they reached out to authors of the other frameworks to get well balanced comparison.

This is definitely the most difficult page in the guide to write, but we do feel it’s important. Odds are, you’ve had problems you tried to solve and you’ve used another library to solve them. You’re here because you want to know if Vue can solve your specific problems better. That’s what we hope to answer for you.

We also try very hard to avoid bias. As the core team, we obviously like Vue a lot. There are some problems we think it solves better than anything else out there. If we didn’t believe that, we wouldn’t be working on it. We do want to be fair and accurate though. Where other libraries offer significant advantages, such as React’s vast ecosystem of alternative renderers or Knockout’s browser support back to IE6, we try to list these as well.

https://vuejs.org/v2/guide/comparison.html

Read more

Sharing Data in a Laravel/Vue Application

There are multiple good ways to pass data from Laravel to Vue. In a new blogpost Jesse Schutt covers all the options.

It has been helpful to think of my application as "layers" or separate sections of code each with varying responsibilities. I like to think of Laravel as the intermediary between the persistent data in the database, and the Vue components comprising the front-end of the app.

Though the boundaries between Laravel and Vue may appear unclear at the outset, the only way one can know about the other's data is if it is explicitly passed. Blade templates implicitly know a lot about the application, but Vue operates on a different layer, so it only knows what we tell it. Fortunately, there are a number of ways to provide Vue with the data it needs.

https://zaengle.com/blog/layers-of-a-laravel-vue-application

Read more

Join 9,500+ smart developers

Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Dealing With Templates in Vue.js 2.0

Sebastian De Deyne, my colleague at Spatie, wrote a very nice overview of all different methods in Vue to define a template.

This article isn't about Vue's template syntax, but about where and how to define your templates. I wrote this because at the time of writing there aren't really resources that consolidate all the different manners to manage your templates.

I've divided the different ways to define templates in three different categories, each with their own drawbacks:

  • Writing templates that compile at runtime (lesser performance)
  • Using single file .vue components (requires a build step)
  • Manually writing render functions (pure JavaScript, no html-like template syntax)

https://sebastiandedeyne.com/posts/2016/dealing-with-templates-in-vue-20

Read more

Clean up your Vue modules with ES6 Arrow Functions

On the .dev blog Jacob Bennett shared some nice refactorings using arrow functions.

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

https://dotdev.co/clean-up-your-vue-modules-with-es6-arrow-functions-2ef65e348d41

Read more

Our dashboard has been updated to make use of Laravel Echo original

by Freek Van der Herten – 1 minute read

A couple of months ago we released a dashboard powered by Laravel, Pusher and Vue.js. In tandem with Laravel 5.3 a new JavaScript library was released called Laravel Echo. This library makes it very easy to work with a service like Pusher. This weekend I took the time to update the dashboard to make…

Read more

Adding a vue component to Spark

On his blog Christoph Rumpel explains how you can add a vue component to a Spark app.

Taylor Otwell, the creator of Laravel, is a big Vue fan and this is why you will find it in a lot of Laravel products. Spark is using Vue too. ... When I started to use Spark I wanted to use some of my already given .vue components too, but since Spark is a little bit different from standard Laravel projects I didn’t managed to use them. After some weeks of reaching out for help, I finally got the solution.

http://christoph-rumpel.com/2016/05/Larave-Spark-Using-Vue-Component/

Read more

Building a dashboard using Laravel, Vue.js and Pusher original

by Freek Van der Herten – 11 minute read

At Spatie we have a tv screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which music is playing at our office, and so on. Here's what it looks like: We've opensourced our dashboard, so you can view…

Read more

The grid layout for our dashboard original

by Freek Van der Herten – 7 minute read

The grid layout for dashboard.spatie.be was conceived with 3 simple ideas in mind: The layout has to be lightweight on the client side: no JavaScript calculations or full-blown grid library should be used. The HTML structure in the templates has to be clean, without extra markup for rows and…

Read more

Acceptance Testing a Laravel and Vue.js Application

Mohammed Said did some research on how run acceptance test for a javascript driven interface.

If you’re testing non-javascript driven interfaces then you may use Laravel’s built-in PHP Browser based testing library, it’s very powerful and the API is very readable as well. However if you need to test javascript driven interfaces then selenium is what you should be using.
https://dotdev.co/acceptance-testing-a-laravel-and-vue-js-application-4160b8e96156#.j1ltb34zv

Read more