3 ms·
I wrote a spa at my last job using jQuery. It rendered page fragments on a php backend, detached the current fragment, saved it, then appended the new fragment.
by keanebean86 8y ago
I wrote a spa at my last job using jQuery. It rendered page fragments on a php backend, detached the current fragment, saved it, then appended the new fragment. If a fragment was already downloaded it would hydrate by ajaxing some json.
It was extra work and sometimes brittle but it was also my first "big" web project. Even though it didn't use all the cool new libs and build tools I still learned a lot from it.
- peteforde 8y agoThat's brilliant! Have you had the opportunity to play with Turbolinks 5? It sounds like there will be some crossover with what you have already done, but if you're intellectually curious, you might pick up some good tricks, too. https://github.com/turbolinks/turbolinks https://github.com/turbolinks/turbolinks https://www.youtube.com/watch?v=SWEts0rlezA&t=3m22s https://www.youtube.com/watch?v=SWEts0rlezA&t=3m22s TL5 just happens to pair beautifully with a tiny library called Stimulus, which would be YAF except that it's a) by the same team as TL5 and b) that team is also behind Rails, so there's some claim to legitimate best practices. https://stimulusjs.org/ https://stimulusjs.org/
- keanebean86 8y agoThis is awesome! Thanks!