by philsnow · 2y ago · 0 comments
The first time I wrote actual frontend things in exchange for USD, I was generating "DHTML" (my fingers stumbled over even typing the abbreviation because it's flushed so far out of my muscle memory cache) directly from perl. I know frontend stuff like a six year old knows calculus, and I feel like there's no way for me to catch up now.
The foundation is modern Javascript, another big new concept is async/await, combined with the fetch() calls so the entire screen doesn't lock up while your'e waiting for it to return
The other big shift is using CSS framekworks. Big ones now are Bootstrap and Tailwind.
I'm actually working on making a video with a live coding experiment making a small social networking site with some modern practices.
But some people still persist in doing the old way - e.g. Wikipedia. And Hacker News isn't an SPA from what I understand
Also, the "old way" has started to make a comeback with Server Side Rendering, as the compiled Javascript files using frameworks can get up to several megabytes and its taking too long to load the site.
Right now, modern web development is:
- Yarn/PNPM as package manager
- TypeScript as a programming language
- React as UI framework/library
- React Router for navigating multiple pages
- UI kit (I personally have good experience with React Material UI - https://mui.com/; there is also https://tanstack.com/)
- Something to deal with fetching data (tanstack query client is cool, provides caching out of the box)
- Something to deal with forms if you have that
- Maybe a store for managing data when it's too complex (see https://redux-toolkit.js.org/api/createSlice)
- And ofc, there are some templates/frameworks that bring something of that together (https://create-react-app.dev/; maybe https://vitejs.dev/) - google for templates.
I recommend finding some friend with modern experience or at least some youtube tutorials or at least some learning course. That would help you to catch up on the best way to bootstrap your first project. Then you can practice.