
Ask HN: Why are frameworks necessary when plain HTML/CSS/JS are simpler? - gymshoes
I just started to learn react and I was making a simple Login form with it.<p>I was thinking to make it similar to the one I had made before and it seemed very much simpler with plain old HTML and CSS.<p>Even though the styling is similar to follow, it&#x27;s very much simpler in plain CSS. Just add text to classes instead of searching for the style in one of the many files.
======
rwieruch
The one question you need to ask yourself when starting a new project: what's
the end goal in size and complexity?

If it's only a static website, for instance a blog or your personal portfolio,
HTML & CSS with a couple of vanilla JavaScript functions is fine. However,
once you add complexity to your application, by using more than a couple of
utility JavaScript functions, there needs to be some kind of "framework" to
organize your View and Logic. React is used when it comes to organizing your
view as components, and JavaScript ES5 and beyond is doing the rest by adding
the necessary business logic. That's what makes React so great in the end,
because most of it simply stays plain JavaScript [0]. React is only the view
layer by organizing your application in components.

In case you are interested, just recently I had written down my thoughts [1]
on this questions for people learning React, Angular or Vue nowadays, but
questioning why they should learn it in the first place.

\- [0] [https://www.robinwieruch.de/essential-react-libraries-
framew...](https://www.robinwieruch.de/essential-react-libraries-framework)

\- [1] [https://www.robinwieruch.de/why-frameworks-
matter](https://www.robinwieruch.de/why-frameworks-matter)

------
duzchip
Well yes, for small simple static projects vanilla HTML/CSS/JS(with jquery
though) is probably simpler. The problem is when you reach "real life sized"
projects. When a project should do more than show a form and a few images and
some text.

Frameworks are useful to standardize how many developers in a single project
develop together. It also eases binding dynamic views to datasources
(databases or API:s or similar). And as a third i'd say that many of the
everyday "gotchas" are sorted out in mature frameworks so the developers can
focus on the stuff that actually matters.

I am - on the other hand - one of those who argue that frameworks also bring a
lot of evil into development. Especially in JS where frameworks are built on
top of frameworks which are built on top of frameworks. But I wont bring out
those arguments here since the question was "Why to use frameworks" not "Why
to avoid them".

Happy Hacking!

------
matt_s
Frameworks are needed to get developers past disagreements on organization of
code and focus on delivering business value. They also help organize work for
larger teams of people working together.

If you are solo and your application is going to be small they are probably
unnecessary. If you are learning or already know how to use a framework, then
it helps in the long run by taking care of lots of things to make your life
easier.

------
tboyd47
People just don't know how to build a website with plain HTML/CSS anymore.
Frameworks have dominated the front-end for so long, it's just what you do.

