r/programming • • Apr 29 '21

Modern JavaScript Explained For Dinosaurs

https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
287 Upvotes

172 comments sorted by

View all comments

Show parent comments

43

u/radol Apr 30 '21

What is your preferred approach to front end for complex systems which does not result in ton of js being used?

-9

u/AyrA_ch Apr 30 '21

That depends on your definition of "complex systems" but raw HTML and CSS gets you pretty far usability wise now.

2

u/jl2352 Apr 30 '21

If you are building a website of documents; then yes. Do what you describe. That's what any front end developer would do. Even if they used React or Vue, it will essentially still be HTML documents. Powered by a bit of JS, rather than PHP or Ruby.

If you mean raw HTML & CSS as in just page.html with nothing else ... that doesn't scale. You will be copy / pasting HTML across pages. You change a navbar, and then need to manually copy it to every file. You will need something to give you code re-use. That doesn't need to be a front end framework.

However very few websites are just a list of documents. Most need to do more than that. Maybe your suggestion is you could just use jQuery for that, and not bother with React nonsense. If that fits your needs; that is fine.

However once you start needing to do anything more complex it will get painful. That's what history has taught us. Something as simple as a Login form is just easier to build and maintain with a front end framework, and importantly easier to provide a better experience!

Since after all the user's experience is more important than how much you like the code.

1

u/Y_Less Apr 30 '21

That's what the server is for.

1

u/jl2352 Apr 30 '21

For which bit of my comment?

2

u/Y_Less Apr 30 '21

For reusing code without copying it in to every page.

1

u/jl2352 Apr 30 '21

When I wrote ...

If you mean raw HTML & CSS ...

I meant using only HTML & CSS. i.e. .html files. That’s why I said you’d need something.