Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

Discussion around VueJS, Turbo, htmx, AlpineJS, ...

Hello,

There are several technologies to add some reactivity to views and to avoid refreshing a whole page.

I'm very familiar to AlpineJS and VueJS, not at all to Turbo and htmx.

Hmmm ... well ... I have read some documentation on Turbo and htmx and there isn't any reason to use them with VueJS or AlpineJS.

But I also think : why would I have to use Turbo or htmx, there is much better with VueJS or AlpineJS.

Do you have already used Turbo or htmx in an application ? And why have you used it instead of VueJS or AlpineJS ? Is there a real benefit ?

Thanks for this discussion.

V

1 like
2 replies
LaryAI's avatar
Level 58

When deciding between using VueJS, AlpineJS, Turbo, or htmx, it's important to consider the specific needs of your project and the strengths of each technology. Here's a breakdown of each:

VueJS

  • Strengths:
    • Full-featured framework for building complex, reactive user interfaces.
    • Offers a component-based architecture, which is great for large-scale applications.
    • Rich ecosystem with tools like Vue Router and Vuex for state management.
  • Use Case: Ideal for single-page applications (SPAs) where you need a lot of interactivity and complex state management.

AlpineJS

  • Strengths:
    • Lightweight and easy to integrate into existing projects.
    • Syntax is similar to VueJS, making it easy to learn if you're already familiar with Vue.
    • Great for adding small amounts of interactivity without a build step.
  • Use Case: Perfect for projects where you need to sprinkle in some interactivity without the overhead of a full framework.

Turbo (part of Hotwire)

  • Strengths:
    • Focuses on optimizing page loads by only updating parts of the page that change.
    • Works well with server-rendered HTML, reducing the need for client-side JavaScript.
    • Can be a good fit for Rails applications, as it's part of the Hotwire suite.
  • Use Case: Suitable for applications where you want to enhance server-rendered pages with minimal JavaScript.

htmx

  • Strengths:
    • Allows you to send AJAX requests and update parts of the page without writing JavaScript.
    • Can be used to progressively enhance server-rendered pages.
    • Simple to use and integrates well with existing HTML.
  • Use Case: Ideal for projects where you want to add interactivity without a heavy JavaScript framework.

Why Choose Turbo or htmx Over VueJS or AlpineJS?

  • Server-Rendered Focus: If your application is primarily server-rendered and you want to enhance it with minimal JavaScript, Turbo or htmx can be more efficient.
  • Simplicity: For projects that don't require the full power of a JavaScript framework, Turbo and htmx offer a simpler, more lightweight solution.
  • Performance: By reducing the amount of JavaScript on the client-side, you can potentially improve performance, especially on slower devices or networks.

Conclusion

The choice between these technologies depends on your project's requirements. If you need a full-featured framework for a complex SPA, VueJS is a strong choice. For smaller enhancements, AlpineJS is excellent. If your focus is on server-rendered pages with minimal client-side logic, Turbo or htmx might be more appropriate. Each tool has its place, and understanding their strengths will help you make the best decision for your application.

1 like
jlrdw's avatar
jlrdw
Best Answer
Level 75

I watched the HTML series, but I am not going to use it. I'm not familiar with Turbo. I think if you use vue and alpine you are good to go.

But it never hurts to make a small app to play with htmx to experiment.

For a regular app (non SPA), I still feel that regular JS and either axios js or fetch js is all that's needed.

There have been some security concerns with axios js.

https://nvd.nist.gov/vuln/detail/CVE-2025-27152#VulnChangeHistorySection

1 like

Please or to participate in this conversation.