Tip 49 | Build Applications with Component Architecture |
In this tip, you’ll learn how to gather related HTML, JavaScript, and CSS together using component architecture.
Organizing files can be a challenge. Front-end code—HTML, CSS, JavaScript—can be particularly challenging because the code is made of different languages and file types.
Do you arrange code by file type? What about when CSS is tied to a single HTML file? Do you keep them in different directories but with similar file names?
For a long time, developers would keep files separated by type. The root directory would contain a css directory, a js directory, an img directory, and so on.
Organizing files like this showed good intentions. Everyone wanted to keep different areas of concern ...
Get Simplifying JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.