thomastospace,
@thomastospace@phpc.social avatar

Recently I started on a #Vuejs project at my new job. I've only worked with #Angular before.

One thing I didn't like it first, turned out to be an unexpected strength. In Angular, each component has a separate template, typescript & sass file. In Vue.js this is all inside a single file! Ugly and hard to use I thought.

Instead, it's a blessing. When a component reaches 100-150 lines, it already feels like a large component. Any larger? Time to split it up. It helps keep code clean.

pierstoval,
@pierstoval@mastodon.social avatar

@thomastospace Wait until you discover Svelte :p

thomastospace,
@thomastospace@phpc.social avatar

@pierstoval I'll wait till I heard of Svelte for 5 years before I touch it. It will either die or become stable enough in that time. It's counter is now around 1 year. 😂

pierstoval,
@pierstoval@mastodon.social avatar

@thomastospace What's nice is that if you just discovered Vue, discovering Svelte will be way easier: they embrace many similar concepts, and the difference between Vue and Svelte is really small compared with Angular or React!

Also, Vue's new non-object-component syntax is directly inspired by Svelte and it works great!

Svelte's learning curve is wayyyy smoother too.

And I find Svelte better in many other ways: https://github.com/Pierstoval/benchmarks-react-svelte-vue 😁

thomastospace,
@thomastospace@phpc.social avatar

@pierstoval This is actually a fun subject. I often see benchmarks for frontend frameworks, but I do wonder: Does it matter?

I feel like speed doesn't really matter unless I'm making an application which needs to show 10K rows of data (basically never, because pagination).

Total size is below 1 MB for all, so most of the data for the app will be things I add. I just need to make sure I'll have compress images.

Seems like benchmarks don't really matter in the choice of frontend framework?

pierstoval,
@pierstoval@mastodon.social avatar

@thomastospace benchmarks will matter for identical applications, especially big ones. Here, the runtime performances are less than 10% of others, so we can say that it's insignificant and even the doomed virtual DOM of react and Vue don't cause too much overhead.

However, I wish we could have a more complex application with processed CSS (like tailwind) to have more accurate comparisons, but it needs more thinking and I already spent too much time on these benches 😅

pierstoval,
@pierstoval@mastodon.social avatar

@thomastospace the conclusion to my benchmarks so far isn't about runtime performance but rather build time, size, and amount of dependencies, and in this case, Svelte has a pretty high score.

Last check which isn't shown here is the code complexity for the same features, and IMO svelte wins again. Setup is quick, and understanding of base features of the framework are straightforward, which isn't the case for Vue and React.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • vuejs
  • GTA5RPClips
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • everett
  • slotface
  • rosin
  • ethstaker
  • Durango
  • kavyap
  • cubers
  • provamag3
  • modclub
  • mdbf
  • khanakhh
  • vwfavf
  • osvaldo12
  • cisconetworking
  • tester
  • Leos
  • tacticalgear
  • anitta
  • normalnudes
  • megavids
  • JUstTest
  • All magazines