Folder Structure and Library Files
Explore how to organize the folder structure of a front-end JavaScript app using MVC principles. Understand the role of essential library files like browserShims.js, util.js, and errorTypes.js in implementing constraint validation and maintaining data integrity. This lesson helps you build a solid foundation for managing code and preparing for advanced validation features.
We'll cover the following...
The MVC folder structure of our validation application extends the structure of the minimal application by adding a lib folder containing the generic code libraries browserShims.js, errorTypes.js, and util.js.
As a result, we get the following folder structure:
publicLibrary
css
main.css
normalize.min.css
lib
browserShims.js
errorTypes.js
util.js
src
c
m
v
index.html
We discuss the contents of the added files in the following sub-sections.
General utility functions and library files fixes
We add three library files to the lib folder: ...