News for hackers. Stuff that matters.
Re:The Baseline Costs of JavaScript Frameworks by hahamrfunnyguy on Wednesday November 28, 2018 @12:04PM (#18553229)
I prefer the MPA (multi-page application) approach for most projects. If interactivty is needed, I use REST services and a data-binding framework on the front end.
Re:The Baseline Costs of JavaScript Frameworks by zebraflask on Thursday November 29, 2018 @09:04AM (#18560179)
That's very interesting - I use a similar approach. In my case, it wasn't deliberate. It came about from working on a variety of projects with management that had unclear and frequently shifting requirements.

A monolithic SPA approach turned into too much work when you'd have to throw out a bunch of code one day, replace it the next day with something just similar enough to cause a bunch of refactoring and bugs, etc.

In that context, it's easier to treat each page or major component as its own mini-SPA, then glue them together with a bare minimum of code.

For the same general reason, and to echo other comments, I recently chose Angular over React (or Vue) simply because Angular has a lot of built-in functionality that helps prevent a downward spiral of dependency maintenance from third party libraries and plugins, even if it's a little slower overall on many benchmarks.

Re:The Baseline Costs of JavaScript Frameworks by thex10 on Wednesday November 28, 2018 @12:55PM (#18553806)
This is the first time I've seen the "MPA" phrase used like this, but I think this is my preferred approach too.
Re:The Baseline Costs of JavaScript Frameworks by nobody271 on Wednesday November 28, 2018 @07:27PM (#18557071)
Same, as a user I like the feel of going to a separate page.
Re:The Baseline Costs of JavaScript Frameworks by jessaustin on Wednesday November 28, 2018 @02:22PM (#18554733)
Can you recommend any such frameworks?
Re:The Baseline Costs of JavaScript Frameworks by the_gastropod on Wednesday November 28, 2018 @03:59PM (#18555639)
Stimulus is is a pretty good example of a simple JS framework that binds via data attributes. It, coupled with Turbolinks or Pjax, should let you do nearly anything you'd typically use a more popular front-end framework for, for much cheaper. Check it out: https://stimulusjs.org/
Re:The Baseline Costs of JavaScript Frameworks by jessaustin on Wednesday November 28, 2018 @05:27PM (#18556261)
Thanks, that looks really cool.
Re:The Baseline Costs of JavaScript Frameworks by flukus on Wednesday November 28, 2018 @06:14PM (#18556581)
Knockoutjs works well for this, have heard vuejs is similar but haven't tried it.

That's for highly interactive pages of course, for simple pages that just need some regex validation or something, no framework is the best framework.