Why not use jQuery for your SPA-s

A while ago I wrote this article.

Now a few months later my opinion is actually: you don’t need Angular or React but you should not use jQuery either.

Thing is – after a few weeks the client who purchased the app comes back. He wants some changes to the database, the administration (written in PHP) and also changes in the SPA. It’s not a small fix by any means. After a day of work I am ready with the database changes and the admin. It’s time to turn my eyes to the JS code and get the app extended.

Much to my dismay the app’s code, although with beautifully named variables and methogds becomes so complicated to reason about that I need to refactor the whole thing. I am not great at JS either but I do get the job done. But not this timeā€¦ Days pass and I am nowhere near done with the app. I told the client it all woud take me 2 to 3 days and it’s already day 4. I am still not done. Not only that but it looks like the work on the SPA could easily take another week or so.But why not stick to good ol’ jQuery.. Or should I?

So at day 4, hour and a half before the end of my work day I think to myself: I heard good things about this Vue.js thing. I also watched some tutorials on it and it seems legit. It acutally seems very good option to do the work with. So what if I spend this hour and a half and see how far I can get with rewriting the app.

So I gave it a try. In this hour and a half I got done with rewriting 40% of the app. This was encouraging. In a day and a half I was done with the app, rewriting all the previous functionality in Vue.js. In that same time I added the client’s new requirements. I also fixed the bugs as far as I could. This same app took me more than 10 days in writing and modifying to reach almost the same state with jQuery.

So that’s my thought.. If you want to spend 9-10 times more time developing the same thing and have a hell code afterwards — go with jQuery.

  • Pingback: Angular, React and what Google and Facebook did not tell us – Developer Mode()

  • Johnny Driesen

    Yep, VueJS is THE future.
    As written to you in a private mail… I lost 10+ months of my life learning AngularJS.(v 1.5)

    After finishing some books an watching hours of vids, Angular 2.0 RC came out …
    Wow… huge difference with 1.5 … but… by the fact everybody is telling me Angular is the future,
    Let’s go for it…

    3 months later… hey wow… final release of Angular…
    OK, let’s port my Angular RC test-apps to the Angulars final version.

    NOTHING worked anymore.
    Tons of syntax changes…

    Angular… Sorry to say, but you lost me completely.
    Never ever again.

    VueJS… Here I am !!!


    • I tend to be softer on the Angular team. They are trying to solve a ton of problems at once. Problems like code quality (using TypeScript), testing (they wrote Karma if I remember correctly) and many more things. Vue does not strive to solve those.

      Sad thing is everything has its benefits, and its price.

      They are just different people with different goals.