4 ms·
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
by hahamrfunnyguy 8y ago
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.
- thex10 8y agoThis is the first time I've seen the "MPA" phrase used like this, but I think this is my preferred approach too.
- nobody271 8y agoSame, as a user I like the feel of going to a separate page.
- jessaustin 8y agoCan you recommend any such frameworks?
- the_gastropod 8y agoStimulus 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/ https://stimulusjs.org/
- jessaustin 8y agoThanks, that looks really cool.
- flukus 8y agoKnockoutjs 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.
- zebraflask 8y agoThat'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.