Seeking a JavaScript Framework (Part 2: Reviews)

Last time, I covered what I want from a JavaScript framework (and a bit about why). I don't want to rehash all of that (you could read the entry if you cared), but let's start with the table of what I want from the end of the previous entry.

Criteria Desired
Runs in Browser? Yes
Progressive Enhancement Yes
Proper Separation of Concerns Yes
Enforce SPA? No
Strategy Declarative
Dom Manipulation Direct
Scale Small

The 10 Best Frameworks of 2024

At least according to hackr.io

That seems like as good a place to start as any. I'm not going to go into great detail about any of these or this would take too long.

React

Criteria Desired React
Runs in Browser? Yes Yes
Progressive Enhancement Yes No
Display HTML JavaScript
Enforce SPA? No No
Style CSS CSS
Strategy Declarative Declarative
Dom Manipulation Direct Virtual
Scale Small Big
Behavior JavaScript JavaScript
Data HTML JavaScript

I can really see why a lot of people like React. It really includes everything you need to solve big problems.

In fairness, I do think it could do Progressive Enhancement if I was doing JavaScript on the back-end as well, but I'm not.

Ultimately, React is built to solve a different problem than I'm trying to solve. It would be a great choice for anyone wanting to write a full-blown web app.

For those of us just wanting to organize a little bit of JavaScript that we are adding to our pages, though, it is a poor fit.

Express

Express is a Node.js framework. Not what I'm looking for.

Next.js

Next.js is also for Node.js. Not what I'm looking for.

Vue.js

I spent a bit of time looking at Vue.js and it really is very nice. It is declarative and easy to follow. Much of the definitions are right in the HTML. Very, very tempting. But let's see how it actually stacks up on the chart.

Criteria Desired Vue.js
Runs in Browser? Yes Yes
Progressive Enhancement Yes No
Display HTML Template
Enforce SPA? No No
Style CSS CSS
Strategy Declarative Declarative
Dom Manipulation Direct Direct
Scale Small
Behavior JavaScript JavaScript
Data HTML HTML

I really like Vue. It has a really nice syntax. I think Progressive Enhancement is too important to me to sacrifice, but it is worth considering.

For anyone who has similar criteria to me but without a strong need for progressive enhancement, I would highly recommend taking a look at Vue.

Angular

The two-way data binding of Angular is really nice.

Criteria Desired Angular
Runs in Browser? Yes Yes
Progressive Enhancement Yes No
Display HTML JavaScript
Enforce SPA? No
Style CSS
Strategy Declarative Declarative
Dom Manipulation Direct
Scale Small Big
Behavior JavaScript JavaScript
Data HTML JavaScript

Angular is really nice as well. If I were trying to find a JavaScript framework to write a full-blown web application this would be high on my list.

As I am just trying to write regular web pages with a little bit of JavaScript, though, this just isn't the right tool for that job.

Node.js

This is just for the server-side code, so not a match for what I need.

Svelte

Another one where the syntax is really quite great. Let's see what the chart says.

Criteria Desired Svelte
Runs in Browser? Yes Yes
Progressive Enhancement Yes No
Display HTML JavaScript
Enforce SPA? No
Style CSS JavaScript
Strategy Declarative Declarative
Dom Manipulation Direct Direct
Scale Small
Behavior JavaScript JavaScript
Data HTML JavaScript

Svelte is another framework that seems like a good tool to solve different problems than what I am trying to solve.

I would guess this would be a great fit for JavaScript-centric projects that maybe aren't as big as one where Angular or React would be a good fit.

Nest.JS

This is just for the server-side code.

Nuxt.js

It looks like server-side Vue.js.

jQuery

This is basically what I've been using before starting this search. Let's see how it stacks up.

Criteria Desired jQuery
Runs in Browser? Yes Yes
Progressive Enhancement Yes Yes
Display HTML HTML
Enforce SPA? No No
Style CSS CSS
Strategy Declarative Procedural
Dom Manipulation Direct Direct
Scale Small
Behavior JavaScript JavaScript
Data HTML HTML

Pretty good match, really. Which explains why I've been using it so long. It just doesn't enforce any organizational patterns.

Summary

In Browser PE Separation Enforce SPA Strategy DOM Scale
Target Yes Yes Display: HTML
Style: CSS
Action: JS
Data: HTML
No Declarative Direct Small
React Yes No Display: JS
Style: CSS
Action: JS
Data: JS
No Declarative Virtual Large
Express No            
Next.js No            
Vue.js Yes No Display: Template
Style: CSS
Action: JS
Data: ???
No Declarative Direct
Angular Yes No Display: JS
Style: JS
Action: JS
Data: JS
Declarative Big
Svelte Yes No Display: JS
Style: JS
Action: JS
Data: JS
       
Nest No            
Nuxt No            
jQuery Yes   Display: HTML
Style: CSS
Action: JS
Data: HTML
No Procedural Direct

So it looks like none of the really popular frameworks align with what I want. This could certainly be a sign that my goals are flawed.

I really don't think that they are though. The big mismatch tends to be progressive enhancements. I think I should write more later on why I think this is so important and why I think so many frameworks miss on this.

Is it hopeless?

Tune in next week to see what I figured out to meet my goals.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.