Quiz
- more on loading files in html and why we chose to load them in the beginning in out example
Sure. It's best pictured, so I'll draw something, but the goal is to load them in parallel.
(Unfortunately, the tutorial doesn't use the ASYNC or DEFER attributes of the script tag, so it doesn't really get the benefit. Instead, it just slows down the loading of the HTML. It would be better to load it at the bottom.)
- could you explain again why you wanted us to load js/jq files at the bottom?
Two reasons:
- the DOM is guaranteed to exist, so we can add event
handlers without extra machinery
like
document.read(callback)
, and - the page will appear early, so that the user doesn't have to wait for the JS to load before the page appears
The latter is irrelevant when the JS is in cache or we have a fast network, but it can be important when the JS is large and the network is slow.
- the DOM is guaranteed to exist, so we can add event
handlers without extra machinery
like
- I would like to talk more about the bootstrap form inputs.
Sure. But to be clear, Bootstrap doesn't change the HTML language. The form inputs are part of HTML. Bootstrap just styles them.
See bootstrap forms and the next page, which is bootstrap inputs.
- More about other bootstrap js features
We'll look at some of those later in the course: dropdowns, modals and carousels. I'll show you where it is on the schedule, if you want to jump ahead.
- Is bootstrap better for building personal websites/portfolios compared to working with js files?
Depends on what you want. Think of Bootstrap as prefabricated things, like going to Home Depot and picking up a cabinet or something. It'll be quick and easy (though it might not fit quite right), but a custom built cabinet can be exactly what you want, though it takes more effort.
Do you want to showcase your content? Or do you want to show your ability to build from scratch?
- This is more of a question about how to use Bootsrap outside of this class. Do companies normally want bootstrap over regular html/css/javascript?
I think it has a lot to do with the previous question. How much effort do they want to put into a unique look versus getting something up and looking decent in a hurry?