Javascript vs HTML

Ok, not sure on this one - I have been doing the frontend library projects and they are all working as expected HOWEVER I am relying very heavily on vanila HTML/CSS with Javascript for the processing logic and small DOM manipulation (Eg in calculator updating totals etc).

Does this make me a “bad” developer (especially as I am trying to move in to frontend developemtn)? Should I be building the vast majority of a site via DOM manipulation (ie object for common elements pasring through it to build the page elements (eg an object to define “calculator buttons” giving button name, text to display, class, what to do onclick)?

For static websites you usually just do plain html, css and js.
Then theres framworks like React where you do most of the heavy lifting with JS that just applies to a root div. You dont really make a button a component, but small sections like a navbar etc.

Learning the vanilla stuff is great and gives you a fundation to build upon.

so I am comfortable with a large HTML file and then things like onclick, onkeyup etc - how about the rendering side for a vanilla HTML/CSS/JS page? guess that makes logical sense for a next step?

I feel like this title is somewhat misleading. Most websites are HTML+Javascript+CSS, you cant really have a site without HTML, your site will be mostly static without Javascript, and your site will be ugly without CSS. Regardless of “how” you get your site to work, it will boil down to the three.

Now onto how your saying most of your sites your working on are mostly HTML, with some vanilla javascript to do some things. This is fine, and is actually how the web was back when it started. This doesn’t make you a bad developer, you can build lots of things using minimal javascript. You also gain lots of knowledge of the raw “specs” of how javascript+html work. This is excellent experience to know.

Now, the issue with this approach comes down to scaling your code. It’s on thing to make a calculator this way, it’s another to make something like Facebook, or Google Drive, or Google Docs using these approaches. It just gets to confusing to handle things this way. Because of this you need to take a different approach, and this is where frameworks/libraries come in. Things like React/Angular/Backbone frameworks were all built with this idea in mind, these aren’t the only ways “to help scale your code” and by no means are they required to build a site, but it definitely helps.

Today I believe few complex web-apps are built without some kind of framework behind them, and because of that I recommend looking into them. You’ve already “been in the trenches” doing things the basic way, so you might be happy to find a framework that provides you with more capabilities, and better abstractions of what you get out of the box with HTML+vanilla JS.

There’s a world of libraires and frameworks that can make your life easier as a web dev. There’s nothing wrong with not using them, but I do recommend you learn about them, as what you do today by yourself could of already been “solved” by someone else and is a lib/utility/framework

:smiley:

1 Like

thanks Brad. I have looked at REACT, ANGULAR and BOOTSTRAP( prefer ANGULAR as have done slightly more in it - Bootstrap is easier to use as dont need NPM). I guess “which framework” is a real can of worms to answer…