Developer > 35 years
Multiple languages, frameworks, paradigms
Work with most of the tools mentioned below
Handled frameworks, tooling & testing migrations
Yep, an opinionated and philosophic rant
In the old days (some goes into today):
lodash
, moment/day.js
)Yay! we got AJAX
Users can't wait for full page refresh
👇
JQuery & Mootools FTW
But we need it to resemble an application
👇
Need to validate both on client side and server side
Duplicate code and effort
Needs to support the SPA
Ends up matching app needs instead of proper REST
Often need multiple queries to serve a single UI function
GraphQL FTW? N+1, needs more complex tooling, heavier load on the backend
What do you mean no SEO?
SSR
Hydration
Hmm, need to manage state and app data
Redux, Mobx, Vuex (past), Pinia (present)
Can't share links
Need to implement a routing solution
Representing all the options via Router and re-usable links is a hassle
Broken navigation (back button)
Yep, he's the co-author of React Router
Over the years I've learned to value simplicity
Revolutionary Idea:
What if HTTP
actually served HTML
?
💡
Think of breaking the page to parts/partials
On some action, do an Ajax request
Replace parts of the page with returned HTML content
Combined with Alpine.js, Stimulus or Hypermedia
My favorite of the 3, choose your poison
Turns AJAX, CSS Transitions, WebSockets into declarative HTML attributes
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
<!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML">
Click Me
</button>
POST
request to /clicked
See examples
Not suggesting abolishing FE frameworks
Think are they really needed?
Be aware of inertia based decisions
Thanks!
Questions? Comments?