4 ms·
I always have to look up how to link external CSS. Your framework doesn't just do that for you? Edit to downmodders: I'm not being flip or sarcastic. In all
by RyanMcGreal 17y ago
I always have to look up how to link external CSS.
Your framework doesn't just do that for you?
Edit to downmodders:
I'm not being flip or sarcastic. In all seriousness, if you're writing repetitive boilerplate - and particularly if you have to look that repetitive boilerplate up - you should be using some kind of templating system that does the repetitive (and hence programmable) stuff for you.
It could be as simple as a text file web page template with the proper doctype and generic css / javascript imports already typed out. You'll save yourself time and aggravation and reduce the incidence of silly mistakes.
- ljlolel 17y agoYou're right and you're wrong. I don't know if on balance you should be downmodded. Yes, your framework should have a shortcut for boilerplate like that, so you don't have to type it every time. I have worked with numerous frameworks, and I am in fact building one myself: jperla webify. Please notice that to include this feature in my framework I had to look it up using Google because I didn't know! I have to look it up every time precisely because my framework usually does it for me. But also, what is your framework's magical shortcut function to link the external CSS? I don't know because 1. it's not standardized across frameworks like html is, 2. it's often coded in automatically (e.g. rails asset-packager) so I practice it little and never learn it. Like I said, I know a number of frameworks intimately, but not this trivia. I have to look it up. Google does, however, teach me the high-level concepts about the benefits of using a web framework and asset packager. Finally, sometimes I just bang out a quick 1 page of static html with 1 statically linked CSS file (for debugging or mocking or random wanton fun) for which a framework would be wasteful overhead.